Jerin John created CALCITE-6092:
-----------------------------------

             Summary: Invalid test cases in CAST String to Time
                 Key: CALCITE-6092
                 URL: https://issues.apache.org/jira/browse/CALCITE-6092
             Project: Calcite
          Issue Type: Bug
            Reporter: Jerin John


Encountered some 
[tests|https://github.com/apache/calcite/blob/590ec85f0fcff7173c288c350c3f60e640976a34/testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java#L1237-L1238]
 within SqlOperatorTest file for the CAST operator on String to Datetime 
conversions, which are found to be invalid time strings on some tested 
instances of DBs like BQ, MySql, Postgres.

It seems these tests were originally ignored as `BAD_DATETIME_MESSAGE` but then 
updated to verify conversion performed by the CAST operator (refer to JIRA 
ticket: CALCITE-5554 and 
[commit)|https://github.com/apache/calcite/commit/625a2e03c4c5583279350bf04e3db2a31b1ec411#diff-fdd0c725fc7c6fd56965f59b1d51e4c7a9b5b5be27da2e54b8b8273dc980cd64R1118-R1119]

Considering that multiple dialects catch these cases as invalid time strings 
for conversion, code should be updated to handle them as exceptions and the 
tests to be corrected to reflect this behavior.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to