FailedChanges

Summary

  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
optional.
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.
**PostgreSQL**:
``` postgres=# select substr(version(), 0, 16), lpad('hi', 5),
rpad('hi', 5);
    substr      | lpad  | rpad
-----------------+-------+-------
PostgreSQL 11.3 |    hi | hi
(1 row)
```
**Vertica**:
``` dbadmin=> select version(), lpad('hi', 5), rpad('hi', 5);
             version               | lpad  | rpad
------------------------------------+-------+-------
Vertica Analytic Database v9.1.1-0 |    hi | hi
(1 row)
```
**Teradata**:
![image](https://user-images.githubusercontent.com/5399861/59656550-89a49300-91d0-11e9-9f26-ed554f49ea34.png)
**Oracle**:
![image](https://user-images.githubusercontent.com/5399861/59656591-a9d45200-91d0-11e9-8b0e-3e1f75983099.png)
**DB2**:
![image](https://user-images.githubusercontent.com/5399861/59656468-3e8a8000-91d0-11e9-8826-0d854ed7f397.png)
More details: https://www.postgresql.org/docs/11/functions-string.html
https://docs.teradata.com/reader/kmuOwjp1zEYg98JsB8fu_A/e5w8LujIQDlVmRSww2E27A
## How was this patch tested?
unit tests
Closes #24899 from wangyum/SPARK-28088.
Authored-by: Yuming Wang <yumwang@ebay.com> Signed-off-by: Dongjoon Hyun
<dhyun@apple.com>
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)