Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/13392#discussion_r65124192
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/internal/SQLConfSuite.scala ---
@@ -219,4 +220,41 @@ class SQLConfSuite extends QueryTest with
SharedSQLContext {
}
}
+ test("MAX_CASES_BRANCHES") {
+ import testImplicits._
+
+ val original = spark.conf.get(SQLConf.MAX_CASES_BRANCHES)
+ try {
+ withTable("tab1") {
+ spark
+ .range(10)
+ .select('id as 'a, 'id as 'b, 'id as 'c, 'id as 'd)
+ .write
+ .saveAsTable("tab1")
+
+ val sql_one_branch_caseWhen = "SELECT CASE WHEN a = 1 THEN 1 END
FROM tab1"
+ val sql_two_branch_caseWhen = "SELECT CASE WHEN a = 1 THEN 1 ELSE
0 END FROM tab1"
+
+ spark.conf.set(SQLConf.MAX_CASES_BRANCHES.key, "0")
--- End diff --
Yeah, will do it.
---
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]