-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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-17203][SQL] data source options should always be case insensitive #14773
Conversation
Test build #64289 has finished for PR 14773 at commit
|
Maybe these options should just case sensitive in general? |
Actually I take that back. Just realized we explicitly documented that these options were case insensitive in the data source API. |
@@ -65,7 +65,7 @@ case class CreateDataSourceTableCommand( | |||
|
|||
var isExternal = true | |||
val optionsWithPath = | |||
if (!new CaseInsensitiveMap(options).contains("path") && managedIfNoPath) { | |||
if (!options.contains("path") && managedIfNoPath) { |
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 might want to create a constant for the string "path" as a data source param. It occurs in quite a few places.
I'll back on it after we unify the |
val duplicatedKeys = lowercaseKeys.groupBy(identity).collect { | ||
case (x, ys) if ys.size > 1 => x | ||
} | ||
throw new AnalysisException( |
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 it is an AnalysisException? This class is only supposed to be used at driver?
What changes were proposed in this pull request?
We don't have a clear definition about When data source options should be case sensitive and when not. Currently
path
is case-insensitive,numFeatures
in LibSVMFileFormat is case-sensitive,maxFilesPerTrigger
in FileStreamSource is case-insensitive, etc.Instead of letting every conf decide whether they should be case-sensitive or not themselves, I think it's better to make it clear that all data source options are case-insensitive.
How was this patch tested?
existing tests.