Skip to content

Commit 63d6777

Browse files
guoweimarmbrus
authored andcommitted
[SPARK-2986] [SQL] fixed: setting properties does not effect
it seems that set command does not run by SparkSQLDriver. it runs on hive api. user can not change reduce number by setting spark.sql.shuffle.partitions but i think setting hive properties seems just a role to spark sql. Author: guowei <[email protected]> Closes apache#1904 from guowei2/temp-branch and squashes the following commits: 7d47dde [guowei] fixed: setting properties like spark.sql.shuffle.partitions does not effective
1 parent 905dc4b commit 63d6777

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import org.apache.hadoop.hive.common.{HiveInterruptCallback, HiveInterruptUtils,
3434
import org.apache.hadoop.hive.conf.HiveConf
3535
import org.apache.hadoop.hive.ql.Driver
3636
import org.apache.hadoop.hive.ql.exec.Utilities
37-
import org.apache.hadoop.hive.ql.processors.{CommandProcessor, CommandProcessorFactory}
37+
import org.apache.hadoop.hive.ql.processors.{SetProcessor, CommandProcessor, CommandProcessorFactory}
3838
import org.apache.hadoop.hive.ql.session.SessionState
3939
import org.apache.hadoop.hive.shims.ShimLoader
4040
import org.apache.thrift.transport.TSocket
@@ -284,7 +284,7 @@ private[hive] class SparkSQLCLIDriver extends CliDriver with Logging {
284284
val proc: CommandProcessor = CommandProcessorFactory.get(tokens(0), hconf)
285285

286286
if (proc != null) {
287-
if (proc.isInstanceOf[Driver]) {
287+
if (proc.isInstanceOf[Driver] || proc.isInstanceOf[SetProcessor]) {
288288
val driver = new SparkSQLDriver
289289

290290
driver.init()

0 commit comments

Comments
 (0)