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

Spark3.1, Spark3.2, Spark3.3: Support setting current snapshot with ref #8392

Closed
wants to merge 1 commit into from

Conversation

manuzhang
Copy link
Contributor

Back-port of #8163 to spark/v3.3, spark/v3.2 and spark/v3.1

@github-actions github-actions bot added the spark label Aug 25, 2023
@manuzhang manuzhang force-pushed the backport-8163 branch 3 times, most recently from 3af9e21 to be80598 Compare August 25, 2023 08:33
@manuzhang
Copy link
Contributor Author

@aokolnychyi @nastra please help review.

Back-port of apache#8163 to `spark/v3.3`, `spark/v3.2` and `spark/v3.1`
@manuzhang
Copy link
Contributor Author

@nastra @amogh-jahagirdar please take another look

Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @manuzhang, I think we need to revisit the error messages being surfaced and the exception change for the case where there are missing parameters. See my comment below. If it's the case we should get a fix in for 3.4 as well.

AnalysisException.class,
"Missing required parameters",
IllegalArgumentException.class,
"Either snapshot_id or ref must be provided, not both",
Copy link
Contributor

Choose a reason for hiding this comment

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

This error message doesn't seem right for the arguments that are being passed in. We're missing the required parameters right? Also I don't think we should change the exception that is being thrown for the existing cases (missing required parameters) because we probably want to preserve that behavior in case users rely on it. For the new failure case (ref + snapshot ID) the IllegalArgumentException is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean throw AnalysisException when both snapshot_id and ref are missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aokolnychyi what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@amogh-jahagirdar, @aokolnychyi please share your thoughts here.

@manuzhang manuzhang closed this Dec 14, 2023
@manuzhang manuzhang deleted the backport-8163 branch March 26, 2024 15:02
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