From 52463748d804f5e1aa7d55b974c5d9f252771de8 Mon Sep 17 00:00:00 2001 From: zhli1142015 Date: Fri, 12 Jul 2024 10:35:24 +0800 Subject: [PATCH] [VL] Enable repeat function --- .../gluten/execution/ScalarFunctionsValidateSuite.scala | 6 ++++++ cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc | 1 - docs/velox-backend-support-progress.md | 2 +- 3 files changed, 7 insertions(+), 2 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 cb1d63c90a5a7..54b3f466c8d72 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 @@ -1235,4 +1235,10 @@ class ScalarFunctionsValidateSuite extends FunctionsValidateTest { checkGlutenOperatorMatch[ProjectExecTransformer] } } + + test("repeat") { + runQueryAndCompare("select repeat(c_comment, 5) from customer limit 50") { + checkGlutenOperatorMatch[ProjectExecTransformer] + } + } } diff --git a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc index 8e6dd7c1c31f3..6f0b9fadec210 100644 --- a/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc +++ b/cpp/velox/substrait/SubstraitToVeloxPlanValidator.cc @@ -65,7 +65,6 @@ static const std::unordered_set kBlackList = { "concat_ws", "from_json", "json_array_length", - "repeat", "trunc", "sequence", "approx_percentile", diff --git a/docs/velox-backend-support-progress.md b/docs/velox-backend-support-progress.md index 5a2d533763964..8cc235dcd5d24 100644 --- a/docs/velox-backend-support-progress.md +++ b/docs/velox-backend-support-progress.md @@ -171,7 +171,7 @@ Gluten supports 199 functions. (Drag to right to see all data types) | parse_url | | | | | | | | | | | | | | | | | | | | | | | | position | strpos | | | | | | | | | | | | | | | | | | | | | | | printf | | | | | | | | | | | | | | | | | | | | | | | -| repeat | | | | | | | | | | | | | | | | | | | | | | | +| repeat | | repeat | S | | | | | | | | | | | | | | | | | | | | | replace | replace | replace | S | | | | | | | | | | | S | | | | | | | | | | reverse | reverse | | S | | | | | | | | | | | S | | | | | | | | | | right | | | | | | | | | | | | | | | | | | | | | | |