cloud-fan commented on a change in pull request #30299:
URL: https://github.com/apache/spark/pull/30299#discussion_r521545103
##########
File path: sql/core/src/test/resources/sql-tests/inputs/datetime.sql
##########
@@ -149,7 +149,7 @@ select to_timestamp('2019-10-06 A', 'yyyy-MM-dd GGGGG');
select to_timestamp('22 05 2020 Friday', 'dd MM yyyy EEEEEE');
select to_timestamp('22 05 2020 Friday', 'dd MM yyyy EEEEE');
select unix_timestamp('22 05 2020 Friday', 'dd MM yyyy EEEEE');
-select from_json('{"time":"26/October/2015"}', 'time Timestamp',
map('timestampFormat', 'dd/MMMMM/yyyy'));
-select from_json('{"date":"26/October/2015"}', 'date Date', map('dateFormat',
'dd/MMMMM/yyyy'));
-select from_csv('26/October/2015', 'time Timestamp', map('timestampFormat',
'dd/MMMMM/yyyy'));
-select from_csv('26/October/2015', 'date Date', map('dateFormat',
'dd/MMMMM/yyyy'));
+select from_json('{"ts":"26/October/2015"}', 'ts Timestamp',
map('timestampFormat', 'dd/MMMMM/yyyy'));
Review comment:
It was a bug before that the parser used in `from_json` to parse the
schema string sticks to the configs of the first created session in the current
thread. Now the parser always use the active conf, and ANSI test fails here
because `time` is a reserved keyword.
We probably need a separate PR for this bug.
----------------------------------------------------------------
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]