luluorta commented on a change in pull request #30299:
URL: https://github.com/apache/spark/pull/30299#discussion_r521143561
##########
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") {
+ val plan = analyzer.execute(
+ testRelation.where(('a > 2 && 'b > 3) || ('A > 2 && 'b < 5)))
+ val actual = Optimize.execute(plan)
+ val expected = analyzer.execute(
+ testRelation.where('a > 2 && ('b > 3 || 'b < 5)))
+ comparePlans(actual, expected)
+ }
}
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:
reverted
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveTableScanExec.scala
##########
@@ -60,8 +59,6 @@ case class HiveTableScanExec(
require(partitionPruningPred.isEmpty || relation.isPartitioned,
"Partition pruning predicates only supported for partitioned tables.")
- override def conf: SQLConf = sparkSession.sessionState.conf
Review comment:
reverted
----------------------------------------------------------------
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]