You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2023/03/06 08:59:00 UTC
[jira] [Updated] (IGNITE-18965) Sql. CREATE TABLE fails when a column with DEFAULT constraint NULL is present.
[ https://issues.apache.org/jira/browse/IGNITE-18965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maksim Zhuravkov updated IGNITE-18965:
--------------------------------------
Labels: calcite2-required calcite3-required ignite-3 (was: ignite-3)
> Sql. CREATE TABLE fails when a column with DEFAULT constraint NULL is present.
> ------------------------------------------------------------------------------
>
> Key: IGNITE-18965
> URL: https://issues.apache.org/jira/browse/IGNITE-18965
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Maksim Zhuravkov
> Priority: Minor
> Labels: calcite2-required, calcite3-required, ignite-3
> Fix For: 3.0.0-beta2
>
>
> Default constraint with value = NULL causes an error.
> {code:java}
> CREATE TABLE tbl(id int PRIMARY KEY, val INTEGER DEFAULT NULL)
> {code}
> {code:java}
> Caused by: java.lang.ClassCastException: Cannot cast org.apache.calcite.rel.metadata.NullSentinel$1 to java.lang.Integer
> at java.base/java.lang.Class.cast(Class.java:3605)
> at org.apache.calcite.sql.SqlLiteral.getValueAs(SqlLiteral.java:288)
> at org.apache.ignite.internal.sql.engine.prepare.ddl.DdlSqlToCommandConverter.fromLiteral(DdlSqlToCommandConverter.java:799)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)