[
https://issues.apache.org/jira/browse/DRILL-7199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16831088#comment-16831088
]
ASF GitHub Bot commented on DRILL-7199:
---------------------------------------
amansinha100 commented on pull request #1771: DRILL-7199: Optimize population
of metadata for non-interesting columns
URL: https://github.com/apache/drill/pull/1771#discussion_r280008250
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScanWithMetadata.java
##########
@@ -146,15 +148,23 @@ public boolean isMatchAllMetadata() {
*/
@Override
public long getColumnValueCount(SchemaPath column) {
- long tableRowCount = (long)
TableStatisticsKind.ROW_COUNT.getValue(getTableMetadata());
+ long tableRowCount, colNulls;
+ Long nulls;
ColumnStatistics columnStats =
getTableMetadata().getColumnStatistics(column);
- long colNulls;
+ ColumnStatistics nonInterestingColStats =
getNonInterestingColumnsMetadata().getColumnStatistics(column);
+
if (columnStats != null) {
- Long nulls = (Long)
columnStats.getStatistic(ColumnStatisticsKind.NULLS_COUNT);
- colNulls = nulls != null ? nulls : GroupScan.NO_COLUMN_STATS;
+ tableRowCount = (long)
TableStatisticsKind.ROW_COUNT.getValue(getTableMetadata());
+ } else if (nonInterestingColStats != null) {
Review comment:
The logic here is unclear..shouldn't this be `if`, not `else if` ? If
`columnStats` is not null does it mean we don't care about
`nonInterestingColStats` ? I thought columnStats is for the 'interesting'
columns but that does not seem to be the case.
----------------------------------------------------------------
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]
> Optimize the time taken to populate column statistics for non-interesting
> columns
> ---------------------------------------------------------------------------------
>
> Key: DRILL-7199
> URL: https://issues.apache.org/jira/browse/DRILL-7199
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Venkata Jyothsna Donapati
> Assignee: Venkata Jyothsna Donapati
> Priority: Minor
> Fix For: 1.17.0
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Currently populating column statistics for non-interesting columns very long
> since it is populated for every row group. Since non-interesting column
> statistics are common for the table, it can be populated once and can be
> reused.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)