This is an automated email from the ASF dual-hosted git repository.
rui 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 ec3f6b318 [GLUTEN-4039][VL] Support width_bucket function (#5634)
ec3f6b318 is described below
commit ec3f6b318ef09d1f697997efdbb24e75bd2e0835
Author: 高阳阳 <[email protected]>
AuthorDate: Fri May 24 09:27:04 2024 +0800
[GLUTEN-4039][VL] Support width_bucket function (#5634)
---
.../org/apache/gluten/execution/ScalarFunctionsValidateSuite.scala | 7 +++++++
.../scala/org/apache/gluten/expression/ExpressionMappings.scala | 1 +
.../main/scala/org/apache/gluten/expression/ExpressionNames.scala | 1 +
3 files changed, 9 insertions(+)
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 3180842ad..f9ec07619 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
@@ -594,6 +594,13 @@ class ScalarFunctionsValidateSuite extends
FunctionsValidateTest {
}
}
+ testWithSpecifiedSparkVersion("Test width_bucket function", Some("3.4")) {
+ runQueryAndCompare("""SELECT width_bucket(2, 0, 4, 3), l_orderkey
+ | from lineitem limit 100""".stripMargin) {
+ checkGlutenOperatorMatch[ProjectExecTransformer]
+ }
+ }
+
testWithSpecifiedSparkVersion("Test url_decode function", Some("3.4")) {
withTempPath {
path =>
diff --git
a/gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionMappings.scala
b/gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionMappings.scala
index c734967de..14371a71e 100644
---
a/gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionMappings.scala
+++
b/gluten-core/src/main/scala/org/apache/gluten/expression/ExpressionMappings.scala
@@ -275,6 +275,7 @@ object ExpressionMappings {
Sig[PromotePrecision](PROMOTE_PRECISION),
Sig[MonotonicallyIncreasingID](MONOTONICALLY_INCREASING_ID),
Sig[SparkPartitionID](SPARK_PARTITION_ID),
+ Sig[WidthBucket](WIDTH_BUCKET),
// Decimal
Sig[UnscaledValue](UNSCALED_VALUE),
// Generator function
diff --git
a/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala
b/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala
index eded85e06..6e6502c19 100644
---
a/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala
+++
b/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala
@@ -302,6 +302,7 @@ object ExpressionNames {
final val PROMOTE_PRECISION = "promote_precision"
final val SPARK_PARTITION_ID = "spark_partition_id"
final val MONOTONICALLY_INCREASING_ID = "monotonically_increasing_id"
+ final val WIDTH_BUCKET = "width_bucket"
// Directly use child expression transformer
final val KNOWN_NULLABLE = "known_nullable"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]