You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
however, it's not consistently applied to other literals:
trino> SELECT try(DECIMAL '1.2.3');
Query 20220124_091251_00002_v4784 failed: Invalid decimal value '1.2.3'
java.lang.IllegalArgumentException: Invalid decimal value '1.2.3'
at io.trino.spi.type.Decimals.parse(Decimals.java:91)
at io.trino.spi.type.Decimals.parse(Decimals.java:78)
at io.trino.sql.analyzer.ExpressionAnalyzer$Visitor.visitDecimalLiteral(ExpressionAnalyzer.java:1019)
trino> SELECT try(TIMESTAMP 'right now');
Query 20220124_091326_00004_v4784 failed: line 1:12: 'right now' is not a valid timestamp literal
io.trino.spi.TrinoException: line 1:12: 'right now' is not a valid timestamp literal
at io.trino.sql.analyzer.SemanticExceptions.semanticException(SemanticExceptions.java:48)
at io.trino.sql.analyzer.ExpressionAnalyzer$Visitor.visitTimestampLiteral(ExpressionAnalyzer.java:1098)
The text was updated successfully, but these errors were encountered:
observed
This catches the error
The behavior is even test-covered at
trino/testing/trino-tests/src/test/java/io/trino/tests/AbstractTestEngineOnlyQueries.java
Line 5443 in c0276ce
however, it's not consistently applied to other literals:
The text was updated successfully, but these errors were encountered: