File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,15 @@ case class SetCommand(
8484 logWarning(
8585 s " Property ${SQLConf .Deprecated .MAPRED_REDUCE_TASKS } is deprecated, " +
8686 s " automatically converted to ${SQLConf .SHUFFLE_PARTITIONS } instead. " )
87- sqlContext.setConf(SQLConf .SHUFFLE_PARTITIONS , value)
88- Seq (Row (s " ${SQLConf .SHUFFLE_PARTITIONS }= $value" ))
87+ if (value == " -1" ) {
88+ logWarning(
89+ s " Set this property to -1 for automatically determining the number of reducers " +
90+ s " is not supported, showing current ${SQLConf .SHUFFLE_PARTITIONS } instead. " )
91+ Seq (Row (s " ${SQLConf .SHUFFLE_PARTITIONS }= ${sqlContext.conf.numShufflePartitions}" ))
92+ } else {
93+ sqlContext.setConf(SQLConf .SHUFFLE_PARTITIONS , value)
94+ Seq (Row (s " ${SQLConf .SHUFFLE_PARTITIONS }= $value" ))
95+ }
8996
9097 // Configures a single property.
9198 case Some ((key, Some (value))) =>
You can’t perform that action at this time.
0 commit comments