rdblue commented on a change in pull request #263: [WIP] Make metrics 
collection configurable via table properties
URL: https://github.com/apache/incubator-iceberg/pull/263#discussion_r300847142
 
 

 ##########
 File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetUtil.java
 ##########
 @@ -78,8 +80,14 @@ public static Metrics footerMetrics(ParquetMetadata 
metadata) {
       rowCount += block.getRowCount();
       for (ColumnChunkMetaData column : block.getColumns()) {
         ColumnPath path = column.getPath();
-        int fieldId = fileSchema.aliasToId(path.toDotString());
+        String columnAlias = path.toDotString();
+        int fieldId = fileSchema.aliasToId(columnAlias);
         increment(columnSizes, fieldId, column.getTotalSize());
+
+        MetricsMode columnMetricsMode = 
metricsSpec.getColumnMetricsMode(columnAlias);
 
 Review comment:
   The column alias should be Iceberg's column alias, not Parquet's column 
alias. So this should look up the name from the Iceberg schema before checking 
the spec.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to