LucidDB / luciddb

DEFUNCT: See README
https://github.com/LucidDB/luciddb
Apache License 2.0
53 stars 24 forks source link

[FRG-64] COALESCE with a single parameter causes assertion failure #806

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[reporter="jvs", created="Wed, 8 Mar 2006 19:23:40 -0500 (GMT-05:00)"] 0: jdbc:farrago:> select coalesce(deptno) from sales.depts;
Error: java.lang.AssertionError: 1 (state=,code=0)
net.sf.farrago.util.FarragoUtil$FarragoSqlException: java.lang.AssertionError: 1
        at org.eigenbase.sql.fun.SqlCaseOperator.inferTypeFromOperands(SqlCaseOperator.java:257)
        at org.eigenbase.sql.fun.SqlCaseOperator.inferReturnType(SqlCaseOperator.java:207)
        at org.eigenbase.rex.RexBuilder.deriveReturnType(RexBuilder.java:222)
        at org.eigenbase.rex.RexBuilder.makeCall(RexBuilder.java:179)
        at net.sf.farrago.query.FarragoRexBuilder.makeCall(FarragoRexBuilder.java:80)
        at org.eigenbase.sql2rel.StandardConvertletTable.convertCase(StandardConvertletTable.java:264)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.eigenbase.sql2rel.ReflectiveConvertletTable$1.convertCall(ReflectiveConvertletTable.java:105)
        at org.eigenbase.sql2rel.SqlNodeToRexConverterImpl.convertCall(SqlNodeToRexConverterImpl.java:64)
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.visit(SqlToRelConverter.java:1852)
        at org.eigenbase.sql.SqlCall.accept(SqlCall.java:164)
        at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:1785)
        at org.eigenbase.sql2rel.SqlToRelConverter.convertSelectList(SqlToRelConverter.java:1376)
        at org.eigenbase.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:258)
        at org.eigenbase.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:1036)
        at org.eigenbase.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:210)
        at org.eigenbase.oj.stmt.OJPreparingStmt.prepareSql(OJPreparingStmt.java:231)
        at net.sf.farrago.query.FarragoPreparingStmt.prepare(FarragoPreparingStmt.java:238)
        at net.sf.farrago.db.FarragoDatabase$2.initializeEntry(FarragoDatabase.java:654)
        at net.sf.farrago.util.FarragoObjectCache.pin(FarragoObjectCache.java:157)
        at net.sf.farrago.db.FarragoDatabase.prepareStmtImpl(FarragoDatabase.java:664)
        at net.sf.farrago.db.FarragoDatabase.prepareStmt(FarragoDatabase.java:544)
        at net.sf.farrago.db.FarragoDbSession.prepareImpl(FarragoDbSession.java:777)
        at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:728)
        at net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:156)
        at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:104)
        at sqlline.SqlLine$Commands.execute(Unknown Source)
        at sqlline.SqlLine$Commands.sql(Unknown Source)
        at sqlline.SqlLine.dispatch(Unknown Source)
        at sqlline.SqlLine.begin(Unknown Source)
        at sqlline.SqlLine.mainWithInputRedirection(Unknown Source)
        at sqlline.SqlLine.main(Unknown Source)
0

dynamobi-build commented 12 years ago

[author="jvs", created="Thu, 31 Aug 2006 23:16:25 -0500 (GMT-05:00)"] Fixed in eigenchange 7519, but coalesce with zero args still asserts (should be a syntax error).