1. [SPARK-28088][SQL] Enhance LPAD/RPAD function (details)
Commit c7f0301477da19b41380cef218da447dc8f85a0e by dhyun
[SPARK-28088][SQL] Enhance LPAD/RPAD function
## What changes were proposed in this pull request?
This pr enhances `LPAD`/`RPAD` function to make `pad` parameter
PostgreSQL, Vertica, Teradata, Oracle and DB2 support make `pad`
parameter optional. MySQL, Hive and Presto does not support make `pad`
parameter optional. SQL Server does not have `lapd`/`rpad` function.
``` postgres=# select substr(version(), 0, 16), lpad('hi', 5),
rpad('hi', 5);
    substr      | lpad  | rpad
PostgreSQL 11.3 |    hi | hi
(1 row)
``` dbadmin=> select version(), lpad('hi', 5), rpad('hi', 5);
             version               | lpad  | rpad
Vertica Analytic Database v9.1.1-0 |    hi | hi
(1 row)
More details:
## How was this patch tested?
unit tests
Closes #24899 from wangyum/SPARK-28088.
Authored-by: Yuming Wang <> Signed-off-by: Dongjoon Hyun
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala (diff)
The file was modifiedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala (diff)