drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] okalinin commented on a change in pull request #1370: DRILL-5797: Use Parquet new reader in all non-complex column queries
Date Wed, 11 Jul 2018 11:54:39 GMT
okalinin commented on a change in pull request #1370: DRILL-5797: Use Parquet new reader in
all non-complex column queries
URL: https://github.com/apache/drill/pull/1370#discussion_r201661724
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/AbstractParquetScanBatchCreator.java
 ##########
 @@ -161,20 +167,24 @@ private ParquetMetadata readFooter(Configuration conf, String path)
throws IOExc
     }
   }
 
-  private boolean isComplex(ParquetMetadata footer) {
+  private boolean isComplex(ParquetMetadata footer, List<SchemaPath> columns) {
     MessageType schema = footer.getFileMetaData().getSchema();
 
-    for (Type type : schema.getFields()) {
-      if (!type.isPrimitive()) {
-        return true;
+    if (Utilities.isStarQuery(columns)) {
+      for (Type type : schema.getFields()) {
+        if (!type.isPrimitive()) {
+          return true;
+        }
       }
-    }
-    for (ColumnDescriptor col : schema.getColumns()) {
-      if (col.getMaxRepetitionLevel() > 0) {
-        return true;
+      for (ColumnDescriptor col : schema.getColumns()) {
+        if (col.getMaxRepetitionLevel() > 0) {
+          return true;
+        }
       }
+      return false;
+    } else {
+      return containsComplexColumn(footer, columns);
 
 Review comment:
   Methods combined in one and moved to utility class.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message