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-48737] Perf improvement during analysis - Create exception only when it is necessary for default expression resolving #47124

Conversation

urosstan-db
Copy link
Contributor

What changes were proposed in this pull request?

When resolving of default value being done in method resolveColumnDefaultInAssignmentValue, exception that should be thrown in case default value is not resolvable is created in any case (positive or negative outcome), but exception creation can be expensive (because reading error-classes file to get exception message) we should avoid it and create exception only when it is needed.

Why are the changes needed?

Perf improvement (less file reads)

Does this PR introduce any user-facing change?

No

How was this patch tested?

No tests yet

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

No

@urosstan-db urosstan-db marked this pull request as ready for review June 27, 2024 12:32
@github-actions github-actions bot added the SQL label Jun 27, 2024
@urosstan-db
Copy link
Contributor Author

@cloud-fan Can you review it? Is there some way to write test for this, I don't know how to track exception creation

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 48eb4d5 Jul 1, 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.

2 participants