twalthr commented on a change in pull request #9239: [FLINK-13385]Align Hive
data type mapping with FLIP-37
URL: https://github.com/apache/flink/pull/9239#discussion_r309597763
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/util/HiveTypeUtil.java
##########
@@ -85,65 +86,71 @@ public static TypeInfo toHiveTypeInfo(DataType dataType) {
LogicalTypeRoot type = dataType.getLogicalType().getTypeRoot();
if (dataType instanceof AtomicDataType) {
Review comment:
How about using a `LogicalTypeVisitor` or `LogicalTypeDefaultVisitor` here
instead? It would simplify the logic here because `if/else/instanceof` checks
would not be required anymore. Furthermore, we would force implementers to make
sure all cases are covered.
----------------------------------------------------------------
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