Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spark: Don't allow branch_ usage with TIMESTAMP AS OF #10059

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

nastra
Copy link
Contributor

@nastra nastra commented Mar 28, 2024

fixes #10058 and applies the same as #9219 for TIMESTAMP AS OF


// using branch_b1 in the table identifier and TIMESTAMP AS OF
Assertions.assertThatThrownBy(
() -> sql("SELECT * FROM %s.branch_b1 TIMESTAMP AS OF %s", tableName, snapshotId))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] should we pass actual timestamp instead of snapshotId ? though I agree this error is hit before the timestamp parsing so testing like this is also sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @singhpk234 I totally missed this. Would be good to fix this test to pass a timestamp just so someone reading it isn't confused!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops that was a copy/paste error. I've changed this to using now()

@nastra nastra force-pushed the branch-usage-with-timestamp-as-of branch from 0beaf61 to b3b85d4 Compare March 30, 2024 08:02
Copy link
Contributor

@singhpk234 singhpk234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well, thanks @nastra !

@nastra nastra merged commit d28fcf2 into apache:main Mar 31, 2024
31 checks passed
@nastra nastra deleted the branch-usage-with-timestamp-as-of branch March 31, 2024 10:55
nk1506 pushed a commit to nk1506/iceberg that referenced this pull request Apr 2, 2024
sasankpagolu pushed a commit to sasankpagolu/iceberg that referenced this pull request Oct 27, 2024
zachdisc pushed a commit to zachdisc/iceberg that referenced this pull request Dec 23, 2024
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.

Don't allow time-travel via TIMESTAMP AS OF on branch
3 participants