dynamobi/dynamobi — Issue #806: [FRG-64] COALESCE with a single parameter causes assertion failure
Author: dynamobi-build
Created: 2011-12-30 03:49:58+00:00
State: closed
Labels: FRG, SQL Validator

[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