Skip to content

Conversation

@pan3793
Copy link
Member

@pan3793 pan3793 commented Jan 19, 2026

Backport #53794 to branch-4.0

What changes were proposed in this pull request?

Replace val stringArgs with def stringArgs in v2 writing commands, because each call of the method stringArgs should return a brand-new Iterator, otherwise, subsequent consumers will get an empty result.

Why are the changes needed?

Fix EXPLAIN / UI display.

Does this PR introduce any user-facing change?

Yes, for example, without this fix, I found that some AppendData nodes in UI do not contain Arguments: ... where they should be, this patch makes them display correctly consistently.

How was this patch tested?

INSERT INTO an Iceberg table and check UI, before vs after.

image image

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions
Copy link

JIRA Issue Information

=== Bug SPARK-55033 ===
Summary: Fix stringArgs of DSv2 writing commands
Assignee: Cheng Pan
Status: Resolved
Affected: ["3.5.7"]


This comment was automatically generated by GitHub Actions

Replace `val stringArgs` with `def stringArgs` in v2 writing commands, because each call of the method `stringArgs` should return a brand-new `Iterator`, otherwise, subsequent consumers will get an empty result.

Fix EXPLAIN / UI display.

Yes, for example, without this fix, I found that some `AppendData` nodes in UI do not contain `Arguments: ...` where they should be, this patch makes them display correctly consistently.

INSERT INTO an Iceberg table and check UI, before vs after.

<img width="389" height="86" alt="image" src="https://github.com/user-attachments/assets/3bdb18e2-b605-497f-9431-ae416c340541" />

<img width="844" height="110" alt="image" src="https://github.com/user-attachments/assets/4ed3ea3f-4fcd-4b93-a1fd-2714c3fead12" />

No.

Closes apache#53794 from pan3793/SPARK-55033.

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Peter Toth <peter.toth@gmail.com>
sarutak pushed a commit that referenced this pull request Jan 19, 2026
Backport #53794 to branch-4.0

### What changes were proposed in this pull request?

Replace `val stringArgs` with `def stringArgs` in v2 writing commands, because each call of the method `stringArgs` should return a brand-new `Iterator`, otherwise, subsequent consumers will get an empty result.

### Why are the changes needed?

Fix EXPLAIN / UI display.

### Does this PR introduce _any_ user-facing change?

Yes, for example, without this fix, I found that some `AppendData` nodes in UI do not contain `Arguments: ...` where they should be, this patch makes them display correctly consistently.

### How was this patch tested?

INSERT INTO an Iceberg table and check UI, before vs after.

<img width="389" height="86" alt="image" src="https://github.com/user-attachments/assets/3bdb18e2-b605-497f-9431-ae416c340541" />

<img width="844" height="110" alt="image" src="https://github.com/user-attachments/assets/4ed3ea3f-4fcd-4b93-a1fd-2714c3fead12" />

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #53856 from pan3793/SPARK-55033-4.0.

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Kousuke Saruta <sarutak@apache.org>
@sarutak
Copy link
Member

sarutak commented Jan 19, 2026

Merged into branch-4.0. Thank you @pan3793 @peter-toth !

@sarutak sarutak closed this Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants