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/11/02 16:56:30 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #6058: Core,Spark: Add metadata to Scan Report

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


##########
core/src/main/java/org/apache/iceberg/BaseTableScan.java:
##########
@@ -135,11 +143,14 @@ public CloseableIterable<FileScanTask> planFiles() {
             planningDuration.stop();
             ScanReport scanReport =
                 ImmutableScanReport.builder()
-                    .projection(schema())
+                    .schemaId(schema().schemaId())
+                    .projectedFieldIds(projectedFieldIds)
+                    .projectedFieldNames(projectedFieldNames)
                     .tableName(table().name())
                     .snapshotId(snapshot.snapshotId())
                     .filter(ExpressionUtil.sanitize(filter()))
                     .scanMetrics(ScanMetricsResult.fromScanMetrics(scanMetrics()))
+                    .metadata(context().options())

Review Comment:
   I think passing the Spark App ID through the `TableScanContext` is probably the easiest way without changing any APIs. I'm aware that this isn't a strict use-case for `options` but at the same time the `options` seem flexible enough to allow such a use case. 
   Optionally, we could maybe add a `metadata()` method to `TableScanContext` to keep it separate from `options()`?
   
   



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