-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-24544][SQL][FOLLOWUP] Remove a wrong warning on Hive fallback lookup #24773
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
Conversation
| // Hive is case insensitive. | ||
| val functionName = funcName.unquotedString.toLowerCase(Locale.ROOT) | ||
| logWarning("Encountered a failure during looking up function:" + | ||
| s" ${Utils.exceptionString(error)}") |
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 should not warn here.
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.
maybe this is intended for the true case of if (super.functionExists(name)) above? like L138?
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.
Ya. Maybe, but I'm not sure about the original intention. For that line 138, since we already throw error, actually, we don't need print warning here with the same error.
| // Hive is case insensitive. | ||
| val functionName = funcName.unquotedString.toLowerCase(Locale.ROOT) | ||
| logWarning("Encountered a failure during looking up function:" + | ||
| s" ${Utils.exceptionString(error)}") |
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.
maybe this is intended for the true case of if (super.functionExists(name)) above? like L138?
|
Thank you for review and approval, @felixcheung . |
gatorsmile
left a 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.
LGTM
|
Thank you for review and approval, @gatorsmile ! |
HyukjinKwon
left a 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.
One trivial question. LGTM as is
| // let's try to load it as a Hive's built-in function. | ||
| // Hive is case insensitive. | ||
| val functionName = funcName.unquotedString.toLowerCase(Locale.ROOT) | ||
| logWarning("Encountered a failure during looking up function:" + |
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.
Why don't we debug or info that we'll try fallback while we're here?
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.
Yes. Of course, we can add debug messages any places. But, this is a natural flow for Hive built-in function lookup. To showing a message like Encountered a failure during looking up function: NoSuchFunctionException for every Hive function at the first invocation will not give much values to the developer/users. Also, it's misleading to the users because Spark will execute the function without any problem at the same exeuction.
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 meant to add a debug message like "Hive fallback will be attempted for the function [abc]." because users/dev might not know which function exist in Spark and which function comes from Hive or at least where the fallback happens.
This warn should be removed anyway ..
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.
let's talk about this somewhere else later. I think it's not a big deal at all. LGTM it should be removed anyway.
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 see, @HyukjinKwon .
For that message, I guess that the reason why the code doesn't have debug/info originally is that the Apache Spark's ambition was to implement everything in Spark-side and to remove this fallback logic completely. :)
|
Thank you for review and approval, @HyukjinKwon . |
|
Test build #106091 has finished for PR 24773 at commit
|
|
Merged to master. Thank you all! |
What changes were proposed in this pull request?
This PR is a follow-up of #21790 which causes a regression to show misleading warnings always at first invocation for all Hive function. Hive fallback lookup should not be warned. It's a normal process in function lookups.
CURRENT (Showing
NoSuchFunctionExceptionand working)How was this patch tested?
Manually execute the above query.