Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The following RelMetadataTest test fails:
@Test void testOverNoPartitioning() {
sql("select max(empno) over (rows between 2 preceding and 0 following) from emp")
.assertThatAreColumnsUnique(bitSetOf(0), is(false))
.assertThatUniqueKeysAre();
}
With this error:
java.lang.AssertionError: Conversion to relational algebra failed to preserve datatypes:
validated type:
RecordType(INTEGER EXPR$0) NOT NULL
converted type:
RecordType(INTEGER NOT NULL EXPR$0) NOT NULL
rel:
LogicalProject(EXPR$0=[MAX($0) OVER ()])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
at org.apache.calcite.sql2rel.SqlToRelConverter.checkConvertedType(SqlToRelConverter.java:507)
at org.apache.calcite.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:622)
at org.apache.calcite.sql.test.AbstractSqlTester.convertSqlToRel2(AbstractSqlTester.java:541)
at org.apache.calcite.sql.test.SqlTester.convertSqlToRel(SqlTester.java:291)
at org.apache.calcite.test.RelMetadataFixture.sqlToRel(RelMetadataFixture.java:189)
at org.apache.calcite.test.RelSupplier$SqlRelSupplier.apply2(RelSupplier.java:104)
at org.apache.calcite.test.RelMetadataFixture.toRel(RelMetadataFixture.java:195)
at org.apache.calcite.test.RelMetadataFixture.assertThatAreColumnsUnique(RelMetadataFixture.java:508)
Attachments
Issue Links
- relates to
-
CALCITE-6044 RelMetadataQuery should regard single-row relational expressions as unique
- Closed