cloud-fan commented on a change in pull request #30097:
URL: https://github.com/apache/spark/pull/30097#discussion_r511786935



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisTest.scala
##########
@@ -53,16 +53,18 @@ trait AnalysisTest extends PlanTest {
   }
 
   protected def getAnalyzer(caseSensitive: Boolean) = {
-    if (caseSensitive) caseSensitiveAnalyzer else caseInsensitiveAnalyzer
+    makeAnalyzer(caseSensitive)
   }
 
   protected def checkAnalysis(
       inputPlan: LogicalPlan,
       expectedPlan: LogicalPlan,
       caseSensitive: Boolean = true): Unit = {
-    val analyzer = getAnalyzer(caseSensitive)
-    val actualPlan = analyzer.executeAndCheck(inputPlan, new 
QueryPlanningTracker)
-    comparePlans(actualPlan, expectedPlan)
+    withSQLConf(SQLConf.CASE_SENSITIVE.key -> caseSensitive.toString) {

Review comment:
       let's not change the test framework if not necessary. It's OK to test 
with 2 analyzer instance.




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to