cloud-fan commented on a change in pull request #30442:
URL: https://github.com/apache/spark/pull/30442#discussion_r528557886
##########
File path: docs/sql-ref-ansi-compliance.md
##########
@@ -136,12 +136,17 @@ The behavior of some SQL functions can be different under
ANSI mode (`spark.sql.
- `element_at`: This function throws `NoSuchElementException` if key does
not exist in map.
- `elt`: This function throws `ArrayIndexOutOfBoundsException` if using
invalid indices.
- `parse_url`: This function throws `IllegalArgumentException` if an input
string is not a valid url.
+ - `to_date` This function should fail with an exception if the input string
can't be parsed, or the pattern string is invalid.
+ - `to_timestamp` This function should fail with an exception if the input
string can't be parsed, or the pattern string is invalid.
+ - `unix_timestamp` This function should fail with an exception if the input
string can't be parsed, or the pattern string is invalid.
+ - `to_unix_timestamp` This function should fail with an exception if the
input string can't be parsed, or the pattern string is invalid.
### SQL Operators
The behavior of some SQL operators can be different under ANSI mode
(`spark.sql.ansi.enabled=true`).
- `array_col[index]`: This operator throws `ArrayIndexOutOfBoundsException`
if using invalid indices.
- `map_col[key]`: This operator throws `NoSuchElementException` if key does
not exist in map.
+ - `cast to timestamp`: This operator should fail with an exception if the
input string can't be parsed.
Review comment:
nit: `CAST(string_col AS TIMESTAMP)` to be user-facing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]