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-31999][SQL] Add REFRESH FUNCTION command #28840
[SPARK-31999][SQL] Add REFRESH FUNCTION command #28840
Changes from all commits
69a47a1
a95dcb6
3fc807e
b282348
f677a4a
a6c5d8b
de54470
9e09875
63695c0
9e9d5ce
c434821
35fd44b
f83fd8b
e444943
afd510b
1241bde
93f5d71
dc684b5
0ea7dd6
643969c
6cb2edd
cffc207
4b6408d
5d5fe71
4ba345b
6765395
dc86b82
a38d656
cdea55b
5e227d7
703ad47
a79f72b
a4d144a
3bd8d23
60ac2a0
b36b760
c5937a2
56ec5ea
c129a54
a956144
711656d
5d4c152
94fa132
fc4789f
e83194f
b18437c
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.
@imback82 do you have time to work on this TODO?
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.
Yea, I will get to it once this PR is merged.
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.
Created #29198
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.
Move this method to
LookupCatalog.CatalogAndFunctionIdentifier
and drop the sql param.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.
This PR needs the change?
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.
We still can create persistent function with the same name as the built-in function. For example,
I think we should still allow this case.
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.
It seems no meaning to refresh a persistent function whose name is same as a built-in function.
Yes, we can create a persistent function with the same name as the built-in function, but just create in metastore. The actual function we used is the built-in function. The reason is built-in functions are pre-cached in registry and we lookup cached function first.
e.g.,
CREATE FUNCTION rand AS 'xxx'
,DESC FUNCTION rand
will always returnClass: org.apache.spark.sql.catalyst.expressions.Rand
.BTW, maybe it's the reason why we create function and load it lazy that just be a Hive client, otherwise we can't create such function like
rand
,md5
in metastore. @cloud-fanThere 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.
how about
I think this is similar to table and temp views. Spark will try to look up temp view first, so if the name conflicts, temp view is preferred. But users can still use a qualified table name to read the table explicitly.
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.
You are right.
Missed qualified name case, I will fix this in followup.
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.
Nit: built-in
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.
get it.