Skip to content

[spark] Preserve table-scoped options when resolving branches - #11679

Open
QuakeWang wants to merge 2 commits into
apache:masterfrom
QuakeWang:spark-branch-match
Open

QuakeWang wants to merge 2 commits into
apache:masterfrom
QuakeWang:spark-branch-match

Conversation

@QuakeWang

Copy link
Copy Markdown
Member

Purpose

Spark resolved the branch using the requested table name, then looked up options again using the branch-qualified name. With branch=dev and scan.snapshot-id=1 configured for the same table, the second lookup lost the snapshot option and returned rows from a later snapshot.

Resolve options once against the requested identifier, load the selected branch, and apply the remaining options to that table. Match identifier components literally so names such as sales(v2) and $audit_log work with table-scoped settings.

Tests

Added SQL coverage for branch selection, audit logs, and reading the first of two snapshots on dev. All 27 targeted tests passed on both Spark 3.5.9 and 4.1.4.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants