You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/10/25 15:32:27 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #6047: Core: Replace projected Schema with schemaId/fieldIds/fieldNames in ScanReport

nastra commented on code in PR #6047:
URL: https://github.com/apache/iceberg/pull/6047#discussion_r1004646307


##########
core/src/main/java/org/apache/iceberg/metrics/ScanReportParser.java:
##########
@@ -71,8 +71,24 @@ public static void toJsonWithoutStartEnd(ScanReport scanReport, JsonGenerator ge
     gen.writeFieldName(FILTER);
     ExpressionParser.toJson(scanReport.filter(), gen);
 
-    gen.writeFieldName(PROJECTION);
-    SchemaParser.toJson(scanReport.projection(), gen);
+    gen.writeNumberField(SCHEMA_ID, scanReport.schemaId());
+
+    // fieldIds & fieldNames can be empty with an empty projection
+    if (!scanReport.projectedFieldIds().isEmpty()) {

Review Comment:
   sure, I'll adjust accordingly



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

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org