This is an automated email from the ASF dual-hosted git repository.

philo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 1bed7c9fd5 [GLUTEN-9512][VL] Remove duplicate function tests from 
ScalarFunctionsValidateSuite (#9513)
1bed7c9fd5 is described below

commit 1bed7c9fd59585791a528e55cd4490ee1a35a22f
Author: dcoliversun <[email protected]>
AuthorDate: Tue May 6 14:38:19 2025 +0800

    [GLUTEN-9512][VL] Remove duplicate function tests from 
ScalarFunctionsValidateSuite (#9513)
---
 .../execution/ScalarFunctionsValidateSuite.scala   | 82 ++++++----------------
 1 file changed, 21 insertions(+), 61 deletions(-)

diff --git 
a/backends-velox/src/test/scala/org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala
 
b/backends-velox/src/test/scala/org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala
index 564fcd45d6..7145f215b5 100644
--- 
a/backends-velox/src/test/scala/org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala
+++ 
b/backends-velox/src/test/scala/org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala
@@ -81,48 +81,6 @@ abstract class ScalarFunctionsValidateSuite extends 
FunctionsValidateSuite {
     }
   }
 
-  test("Test chr function") {
-    runQueryAndCompare("SELECT chr(l_orderkey + 64) from lineitem limit 1") {
-      checkGlutenOperatorMatch[ProjectExecTransformer]
-    }
-  }
-
-  test("Test abs function") {
-    runQueryAndCompare("SELECT abs(l_orderkey) from lineitem limit 1") {
-      checkGlutenOperatorMatch[ProjectExecTransformer]
-    }
-  }
-
-  test("Test ceil function") {
-    runQueryAndCompare("SELECT ceil(cast(l_orderkey as long)) from lineitem 
limit 1") {
-      checkGlutenOperatorMatch[ProjectExecTransformer]
-    }
-  }
-
-  test("Test floor function") {
-    runQueryAndCompare("SELECT floor(cast(l_orderkey as long)) from lineitem 
limit 1") {
-      checkGlutenOperatorMatch[ProjectExecTransformer]
-    }
-  }
-
-  test("Test Exp function") {
-    runQueryAndCompare("SELECT exp(l_orderkey) from lineitem limit 1") {
-      checkGlutenOperatorMatch[ProjectExecTransformer]
-    }
-  }
-
-  test("Test Power function") {
-    runQueryAndCompare("SELECT power(l_orderkey, 2) from lineitem limit 1") {
-      checkGlutenOperatorMatch[ProjectExecTransformer]
-    }
-  }
-
-  test("Test Pmod function") {
-    runQueryAndCompare("SELECT pmod(cast(l_orderkey as int), 3) from lineitem 
limit 1") {
-      checkGlutenOperatorMatch[ProjectExecTransformer]
-    }
-  }
-
   testWithMinSparkVersion("Test array_append function - INT", "3.4") {
     withTempPath {
       path =>
@@ -250,9 +208,9 @@ abstract class ScalarFunctionsValidateSuite extends 
FunctionsValidateSuite {
   }
 
   test("chr function") {
-    val df = runQueryAndCompare(
-      "SELECT chr(l_orderkey + 64) " +
-        "from lineitem limit 1") { _ => }
+    val df = runQueryAndCompare("SELECT chr(l_orderkey + 64) from lineitem 
limit 1") {
+      checkGlutenOperatorMatch[ProjectExecTransformer]
+    }
     checkLengthAndPlan(df, 1)
   }
 
@@ -266,42 +224,44 @@ abstract class ScalarFunctionsValidateSuite extends 
FunctionsValidateSuite {
   }
 
   test("abs function") {
-    val df = runQueryAndCompare(
-      "SELECT abs(l_orderkey) " +
-        "from lineitem limit 1") { _ => }
+    val df = runQueryAndCompare("SELECT abs(l_orderkey) from lineitem limit 
1") {
+      checkGlutenOperatorMatch[ProjectExecTransformer]
+    }
     checkLengthAndPlan(df, 1)
   }
 
   test("ceil function") {
-    val df = runQueryAndCompare(
-      "SELECT ceil(cast(l_orderkey as long)) " +
-        "from lineitem limit 1") { _ => }
+    val df = runQueryAndCompare("SELECT ceil(cast(l_orderkey as long)) from 
lineitem limit 1") {
+      checkGlutenOperatorMatch[ProjectExecTransformer]
+    }
     checkLengthAndPlan(df, 1)
   }
 
   test("floor function") {
-    val df = runQueryAndCompare(
-      "SELECT floor(cast(l_orderkey as long)) " +
-        "from lineitem limit 1") { _ => }
+    val df = runQueryAndCompare("SELECT floor(cast(l_orderkey as long)) from 
lineitem limit 1") {
+      checkGlutenOperatorMatch[ProjectExecTransformer]
+    }
     checkLengthAndPlan(df, 1)
   }
 
   test("exp function") {
-    val df = spark.sql("SELECT exp(l_orderkey) from lineitem limit 1")
+    val df = runQueryAndCompare("SELECT exp(l_orderkey) from lineitem limit 
1") {
+      checkGlutenOperatorMatch[ProjectExecTransformer]
+    }
     checkLengthAndPlan(df, 1)
   }
 
   test("power function") {
-    val df = runQueryAndCompare(
-      "SELECT power(l_orderkey, 2.0) " +
-        "from lineitem limit 1") { _ => }
+    val df = runQueryAndCompare("SELECT power(l_orderkey, 2) from lineitem 
limit 1") {
+      checkGlutenOperatorMatch[ProjectExecTransformer]
+    }
     checkLengthAndPlan(df, 1)
   }
 
   test("pmod function") {
-    val df = runQueryAndCompare(
-      "SELECT pmod(cast(l_orderkey as int), 3) " +
-        "from lineitem limit 1") { _ => }
+    val df = runQueryAndCompare("SELECT pmod(cast(l_orderkey as int), 3) from 
lineitem limit 1") {
+      checkGlutenOperatorMatch[ProjectExecTransformer]
+    }
     checkLengthAndPlan(df, 1)
   }
 


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

Reply via email to