This is an automated email from the ASF dual-hosted git repository.
yuanzhou 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 708a50f67 [GLUTEN-5341] Fix and enable all ut of
VeloxAggregateFunctionsSuite (#5466)
708a50f67 is described below
commit 708a50f673cbdd9d237df3ba5176f4a48e2869fe
Author: 高阳阳 <[email protected]>
AuthorDate: Sat Apr 20 08:30:23 2024 +0800
[GLUTEN-5341] Fix and enable all ut of VeloxAggregateFunctionsSuite (#5466)
* enble all ut for VeloxAggregateFunctionsSuite for spark 3.5
---
.../gluten/execution/VeloxAggregateFunctionsSuite.scala | 12 ++++--------
.../org/apache/gluten/sql/shims/spark35/Spark35Shims.scala | 12 ++++++++++--
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git
a/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala
b/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala
index df0817410..394c4e016 100644
---
a/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala
+++
b/backends-velox/src/test/scala/org/apache/gluten/execution/VeloxAggregateFunctionsSuite.scala
@@ -371,8 +371,7 @@ abstract class VeloxAggregateFunctionsSuite extends
VeloxWholeStageTransformerSu
}
}
- // Disable for Spark3.5.
- testWithSpecifiedSparkVersion("regr_r2", Some("3.3"), Some("3.4")) {
+ testWithSpecifiedSparkVersion("regr_r2", Some("3.3")) {
runQueryAndCompare("""
|select regr_r2(l_partkey, l_suppkey) from lineitem;
|""".stripMargin) {
@@ -391,8 +390,7 @@ abstract class VeloxAggregateFunctionsSuite extends
VeloxWholeStageTransformerSu
}
}
- // Disable for Spark3.5.
- testWithSpecifiedSparkVersion("regr_slope", Some("3.4"), Some("3.4")) {
+ testWithSpecifiedSparkVersion("regr_slope", Some("3.4")) {
runQueryAndCompare("""
|select regr_slope(l_partkey, l_suppkey) from
lineitem;
|""".stripMargin) {
@@ -411,8 +409,7 @@ abstract class VeloxAggregateFunctionsSuite extends
VeloxWholeStageTransformerSu
}
}
- // Disable for Sparke3.5.
- testWithSpecifiedSparkVersion("regr_intercept", Some("3.4"), Some("3.4")) {
+ testWithSpecifiedSparkVersion("regr_intercept", Some("3.4")) {
runQueryAndCompare("""
|select regr_intercept(l_partkey, l_suppkey) from
lineitem;
|""".stripMargin) {
@@ -431,8 +428,7 @@ abstract class VeloxAggregateFunctionsSuite extends
VeloxWholeStageTransformerSu
}
}
- // Disable for Sparke3.5.
- testWithSpecifiedSparkVersion("regr_sxy regr_sxx regr_syy", Some("3.4"),
Some("3.4")) {
+ testWithSpecifiedSparkVersion("regr_sxy regr_sxx regr_syy", Some("3.4")) {
runQueryAndCompare("""
|select regr_sxy(l_quantity, l_tax) from lineitem;
|""".stripMargin) {
diff --git
a/shims/spark35/src/main/scala/org/apache/gluten/sql/shims/spark35/Spark35Shims.scala
b/shims/spark35/src/main/scala/org/apache/gluten/sql/shims/spark35/Spark35Shims.scala
index 70e0b73ed..1e23b49f9 100644
---
a/shims/spark35/src/main/scala/org/apache/gluten/sql/shims/spark35/Spark35Shims.scala
+++
b/shims/spark35/src/main/scala/org/apache/gluten/sql/shims/spark35/Spark35Shims.scala
@@ -29,7 +29,7 @@ import org.apache.spark.sql.{AnalysisException, SparkSession}
import org.apache.spark.sql.catalyst.{ExtendedAnalysisException, InternalRow}
import org.apache.spark.sql.catalyst.catalog.BucketSpec
import org.apache.spark.sql.catalyst.expressions._
-import
org.apache.spark.sql.catalyst.expressions.aggregate.{BloomFilterAggregate,
TypedImperativeAggregate}
+import
org.apache.spark.sql.catalyst.expressions.aggregate.{BloomFilterAggregate,
RegrIntercept, RegrR2, RegrReplacement, RegrSlope, RegrSXY,
TypedImperativeAggregate}
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.catalyst.plans.physical.{ClusteredDistribution,
Distribution}
import org.apache.spark.sql.catalyst.rules.Rule
@@ -71,7 +71,15 @@ class Spark35Shims extends SparkShims {
Sig[Empty2Null](ExpressionNames.EMPTY2NULL))
}
- override def aggregateExpressionMappings: Seq[Sig] = Seq.empty
+ override def aggregateExpressionMappings: Seq[Sig] = {
+ Seq(
+ Sig[RegrR2](ExpressionNames.REGR_R2),
+ Sig[RegrSlope](ExpressionNames.REGR_SLOPE),
+ Sig[RegrIntercept](ExpressionNames.REGR_INTERCEPT),
+ Sig[RegrSXY](ExpressionNames.REGR_SXY),
+ Sig[RegrReplacement](ExpressionNames.REGR_REPLACEMENT)
+ )
+ }
override def convertPartitionTransforms(
partitions: Seq[Transform]): (Seq[String], Option[BucketSpec]) = {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]