[ https://issues.apache.org/jira/browse/IGNITE-24984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pereslegin updated IGNITE-24984: -------------------------------------- Description: Example: {code:sql} SELECT TIMESTAMP '1234567-12-31 23:59:59'::VARCHAR {code} Returns {noformat} 4567-12-31 23:59:59 {noformat} This affects {{TIMESTAMP}} and {{TIMESTAMP WITH LOCAL TIME ZONE}} literals Looks like this applies only to year of ts type, some examples that works correctly {code:sql} SELECT TIMESTAMP '0000-12-31 23:59:59'; --- Illegal TIMESTAMP literal '0000-12-31 23:59:59': not in format 'yyyy-MM-dd HH:mm:ss' SELECT TIMESTAMP '1234-13-31 24:59:59'; --- Illegal TIMESTAMP literal '1234-13-31 23:59:59': not in format 'yyyy-MM-dd HH:mm:ss' SELECT DATE '12345-12-31' --- Year out of range: [12345] {code} Looks like it should be fixed on the calcite side. was: Simple example: {code:sql} SELECT TIMESTAMP '1234567-12-31 23:59:59'::VARCHAR {code} Returns {noformat} 4567-12-31 23:59:59 {noformat} This affects TIMESTAMP and TIMESTAMP_WITH_LOCAL_TIME_ZONE literals Looks like this applies only to year of ts type, some examples that works correctly {code:sql} SELECT TIMESTAMP '0000-12-31 23:59:59'; --- Illegal TIMESTAMP literal '0000-12-31 23:59:59': not in format 'yyyy-MM-dd HH:mm:ss' SELECT TIMESTAMP '1234-13-31 24:59:59'; --- Illegal TIMESTAMP literal '1234-13-31 23:59:59': not in format 'yyyy-MM-dd HH:mm:ss' SELECT DATE '12345-12-31' --- Year out of range: [12345] {code} Looks like it should be fixed on the calcite side. > Sql. An invalid YEAR field value can be specified in a timestamp literal > ------------------------------------------------------------------------ > > Key: IGNITE-24984 > URL: https://issues.apache.org/jira/browse/IGNITE-24984 > Project: Ignite > Issue Type: Bug > Components: sql > Affects Versions: 3.0 > Reporter: Pavel Pereslegin > Priority: Major > Labels: ignite-3 > > Example: > {code:sql} > SELECT TIMESTAMP '1234567-12-31 23:59:59'::VARCHAR > {code} > Returns > {noformat} > 4567-12-31 23:59:59 > {noformat} > This affects {{TIMESTAMP}} and {{TIMESTAMP WITH LOCAL TIME ZONE}} literals > Looks like this applies only to year of ts type, some examples that works > correctly > {code:sql} > SELECT TIMESTAMP '0000-12-31 23:59:59'; --- Illegal TIMESTAMP literal > '0000-12-31 23:59:59': not in format 'yyyy-MM-dd HH:mm:ss' > SELECT TIMESTAMP '1234-13-31 24:59:59'; --- Illegal TIMESTAMP literal > '1234-13-31 23:59:59': not in format 'yyyy-MM-dd HH:mm:ss' > SELECT DATE '12345-12-31' --- Year out of range: [12345] > {code} > Looks like it should be fixed on the calcite side. -- This message was sent by Atlassian Jira (v8.20.10#820010)