[
https://issues.apache.org/jira/browse/IGNITE-28888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksey Plekhanov updated IGNITE-28888:
---------------------------------------
Description:
Reproducer:
{noformat}
IgniteSchema schema = createSchema(createTable("T",
IgniteDistributions.single(), "UID", SqlTypeName.UUID));
UUID uuid1 = UUID.randomUUID();
UUID uuid2 = UUID.randomUUID();
assertPlan("SELECT * FROM t WHERE uid in ('" + uuid1 + "', '" + uuid2 +
"')", schema, isTableScan("T"));
{noformat}
Fails with:
{noformat}
Caused by: java.lang.UnsupportedOperationException: Unsupported type when
convertTypeToSpec: UUID
at
org.apache.calcite.sql.type.SqlTypeUtil.convertTypeToSpec(SqlTypeUtil.java:1174)
at
org.apache.calcite.sql.type.SqlTypeUtil.convertTypeToSpec(SqlTypeUtil.java:1196)
at
org.apache.ignite.internal.processors.query.calcite.prepare.IgniteTypeCoercion.castTo(IgniteTypeCoercion.java:306)
at
org.apache.ignite.internal.processors.query.calcite.prepare.IgniteTypeCoercion.coerceColumnType(IgniteTypeCoercion.java:273)
at
org.apache.calcite.sql.validate.implicit.TypeCoercionImpl.inOperationCoercion(TypeCoercionImpl.java:581)
at
org.apache.calcite.sql.fun.SqlInOperator.deriveType(SqlInOperator.java:156)
{noformat}
was:
Reproducer:
{noformat}
IgniteSchema schema = createSchema(createTable("T",
IgniteDistributions.single(), "UID", SqlTypeName.UUID));
UUID uuid1 = UUID.randomUUID();
UUID uuid2 = UUID.randomUUID();
assertPlan("SELECT * FROM t WHERE uid in ('" + uuid1 + "', '" + uuid2 +
"')", schema, isTableScan("T"));
{noformat}
Fails with:
{noformat}
Caused by: java.lang.UnsupportedOperationException: Unsupported type when
convertTypeToSpec: UUID
at
org.apache.calcite.sql.type.SqlTypeUtil.convertTypeToSpec(SqlTypeUtil.java:1174)
at
org.apache.calcite.sql.type.SqlTypeUtil.convertTypeToSpec(SqlTypeUtil.java:1196)
at
org.apache.ignite.internal.processors.query.calcite.prepare.IgniteTypeCoercion.castTo(IgniteTypeCoercion.java:306)
at
org.apache.ignite.internal.processors.query.calcite.prepare.IgniteTypeCoercion.coerceColumnType(IgniteTypeCoercion.java:273)
at
org.apache.calcite.sql.validate.implicit.TypeCoercionImpl.inOperationCoercion(TypeCoercionImpl.java:581)
at
org.apache.calcite.sql.fun.SqlInOperator.deriveType(SqlInOperator.java:156){noformat}
{noformat}
> Calcite engine. UUID type derive fail when converting from literal
> -------------------------------------------------------------------
>
> Key: IGNITE-28888
> URL: https://issues.apache.org/jira/browse/IGNITE-28888
> Project: Ignite
> Issue Type: Bug
> Reporter: Aleksey Plekhanov
> Priority: Major
>
> Reproducer:
> {noformat}
> IgniteSchema schema = createSchema(createTable("T",
> IgniteDistributions.single(), "UID", SqlTypeName.UUID));
> UUID uuid1 = UUID.randomUUID();
> UUID uuid2 = UUID.randomUUID();
> assertPlan("SELECT * FROM t WHERE uid in ('" + uuid1 + "', '" + uuid2
> + "')", schema, isTableScan("T"));
> {noformat}
> Fails with:
> {noformat}
> Caused by: java.lang.UnsupportedOperationException: Unsupported type when
> convertTypeToSpec: UUID
> at
> org.apache.calcite.sql.type.SqlTypeUtil.convertTypeToSpec(SqlTypeUtil.java:1174)
> at
> org.apache.calcite.sql.type.SqlTypeUtil.convertTypeToSpec(SqlTypeUtil.java:1196)
> at
> org.apache.ignite.internal.processors.query.calcite.prepare.IgniteTypeCoercion.castTo(IgniteTypeCoercion.java:306)
> at
> org.apache.ignite.internal.processors.query.calcite.prepare.IgniteTypeCoercion.coerceColumnType(IgniteTypeCoercion.java:273)
> at
> org.apache.calcite.sql.validate.implicit.TypeCoercionImpl.inOperationCoercion(TypeCoercionImpl.java:581)
> at
> org.apache.calcite.sql.fun.SqlInOperator.deriveType(SqlInOperator.java:156)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)