[ https://issues.apache.org/jira/browse/IGNITE-24797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Steshin updated IGNITE-24797: -------------------------------------- Ignite Flags: Release Notes Required (was: Docs Required,Release Notes Required) > Calcite. Unable to process default date literal on DDL. > ------------------------------------------------------- > > Key: IGNITE-24797 > URL: https://issues.apache.org/jira/browse/IGNITE-24797 > Project: Ignite > Issue Type: Bug > Reporter: Vladimir Steshin > Priority: Major > Labels: calcite, ignite-2, ise > > *Reproducer:* > {code:java} > public class DateTimeTest extends AbstractBasicIntegrationTransactionalTest { > @Test > public void testDefaultTemporalValues() throws Exception { > sql(client, "CREATE TABLE TBL(ID INTEGER, DT DATE DEFAULT > '2020-07-07', TT TIME DEFAULT '14:30:43', " + > "TS TIMESTAMP DEFAULT '2023-07-05 01:02:03.456')"); > sql("INSERT INTO TBL(ID) VALUES(1)"); > assertQuery("SELECT * FROM TBL") > .returns(1, sqlDate("2020-07-07"), sqlTime("14:30:43"), > sqlTimestamp("2023-07-05 01:02:03.456'")) > .check(); > } > } > {code} > *Result:* > {code:java} > java.lang.ClassCastException: class > org.apache.calcite.sql.SqlCharStringLiteral cannot be cast to class > org.apache.calcite.sql.SqlUnknownLiteral > (org.apache.calcite.sql.SqlCharStringLiteral and > org.apache.calcite.sql.SqlUnknownLiteral are in unnamed module of loader > 'app') > at > org.apache.ignite.internal.processors.query.calcite.util.TypeUtils.fromLiteral(TypeUtils.java:476) > at > org.apache.ignite.internal.processors.query.calcite.prepare.ddl.DdlSqlToCommandConverter.convertCreateTable(DdlSqlToCommandConverter.java:236) > at > org.apache.ignite.internal.processors.query.calcite.prepare.ddl.DdlSqlToCommandConverter.convert(DdlSqlToCommandConverter.java:158) > at > org.apache.ignite.internal.processors.query.calcite.prepare.PrepareServiceImpl.prepareDdl(PrepareServiceImpl.java:132) > {code} > Same for TIME and TIMESTAMP. > *Reason:* > We cast SqlCharStringLiteral to SqlUnknownLiteral. Different types. -- This message was sent by Atlassian Jira (v8.20.10#820010)