GitHub user tejasapatil opened a pull request:
https://github.com/apache/spark/pull/10849
[SPARK-12926][SQL] SQLContext to disallow users passing non-sql configs
Testing:
```
./bin/spark-shell
scala> sqlContext.sql("SET spark.sql.orc.filterPushdown=false")
res1: org.apache.spark.sql.DataFrame = [key: string, value: string]
scala> sqlContext.sql("SET hive.mapred.mode=nonstrict")
res2: org.apache.spark.sql.DataFrame = [key: string, value: string]
scala> sqlContext.sql("SET spark.shuffle.memoryFraction=0.4")
org.apache.spark.SparkException: Attempt to set non-Spark SQL config in
SQLConf: key = spark.shuffle.memoryFraction, value = 0.4
at org.apache.spark.sql.SQLConf.setConfWithCheck(SQLConf.scala:696)
at org.apache.spark.sql.SQLConf.setConfString(SQLConf.scala:623)
at org.apache.spark.sql.SQLContext.setConf(SQLContext.scala:137)
at
org.apache.spark.sql.execution.SetCommand$$anonfun$8.apply(commands.scala:163)
at
org.apache.spark.sql.execution.SetCommand$$anonfun$8.apply(commands.scala:162)
at org.apache.spark.sql.execution.SetCommand.run(commands.scala:214)
at
org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult$lzycompute(commands.scala:58)
at
org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult(commands.scala:56)
at
org.apache.spark.sql.execution.ExecutedCommand.doExecute(commands.scala:70)
at
org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:108)
at
org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:106)
at
org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)
at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:106)
at
org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:55)
at
org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:55)
at org.apache.spark.sql.DataFrame.<init>(DataFrame.scala:140)
at org.apache.spark.sql.DataFrame.<init>(DataFrame.scala:125)
at org.apache.spark.sql.DataFrame$.apply(DataFrame.scala:47)
at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:800)
..
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tejasapatil/spark SPARK-12926
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10849.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 #10849
----
commit 0741c5d6678992de9ee3827bb3c6428466f9217c
Author: Tejas Patil <[email protected]>
Date: 2016-01-20T14:36:49Z
[SPARK-12926][SQL] SQLContext to disallow users passing non-sql configs
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]