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 d1d390091 [VL] Use collect_list aggregate function in velox (#5285)
d1d390091 is described below
commit d1d39009181a7b22956cbcd03693da22d979bad3
Author: Joey <[email protected]>
AuthorDate: Sun Apr 7 14:34:26 2024 +0800
[VL] Use collect_list aggregate function in velox (#5285)
---
cpp/velox/substrait/SubstraitParser.cc | 3 +--
.../src/main/scala/org/apache/gluten/extension/RewriteCollect.scala | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/cpp/velox/substrait/SubstraitParser.cc
b/cpp/velox/substrait/SubstraitParser.cc
index 0354ee4cb..9dc45a5fb 100644
--- a/cpp/velox/substrait/SubstraitParser.cc
+++ b/cpp/velox/substrait/SubstraitParser.cc
@@ -401,8 +401,7 @@ std::unordered_map<std::string, std::string>
SubstraitParser::substraitVeloxFunc
{"murmur3hash", "hash_with_seed"},
{"modulus", "remainder"},
{"date_format", "format_datetime"},
- {"collect_set", "set_agg"},
- {"collect_list", "array_agg"}};
+ {"collect_set", "set_agg"}};
const std::unordered_map<std::string, std::string> SubstraitParser::typeMap_ =
{
{"bool", "BOOLEAN"},
diff --git
a/gluten-core/src/main/scala/org/apache/gluten/extension/RewriteCollect.scala
b/gluten-core/src/main/scala/org/apache/gluten/extension/RewriteCollect.scala
index 91283f3f2..3b6710857 100644
---
a/gluten-core/src/main/scala/org/apache/gluten/extension/RewriteCollect.scala
+++
b/gluten-core/src/main/scala/org/apache/gluten/extension/RewriteCollect.scala
@@ -20,7 +20,7 @@ import org.apache.gluten.backendsapi.BackendsApiManager
import org.apache.gluten.utils.PullOutProjectHelper
import org.apache.spark.sql.catalyst.expressions.{And, Attribute,
AttributeSet, If, IsNotNull, IsNull, Literal, NamedExpression}
-import
org.apache.spark.sql.catalyst.expressions.aggregate.{AggregateExpression,
CollectList, CollectSet, Complete, Final, Partial}
+import
org.apache.spark.sql.catalyst.expressions.aggregate.{AggregateExpression,
CollectSet, Complete, Final, Partial}
import org.apache.spark.sql.catalyst.rules.Rule
import org.apache.spark.sql.execution.SparkPlan
import org.apache.spark.sql.execution.aggregate.BaseAggregateExec
@@ -53,7 +53,7 @@ object RewriteCollect extends Rule[SparkPlan] with
PullOutProjectHelper {
private def shouldReplaceNullToEmptyArray(ae: AggregateExpression): Boolean
= {
ae.aggregateFunction match {
- case _: CollectSet | _: CollectList =>
+ case _: CollectSet =>
ae.mode match {
case Final | Complete => true
case _ => false
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]