-
- Downloads
[SPARK-20730][SQL] Add an optimizer rule to combine nested Concat
## What changes were proposed in this pull request? This pr added a new Optimizer rule to combine nested Concat. The master supports a pipeline operator '||' to concatenate strings in #17711 (This pr is follow-up). Since the parser currently generates nested Concat expressions, the optimizer needs to combine the nested expressions. ## How was this patch tested? Added tests in `CombineConcatSuite` and `SQLQueryTestSuite`. Author: Takeshi Yamamuro <yamamuro@apache.org> Closes #17970 from maropu/SPARK-20730.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala 2 additions, 1 deletion...a/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala 26 additions, 0 deletions...org/apache/spark/sql/catalyst/optimizer/expressions.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/CombineConcatsSuite.scala 75 additions, 0 deletions...he/spark/sql/catalyst/optimizer/CombineConcatsSuite.scala
- sql/core/src/test/resources/sql-tests/inputs/string-functions.sql 4 additions, 0 deletions.../src/test/resources/sql-tests/inputs/string-functions.sql
- sql/core/src/test/resources/sql-tests/results/string-functions.sql.out 27 additions, 1 deletion...test/resources/sql-tests/results/string-functions.sql.out
Loading
Please register or sign in to comment