You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Steven Talbot (Jira)" <ji...@apache.org> on 2020/08/06 22:45:00 UTC
[jira] [Created] (CALCITE-4165) RelToSqlConverter fails on literal,
untyped nulls
Steven Talbot created CALCITE-4165:
--------------------------------------
Summary: RelToSqlConverter fails on literal, untyped nulls
Key: CALCITE-4165
URL: https://issues.apache.org/jira/browse/CALCITE-4165
Project: Calcite
Issue Type: Bug
Reporter: Steven Talbot
Simple test in RelToSqlConverterTest (the expected SQL is probably not exactly the right expected SQL, but the test explodes on 1.24 so it doesn't matter for our purposes):
{code:java}
@Test void testUntypedNull() {
final String sql = "SELECT NULL FROM \"warehouse_class\"";
final String expected = "SELECT NULL FROM \"warehouse_class\"";
sql(sql).ok(expected);
}{code}
stack trace top (on current master ad53962f76a48e2627da1c155eb5f005150d3dcb)
{noformat}
Unsupported type when convertTypeToSpec: NULLUnsupported type when convertTypeToSpec: NULL
java.lang.UnsupportedOperationException: Unsupported type when convertTypeToSpec: NULL at org.apache.calcite.sql.type.SqlTypeUtil.convertTypeToSpec(SqlTypeUtil.java:1027)
at org.apache.calcite.sql.SqlDialect.getCastSpec(SqlDialect.java:778)
at org.apache.calcite.rel.rel2sql.RelToSqlConverter.castNullType(RelToSqlConverter.java:361){noformat}
Seems to be an unintended side-effect of [https://github.com/apache/calcite/commit/8db7c9d6ddc317b5fee8705e136c0794c44b463a#diff-fe53d9c0364e000f0aeafa786587e815R1079]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)