This is an automated email from the ASF dual-hosted git repository.
beliefer pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 93a2a6d2f154 [SPARK-50692][SQL][FOLLOWUP] Add comments for LPAD and
RPAD
93a2a6d2f154 is described below
commit 93a2a6d2f154992120804a230978b7c5e6fd05bf
Author: beliefer <[email protected]>
AuthorDate: Mon Feb 17 14:32:42 2025 +0800
[SPARK-50692][SQL][FOLLOWUP] Add comments for LPAD and RPAD
### What changes were proposed in this pull request?
This PR propose to add comments for `LPAD` and `RPAD`.
### Why are the changes needed?
https://github.com/apache/spark/pull/49325 had added pushdown support for
`LPAD` and `RPAD`. But forget the comments.
### Does this PR introduce _any_ user-facing change?
'No'.
New feature.
### How was this patch tested?
GA.
### Was this patch authored or co-authored using generative AI tooling?
'No'.
Closes #49957 from beliefer/SPARK-50692_followup.
Authored-by: beliefer <[email protected]>
Signed-off-by: beliefer <[email protected]>
(cherry picked from commit e1f7851bdee84c63e1bf17454e3f7e30999e6ee1)
Signed-off-by: beliefer <[email protected]>
---
.../sql/connector/expressions/GeneralScalarExpression.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git
a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/GeneralScalarExpression.java
b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/GeneralScalarExpression.java
index 859660600214..dc8f0426d77c 100644
---
a/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/GeneralScalarExpression.java
+++
b/sql/catalyst/src/main/java/org/apache/spark/sql/connector/expressions/GeneralScalarExpression.java
@@ -416,6 +416,18 @@ import
org.apache.spark.sql.internal.connector.ExpressionWithToString;
* <li>Since version: 3.4.0</li>
* </ul>
* </li>
+ * <li>Name: <code>LPAD</code>
+ * <ul>
+ * <li>SQL semantic: <code>LPAD(str, len[, pad])</code></li>
+ * <li>Since version: 4.0.0</li>
+ * </ul>
+ * </li>
+ * <li>Name: <code>RPAD</code>
+ * <ul>
+ * <li>SQL semantic: <code>RPAD(str, len[, pad])</code></li>
+ * <li>Since version: 4.0.0</li>
+ * </ul>
+ * </li>
* </ol>
* Note: SQL semantic conforms ANSI standard, so some expressions are not
supported when ANSI off,
* including: add, subtract, multiply, divide, remainder, pmod.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]