cloud-fan commented on a change in pull request #30299:
URL: https://github.com/apache/spark/pull/30299#discussion_r520570072
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/BooleanSimplificationSuite.scala
##########
@@ -188,27 +188,29 @@ class BooleanSimplificationSuite extends PlanTest with
ExpressionEvalHelper with
checkCondition(!(('e || 'f) && ('g || 'h)), (!'e && !'f) || (!'g && !'h))
}
- private val caseInsensitiveConf = new SQLConf().copy(SQLConf.CASE_SENSITIVE
-> false)
- private val caseInsensitiveAnalyzer = new Analyzer(
- new SessionCatalog(new InMemoryCatalog, EmptyFunctionRegistry,
caseInsensitiveConf),
- caseInsensitiveConf)
+ private val analyzer = new Analyzer(
+ new SessionCatalog(new InMemoryCatalog, EmptyFunctionRegistry))
test("(a && b) || (a && c) => a && (b || c) when case insensitive") {
- val plan = caseInsensitiveAnalyzer.execute(
- testRelation.where(('a > 2 && 'b > 3) || ('A > 2 && 'b < 5)))
- val actual = Optimize.execute(plan)
- val expected = caseInsensitiveAnalyzer.execute(
- testRelation.where('a > 2 && ('b > 3 || 'b < 5)))
- comparePlans(actual, expected)
+ withSQLConf(SQLConf.CASE_SENSITIVE.key -> "false") {
Review comment:
This is the default value. Seems we can remove `withSQLConf`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]