[ https://issues.apache.org/jira/browse/HIVE-3323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449024#comment-13449024 ]
Ashutosh Chauhan commented on HIVE-3323: ---------------------------------------- MultiKey stuff you added in OIcache doesn't look particularly clean. I think motivation for making that change was if there are multiple ThriftDeserializer in a job and for some reason they have different value for this new config key, you wanted to return different OIs with correct config. Intention is benign, but I am not sure if this really will work though. First of all its a rare condition that you have more then one serde in a job, only place I can think of is when you are reading two different tables in a same job (probably for joining) this will come up. There since configuration object is same for whole job, you are going to get only one value for whole job for your config key, not for each serde. So, even if some comes up with this rare use case of having two different ThriftSerDe which differs on this property, I doubt this will work. Further, this introduces dependecy on commons-collections which implies we need to package and ship this jar to backend. Thirdly, it introduces code complexity. So, I think we should drop this Multi-Key stuff for OIcache and keep it in original form. You might be able to make this work if you keep this config key in Table properties instead of Configuration, but I think we are introducing too much complexity for a rare case. At this point I will retract from opening up this option of having struct<int>. Lets always convert to string going forward, keeping the code changes to minimal and avoiding complexity. Another feedback is I think for JavaStringObjectInspector. I think instead of testing for type of object, you can always return o.toString() there, since if it was Enum, thats what you are doing and if it were String, then toString() on String returns {{this}} so we will get desired result for both cases and avoid type-check test. > ThriftSerde: Enable enum to string conversions > ---------------------------------------------- > > Key: HIVE-3323 > URL: https://issues.apache.org/jira/browse/HIVE-3323 > Project: Hive > Issue Type: Improvement > Affects Versions: 0.10.0 > Reporter: Travis Crawford > Assignee: Travis Crawford > Attachments: HIVE-3323_enum_to_string.1.patch, > HIVE-3323_enum_to_string.2.patch, HIVE-3323_enum_to_string.3.patch, > HIVE-3323_enum_to_string.4.patch, HIVE-3323_enum_to_string.5.patch, > HIVE-3323_enum_to_string.6.patch > > > When using serde-reported schemas with the ThriftDeserializer, Enum fields > are presented as {{struct<value:int>}} > Many users expect to work with the string values, which is both easier and > more meaningful as the string value communicates what is represented. > Hive should provide a mechanism to optionally convert enum values to strings. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira