JingsongLi commented on code in PR #292:
URL: https://github.com/apache/flink-table-store/pull/292#discussion_r976264399


##########
flink-table-store-format/src/main/java/org/apache/flink/table/store/format/orc/OrcFileFormat.java:
##########
@@ -115,4 +124,96 @@ private static Properties getOrcProperties(ReadableConfig 
options) {
         properties.forEach((k, v) -> orcProperties.put(IDENTIFIER + "." + k, 
v));
         return orcProperties;
     }
+
+    private static LogicalType convertLogicalType(LogicalType type) {

Review Comment:
   can we change a method name? or add some comments to explain `BINARY` and 
`VARBINARY`



##########
flink-table-store-format/src/main/java/org/apache/flink/table/store/format/orc/OrcFileFormat.java:
##########
@@ -92,14 +98,17 @@ public BulkFormat<RowData, FileSourceSplit> 
createReaderFactory(
         }
 
         return OrcInputFormatFactory.create(
-                readerConf, type, 
Projection.of(projection).toTopLevelIndexes(), orcPredicates);
+                readerConf,
+                (RowType) convertLogicalType(type),
+                Projection.of(projection).toTopLevelIndexes(),
+                orcPredicates);
     }
 
     @Override
     public BulkWriter.Factory<RowData> createWriterFactory(RowType type) {
         LogicalType[] orcTypes = type.getChildren().toArray(new 
LogicalType[0]);
 
-        TypeDescription typeDescription = 
OrcSplitReaderUtil.logicalTypeToOrcType(type);
+        TypeDescription typeDescription = logicalTypeToOrcType(type);

Review Comment:
   can we use 
`OrcSplitReaderUtil.logicalTypeToOrcType(convertLogicalType(type))`?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to