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:08:45 UTC

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

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


##########
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:
   Can we write an empty list if the projected IDs are empty? I think that way we know explicitly that nothing was projected.



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