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 15:58:53 UTC

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

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


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/Spark3Util.java:
##########
@@ -968,4 +970,16 @@ public String unknown(
       return String.format("%s(%s) %s %s", transform, sourceName, direction, nullOrder);
     }
   }
+
+  public static <T extends org.apache.iceberg.Scan<T, ?, ?>> T addSparkMetadataToScan(
+      SparkSession spark, T scan) {
+    String executionId = spark.sparkContext().getLocalProperty(SQLExecution.EXECUTION_ID_KEY());
+    T updatedScan = scan;
+    if (null != executionId) {
+      updatedScan = updatedScan.option(SQLExecution.EXECUTION_ID_KEY(), executionId);
+    }
+    return updatedScan

Review Comment:
   Missing newline above.



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