aokolnychyi commented on code in PR #15240:
URL: https://github.com/apache/iceberg/pull/15240#discussion_r2886930959


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/SparkChangelogTable.java:
##########
@@ -74,24 +73,7 @@ public Set<TableCapability> capabilities() {
 
   @Override
   public ScanBuilder newScanBuilder(CaseInsensitiveStringMap options) {
-    if (refreshEagerly) {
-      icebergTable.refresh();
-    }
-
-    return new SparkScanBuilder(spark(), icebergTable, changelogSchema(), 
options) {
-      @Override
-      public Scan build() {
-        return buildChangelogScan();
-      }
-    };
-  }
-
-  private Schema changelogSchema() {
-    if (lazyChangelogSchema == null) {
-      this.lazyChangelogSchema = 
ChangelogUtil.changelogSchema(icebergTable.schema());
-    }
-
-    return lazyChangelogSchema;
+    return new SparkChangelogScanBuilder(spark(), table, schema, options);

Review Comment:
   Yeah, it felt this way to me too.



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