wayneguow commented on code in PR #47414:
URL: https://github.com/apache/spark/pull/47414#discussion_r1689741608


##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala:
##########
@@ -1258,25 +1258,29 @@ class JDBCV2Suite extends QueryTest with 
SharedSparkSession with ExplainSuiteHel
     checkAnswer(df15, Seq(Row(1, "cathy", 9000, 1200, false),
       Row(2, "alex", 12000, 1200, false), Row(6, "jen", 12000, 1200, true)))
 
-    val df16 = spark.table("h2.test.employee")
-      .filter(sin($"bonus") < -0.08)
-      .filter(sinh($"bonus") > 200)
-      .filter(cos($"bonus") > 0.9)
-      .filter(cosh($"bonus") > 200)
-      .filter(tan($"bonus") < -0.08)
-      .filter(tanh($"bonus") === 1)
-      .filter(cot($"bonus") < -11)
-      .filter(asin($"bonus") > 0.1)
-      .filter(acos($"bonus") > 1.4)
-      .filter(atan($"bonus") > 1.4)
-      .filter(atan2($"bonus", $"bonus") > 0.7)
+    val df16 = sql(
+      """
+        |SELECT * FROM h2.test.employee
+        |WHERE sin(bonus) < -0.08
+        |AND sinh(bonus) > 200
+        |AND cos(bonus) > 0.9
+        |AND cosh(bonus) > 200
+        |AND tan(bonus) < -0.08
+        |AND tanh(bonus) = 1
+        |AND cot(bonus) < -11
+        |AND asin(bonus / salary) > 0.13
+        |AND acos(bonus / salary) < 1.47
+        |AND atan(bonus) > 1.4
+        |AND atan2(bonus, bonus) > 0.7
+        |""".stripMargin)
     checkFiltersRemoved(df16)

Review Comment:
   I guess that the push-down processing for complex filters is inconsistent 
when turning on and off ansi mode, so I first constructed some suitable data 
and restored the fiters of `asin` and `acos` to simple. This is the followup pr 
#47472



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to