[
https://issues.apache.org/jira/browse/CALCITE-6631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiong duan updated CALCITE-6631:
--------------------------------
Description:
The unit test:
{code:java}
RelDataType longJavaType = this.typeFactory.createJavaType(Long.class);
@Test void testComparisonJavaTypeAndSqlTypeCoercion() {
final Fixture f = fixture();
f.comparisonCommonType(f.intType, f.longJavaType, null);
}{code}
The common type for a comparison operator when when comparing a Java type long
with a SQL type INTEGER should return LONG type or NULL, now return the INTEGER
type.
was:
The unit test:
{code:java}
@Test void testComparisonJavaTypeAndSqlTypeCoercion() {
final Fixture f = fixture();
f.comparisonCommonType(f.intType, f.longJavaType, null);
}{code}
The common type for a comparison operator when when comparing a Java type long
with a SQL type INTEGER should return LONG type or NULL, now return the INTEGER
type.
> The common type for a comparison operator returns the wrong type when
> comparing a Java type long with a SQL type INTEGER
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-6631
> URL: https://issues.apache.org/jira/browse/CALCITE-6631
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.38.0
> Reporter: xiong duan
> Priority: Major
> Fix For: 1.39.0
>
>
> The unit test:
> {code:java}
> RelDataType longJavaType = this.typeFactory.createJavaType(Long.class);
> @Test void testComparisonJavaTypeAndSqlTypeCoercion() {
> final Fixture f = fixture();
> f.comparisonCommonType(f.intType, f.longJavaType, null);
> }{code}
> The common type for a comparison operator when when comparing a Java type
> long with a SQL type INTEGER should return LONG type or NULL, now return the
> INTEGER type.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)