hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Crawford" <traviscrawf...@gmail.com>
Subject Re: Review Request: HIVE-3323 ThriftSerde: Enable enum to string conversions
Date Thu, 06 Sep 2012 00:12:14 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/6915/
-----------------------------------------------------------

(Updated Sept. 6, 2012, 12:12 a.m.)


Review request for hive and Ashutosh Chauhan.


Changes
-------

This patch makes enum-to-string conversion mandatory, removing the config option. The patch
is much cleaner now.

I just started CI at https://travis.ci.cloudbees.com/job/HIVE-3323_enum_to_string/ which will
take 6-7 hours. If that passes I'll post the patch in the Jira.


Description
-------

ThriftSerde: Enable enum to string conversions


This addresses bug HIVE-3323.
    https://issues.apache.org/jira/browse/HIVE-3323


Diffs (updated)
-----

  ql/src/test/queries/clientpositive/convert_enum_to_string.q PRE-CREATION 
  ql/src/test/results/clientpositive/convert_enum_to_string.q.out PRE-CREATION 
  serde/if/test/megastruct.thrift PRE-CREATION 
  serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java
PRE-CREATION 
  serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MiniStruct.java
PRE-CREATION 
  serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MyEnum.java
PRE-CREATION 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java
b21755e 
  serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/JavaStringObjectInspector.java
921ce2b 

Diff: https://reviews.apache.org/r/6915/diff/


Testing
-------

Running CI now after rebasing to master and changing the default to enabled. Some preliminary
feedback would be great though

https://travis.ci.cloudbees.com/job/HIVE-3323_enum_to_string/10/

To test, I added a new struct that contains an enum field, we check that its schema is correctly
described, and that this property can be enable/disabled at runtime.

Something I'm not clear on with Hive is how to write more comprehensive tests that involved
more than just ql commands. For example, take a look at:

http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/test/org/apache/hcatalog/mapreduce/TestHCatHiveThriftCompatibility.java?view=markup

Here we see an example junit test I wrote that creates a file containing thrift structs, creates
the table, checks its schema, and ensures the query returns expected output. With the Hive
test suite all I add here are ql commands that check the schema, since I'm not sure how to
do the test setup. I'm more than happy to add a more comprehensive test but would appreciate
some guidance to do that correctly.


Thanks,

Travis Crawford


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message