Skip to content

Commit ce3f4db

Browse files
committed
SetCommand
1 parent 419db15 commit ce3f4db

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/commands.scala

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,25 @@ case class SetCommand(kv: Option[(String, Option[String])]) extends RunnableComm
102102
}
103103
(keyValueOutput, runFunc)
104104

105-
case Some((key, Some(value)))
106-
if key == SQLConf.Deprecated.EXTERNAL_SORT || key == SQLConf.Deprecated.USE_SQL_AGGREGATE2 =>
105+
case Some((SQLConf.Deprecated.EXTERNAL_SORT, Some(value))) =>
107106
val runFunc = (sqlContext: SQLContext) => {
108107
logWarning(
109-
s"Property ${key} is deprecated and will be ignored. " +
108+
s"Property ${SQLConf.Deprecated.EXTERNAL_SORT} is deprecated and will be ignored. " +
110109
s"External sort will continue to be used.")
111110
Seq(Row(SQLConf.Deprecated.EXTERNAL_SORT, "true"))
112111
}
113112
(keyValueOutput, runFunc)
114113

114+
case Some((SQLConf.Deprecated.USE_SQL_AGGREGATE2, Some(value))) =>
115+
val runFunc = (sqlContext: SQLContext) => {
116+
logWarning(
117+
s"Property ${SQLConf.Deprecated.USE_SQL_AGGREGATE2} is deprecated and " +
118+
s"will be ignored. ${SQLConf.Deprecated.USE_SQL_AGGREGATE2} will " +
119+
s"continue to be true.")
120+
Seq(Row(SQLConf.Deprecated.USE_SQL_AGGREGATE2, "true"))
121+
}
122+
(keyValueOutput, runFunc)
123+
115124
// Configures a single property.
116125
case Some((key, Some(value))) =>
117126
val runFunc = (sqlContext: SQLContext) => {

0 commit comments

Comments
 (0)