lirui-apache commented on a change in pull request #8536: [FLINK-12568][hive]
Implement OutputFormat to write Hive tables
URL: https://github.com/apache/flink/pull/8536#discussion_r288906740
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/util/HiveTypeUtil.java
##########
@@ -132,4 +133,45 @@ private static TypeInformation
toFlinkPrimitiveType(PrimitiveTypeInfo hiveType)
String.format("Flink doesn't support
Hive primitive type %s yet", hiveType));
}
}
+
+ /**
+ * Converts a Flink {@link TypeInformation} to corresponding Hive
{@link TypeInfo}.
+ */
+ public static TypeInfo toHiveTypeInfo(TypeInformation flinkType) {
Review comment:
I'll use Hive's `TypeInfoFactory` to achieve this. Alternatively, we can
maintain a mapping from type name to `TypeInfo` ourselves.
----------------------------------------------------------------
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