Cheng Hao created HIVE-4777:
-------------------------------
Summary: Null value Versus RuntimeException in failed data type
converting
Key: HIVE-4777
URL: https://issues.apache.org/jira/browse/HIVE-4777
Project: Hive
Issue Type: Improvement
Components: Serializers/Deserializers
Reporter: Cheng Hao
Priority: Minor
Fix For: 0.12.0
Usually "null" value will returns if the data can not be converted to the other
type. (e.g. null == doubleConverter.convert("abc")).
But it also may also throws RuntimeException other than NumberFormatException
in the DoubleConverter.convert() method, as the type BINARY can not be
converted into DOUBLE. And there are some others. (Check
PrimitiveObjectInspectorUtils.java for details.)
It's acceptable for throwing exception, but may not in runtime, as the data
type convertibility can be decided before the data arrives. The earlier stage
the better.
Or just like the normal case, return null constantly for the in-convertible
data types converting.
What do you think?
Thanks,
Hao
--
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