amansinha100 commented on a change in pull request #1781: DRILL-7238: Fixed
ConvertCountToDirectScan to handle non-existent columns
URL: https://github.com/apache/drill/pull/1781#discussion_r281363696
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/ConvertCountToDirectScanRule.java
##########
@@ -288,7 +288,10 @@ public void onMatch(RelOptRuleCall call) {
Metadata_V4.ColumnTypeMetadata_v4 columnMetadata =
metadataSummary.getColumnTypeInfo(new
Metadata_V4.ColumnTypeMetadata_v4.Key(simplePath));
- if (columnMetadata == null || columnMetadata.totalNullCount ==
Statistic.NO_COLUMN_STATS) {
+ if (columnMetadata == null) {
+ // If the column doesn't exist in the table, row count is set to 0
Review comment:
Also update the Javadoc for this method by adding this information for
non-existing column
----------------------------------------------------------------
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