[GitHub] spark pull request #15884: [WIP][SPARK-18433][SQL] Improve DataSource option...
Github user dongjoon-hyun commented on a diff in the pull request: https://github.com/apache/spark/pull/15884#discussion_r87936113 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala --- @@ -34,35 +34,42 @@ private[sql] class JSONOptions( @transient private val parameters: Map[String, String]) --- End diff -- I will update this PR in that way. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #15884: [WIP][SPARK-18433][SQL] Improve DataSource option...
Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/15884#discussion_r87936135 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala --- @@ -34,35 +34,42 @@ private[sql] class JSONOptions( @transient private val parameters: Map[String, String]) --- End diff -- `JSONOptions` is spark private, we can just declare the type is `CaseInsensitiveMap`, i.e. `parameters: CaseInsensitiveMap` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #15884: [WIP][SPARK-18433][SQL] Improve DataSource option...
Github user dongjoon-hyun commented on a diff in the pull request: https://github.com/apache/spark/pull/15884#discussion_r87936058 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala --- @@ -34,35 +34,42 @@ private[sql] class JSONOptions( @transient private val parameters: Map[String, String]) --- End diff -- Ah, just changing the function signature. `parameters: CaseInsensitiveMap[String, String]`. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #15884: [WIP][SPARK-18433][SQL] Improve DataSource option...
Github user dongjoon-hyun commented on a diff in the pull request: https://github.com/apache/spark/pull/15884#discussion_r87935620 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala --- @@ -34,35 +34,42 @@ private[sql] class JSONOptions( @transient private val parameters: Map[String, String]) --- End diff -- Oh, sure! You mean `require(parameters.isInstanceOf[CaseInsensitiveMap])`, right? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #15884: [WIP][SPARK-18433][SQL] Improve DataSource option...
Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/15884#discussion_r87935015 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala --- @@ -34,35 +34,42 @@ private[sql] class JSONOptions( @transient private val parameters: Map[String, String]) --- End diff -- can we just force users to pass a `CaseInsensitiveMap`? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #15884: [WIP][SPARK-18433][SQL] Improve DataSource option...
GitHub user dongjoon-hyun opened a pull request: https://github.com/apache/spark/pull/15884 [WIP][SPARK-18433][SQL] Improve DataSource option keys to be more case-insensitive ## What changes were proposed in this pull request? This PR aims to improve DataSource option keys to be more case-insensitive DataSource partially use CaseInsensitiveMap in code-path. For example, the following fails to find url. ```scala val df = spark.createDataFrame(sparkContext.parallelize(arr2x2), schema2) df.write.format("jdbc") .option("URL", url1) .option("dbtable", "TEST.SAVETEST") .options(properties.asScala) .save() ``` This PR makes DataSource options to use CaseInsensitiveMap internally and also makes DataSource to use CaseInsensitiveMap generally except `InMemoryFileIndex` and `InsertIntoHadoopFsRelationCommand`. We can not pass them CaseInsensitiveMap because they creates new case-sensitive HadoopConfs by calling newHadoopConfWithOptions(options) inside. ## How was this patch tested? Pass the Jenkins test with newly added test cases. You can merge this pull request into a Git repository by running: $ git pull https://github.com/dongjoon-hyun/spark SPARK-18433 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/15884.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #15884 commit 30eff086159dabc8db7a46f6d4021c187d7fa4ed Author: Dongjoon Hyun Date: 2016-11-14T08:59:23Z [SPARK-18433][SQL] Improve DataSource option keys to be more case-insensitive --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org