Thomas Rebele created CALCITE-7419:
--------------------------------------
Summary: SqlTypeName#getLimit throws an AssertionError for FLOAT,
DOUBLE, and REAL
Key: CALCITE-7419
URL: https://issues.apache.org/jira/browse/CALCITE-7419
Project: Calcite
Issue Type: Task
Reporter: Thomas Rebele
The following code
{code:java}
SqlTypeName.FLOAT.getLimit(false, SqlTypeName.Limit.OVERFLOW, false, -1, -1);
SqlTypeName.DOUBLE.getLimit(false, SqlTypeName.Limit.OVERFLOW, false, -1, -1);
SqlTypeName.REAL.getLimit(false, SqlTypeName.Limit.OVERFLOW, false, -1, -1);
{code}
leads to an exception:
{code:java}
java.lang.AssertionError: Was not expecting value 'FLOAT' for enumeration
'org.apache.calcite.sql.type.SqlTypeName' in this context
at org.apache.calcite.util.Util.unexpected(Util.java:1937)
at org.apache.calcite.sql.type.SqlTypeName.getLimit(SqlTypeName.java:817)
{code}
If the limit is not supported for these types, it should be mentioned in its
Javadoc.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)