xuefuz commented on a change in pull request #8769: [FLINK-12875][hive] support
converting input args of char, varchar, bytes, timestamp, date for Hive
functions
URL: https://github.com/apache/flink/pull/8769#discussion_r294959778
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/functions/hive/conversion/HiveInspectors.java
##########
@@ -162,34 +220,64 @@ public static Object toFlinkObject(ObjectInspector
inspector, Object data) {
return oi.preferWritable() ?
oi.get(data) :
- oi.getPrimitiveWritableObject(data);
+ oi.getPrimitiveJavaObject(data);
Review comment:
Okay. I took a little deeper look and believe we only need to call
getPrimitiveJavaObject() to get the java object, which can be further converted
to the object that Flink expects. Even if we call getPrimitiveWritableObject()
to get a writable object, we still need to convert to its java equivalent and
then further convert it to the java object that Flink expects.
However, this can be taken care of in a separate PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services