drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] vvysotskyi commented on a change in pull request #1406: DRILL-6641: Fix columnValueCounts in ParquetGroupScanStatistics when ParquetGroupScan has RowGroupInfo without column statistics
Date Mon, 30 Jul 2018 16:52:32 GMT
vvysotskyi commented on a change in pull request #1406: DRILL-6641: Fix columnValueCounts in
ParquetGroupScanStatistics when ParquetGroupScan has RowGroupInfo without column statistics
URL: https://github.com/apache/drill/pull/1406#discussion_r206245343
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScanStatistics.java
 ##########
 @@ -87,19 +91,14 @@ public void collect(List<RowGroupInfo> rowGroupInfos, ParquetTableMetadataBase
p
       long rowCount = rowGroup.getRowCount();
       for (ColumnMetadata column : rowGroup.getColumns()) {
         SchemaPath schemaPath = SchemaPath.getCompoundPath(column.getName());
-        Long previousCount = columnValueCounts.get(schemaPath);
-        if (previousCount != null) {
-          if (previousCount != GroupScan.NO_COLUMN_STATS && column.isNumNullsSet())
{
-            Long newCount = rowCount - column.getNulls();
-            columnValueCounts.put(schemaPath, columnValueCounts.get(schemaPath) + newCount);
-          }
+        MutableLong emptyCount = new MutableLong();
+        MutableLong previousCount =
+            Optional.ofNullable(columnValueCounts.putIfAbsent(schemaPath, emptyCount))
 
 Review comment:
   Thanks, replaced with `if (previousCount == null)`

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