Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-51119][SQL] Readers on executors resolving EXISTS_DEFAULT should not call catalogs #49840
[SPARK-51119][SQL] Readers on executors resolving EXISTS_DEFAULT should not call catalogs #49840
Changes from all commits
164bd6b
2fa0b0b
0491833
fc92de7
57793fd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the CAST can be nested inside array/map/struct, we should put this case match inside the
transformUp
, together withcase u: UnresolvedFunction
@szehon-ho can you make a followup PR for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cloud-fan sure, let me do that.
BTW, I looked a little bit and couldnt reproduce a failure with the current implementation using a following unit test with a nested cast:
Unlike the failing case of top-level cast:
EXISTS_DEFAULT is saved without a cast in the first case:
ARRAY('2018-11-17 00:00:00')
(looks like it got evaluated)and with a cast in the second case:
CAST(TIMESTAMP '2018-11-17 00:00:00' AS STRING)
So I think in this particular scenario, it doesnt matter. But agree that it is better to have it, as we are making a generic method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm looking at the previous test failure
CAST(TIMESTAMP '2018-11-17 00:00:00' AS STRING)
can't be generated byLiteral#sql
. Seems we have some misunderstanding about how this existing default string is generated. @szehon-ho can you take a closer look?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
synced offline, see the other comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the CAST is added here, but it should be constant-folded before we generate the existing default string. We need to debug it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
synced with @cloud-fan offline, this is not constant folded after this line, when analyzing to create EXISTS_DEFAULT. So in the input of analyzeExistsDefault() , EXISTS_DEFAULT sometimes has a top level CAST