yuchuanchen commented on code in PR #21563:
URL: https://github.com/apache/flink/pull/21563#discussion_r1066846566


##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/read/HiveInputFormat.java:
##########
@@ -138,17 +160,27 @@ private RowType tableRowType() {
             LOG.debug(String.format("Use native parquet reader for %s.", 
split));
             return ParquetColumnarRowInputFormat.createPartitionedFormat(
                     jobConfWrapper.conf(),
-                    producedRowType,
+                    tableRowType(),
                     InternalTypeInfo.of(producedRowType),
+                    projectedFields,
                     partitionKeys,
                     partitionFieldExtractor,
                     DEFAULT_SIZE,
                     hiveVersion.startsWith("3"),
                     false);
-        } else if (!useMapRedReader && 
useOrcVectorizedRead(split.getHiveTablePartition())) {
+        } else if (!useMapRedReader
+                && useOrcVectorizedRead(split.getHiveTablePartition())
+                && !isNested) {
             LOG.debug(String.format("Use native orc reader for %s.", split));
             return createOrcFormat();
         } else {
+            if (isNested) {
+                throw new FlinkRuntimeException(
+                        String.format(
+                                "can not find a reader for nested type: %s. 
Maybe you should set %s to false",

Review Comment:
   updated



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