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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to