ihuzenko commented on a change in pull request #1954: DRILL-7509: Incorrect
TupleSchema is created for DICT column when querying Parquet files
URL: https://github.com/apache/drill/pull/1954#discussion_r366432945
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/FilterEvaluatorUtils.java
##########
@@ -113,7 +113,9 @@ public static RowsMatch matches(LogicalExpression expr,
Map<SchemaPath, ColumnSt
StatisticsProvider<T> rangeExprEvaluator = new
StatisticsProvider(columnsStatistics, rowCount);
rowsMatch = parquetPredicate.matches(rangeExprEvaluator);
}
- return rowsMatch == RowsMatch.ALL && isRepeated(schemaPathsInExpr,
fileMetadata) ? RowsMatch.SOME : rowsMatch;
+ return rowsMatch == RowsMatch.ALL
+ && (isRepeated(schemaPathsInExpr, fileMetadata) ||
isDictOrRepeatedMapChild(schemaPathsInExpr, fileMetadata))
Review comment:
It seems like both methods ```isRepeated(schemaPathsInExpr, fileMetadata)```
and ```isDictOrRepeatedMapChild(schemaPathsInExpr, fileMetadata))``` only
exists to serve one specific purpose - avoid ```RowsMatch.ALL``` when
necessary. Maybe it makes sense to combine both methods into one and rename it?
Also, the check could be placed inside the ``` if (parquetPredicate != null)
{``` declared above.
----------------------------------------------------------------
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