Skip to content

Conversation

@zuowang
Copy link

@zuowang zuowang commented Feb 28, 2016

What changes were proposed in this pull request?

Pass "caseSensitiveAnalysis" to InferSchema. Change field name to lowercase when "caseSensitiveAnalysis" is false.

How was this patch tested?

Add new test case in DataFrameSuite.

@zuowang
Copy link
Author

zuowang commented Mar 1, 2016

What would be the case like in CSV? I don't think anybody want to conbine "user" and "User" column when "caseSensitiveAnalysis" is false.
scala> val jsonDF = sqlContext.read.option("header", "true").csv("file.csv")
jsonDF: org.apache.spark.sql.DataFrame = [user: string, User: string ... 1 more field]

scala> jsonDF.show
+-------+-------+-----+
| user| User| hits|
+-------+-------+-----+
| om| scala| 120|
| daniel| spark| 80|
|3754978| spark| 1|
+-------+-------+-----+

Pass "caseSensitiveAnalysis" to InferSchema. Change field name to lowercase when "caseSensitiveAnalysis" is false.

Add new test case in DataFrameSuite.
@zuowang zuowang force-pushed the case-sensitiveness-4-json branch from 7c76be4 to fe17374 Compare March 8, 2016 10:22
@maropu
Copy link
Member

maropu commented Jun 17, 2016

@rxin Currently, do we have any policy to handle case-sensitivity inside spark? e.g., postgresql always holds names into lower case (https://www.postgresql.org/docs/9.5/static/sql-syntax-lexical.html) and h2 does into upper one. It seems there are many case-sensitivity issue in not only json, but also other other datasources.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@gatorsmile
Copy link
Member

@maropu Yes. We need to consider case sensitivity for the built-in data sources at least.

@gatorsmile
Copy link
Member

@zuowang @maropu Are you still working on this? We should resolve this issue.

@maropu
Copy link
Member

maropu commented Jun 12, 2017

I'm not, so it's okay to do so.

@zuowang
Copy link
Author

zuowang commented Jun 14, 2017

I'm not, could you work to resolve it?

@HyukjinKwon
Copy link
Member

Let's close this if it is not in a progress.

@gatorsmile
Copy link
Member

We are closing it due to inactivity. please do reopen if you want to push it forward. Thanks!

@asfgit asfgit closed this in b32bd00 Jun 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants