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

Review request for hive and Ashutosh Chauhan.


Description
-------

ThriftSerde: Enable enum to string conversions


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


Diffs
-----

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 5efae89 
  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/ivy.xml 040df5b 
  
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 
  
serde/src/java/org/apache/hadoop/hive/serde2/thrift/ThriftByteStreamTypedSerDe.java
 d98c5fb 
  serde/src/java/org/apache/hadoop/hive/serde2/thrift/ThriftDeserializer.java 
e5696ab 

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

Reply via email to