Closed dynamobi-build closed 12 years ago
[author="angel", created="Thu, 16 Feb 2006 22:06:37 -0500 (GMT-05:00)"] I have some changes to CASE that should fix this issue. I'm planning to test and checkin my changes to the dt branch sometime this weekend.
[author="angel", created="Sat, 18 Feb 2006 22:20:06 -0500 (GMT-05:00)"] Fixed in eigenbase dt change 5509. Leaving it open so John can review the changes and confirm that it is fixed.
[author="jpham", created="Sat, 29 Apr 2006 12:55:18 -0500 (GMT-05:00)"] the case implementation was updated in lu 6456
[reporter="schoi", created="Thu, 16 Feb 2006 19:00:45 -0500 (GMT-05:00)"] Like
FRG-47but with columns of "real" datatype, and this time, cannot insert any numeric values.Repro:
----------
create schema s;
set schema 's';
create table rT (c1 real primary key, c2 real);
insert into rT values(0, null);
-- these work
select c2, (case when c2 is null then c2 else c2 end) from rT;
select c2, (case when c2 is null then null else c2 end) from rT;
-- these fail (notice different errors)
select c2, (case when c2 is null then 0 else c2 end) from rT;
-----------
Error: CALL castA(d,s4) not registered (at line:col 192:192 to 10:29, characters 0 to 162) (state=,code=0)
net.sf.farrago.util.FarragoUtil$FarragoSqlException: CALL castA(d,s4) not registered (at line:col 192:192 to 10:29, characters 0 to 162)
at net.sf.farrago.resource.FarragoResource$_Def0.ex(FarragoResource.java:1187)
at net.sf.farrago.fennel.FennelDbHandle.handleNativeException(FennelDbHandle.java:321)
at net.sf.farrago.fennel.FennelDbHandle.executeCmd(FennelDbHandle.java:252)
at net.sf.farrago.runtime.FarragoRuntimeContext.prepareStreamGraph(FarragoRuntimeContext.java:542)
at net.sf.farrago.runtime.FarragoRuntimeContext.access$200(FarragoRuntimeContext.java:58)
at net.sf.farrago.runtime.FarragoRuntimeContext$1.initializeEntry(FarragoRuntimeContext.java:433)
at net.sf.farrago.util.FarragoObjectCache.pin(FarragoObjectCache.java:157)
at net.sf.farrago.runtime.FarragoRuntimeContext.loadFennelPlan(FarragoRuntimeContext.java:453)
at net.sf.farrago.query.FarragoExecutableJavaStmt.execute(FarragoExecutableJavaStmt.java:114)
at net.sf.farrago.db.FarragoDbStmtContext.execute(FarragoDbStmtContext.java:272)
at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:106)
select c2, (case when c2 is null then 0.0 else c2 end) from rT;
-----------
Error: Calculator program compilation assertion error: Type Mismatch. Tried to MOVE s8 into a d (state=,code=0)
net.sf.farrago.util.FarragoUtil$FarragoSqlException: Calculator program compilation assertion error: Type Mismatch. Tried to MOVE s8 into a d
at net.sf.farrago.resource.FarragoResource$_Def0.ex(FarragoResource.java:1187)
at com.disruptivetech.farrago.calc.CalcProgramBuilder.compilationAssert(CalcProgramBuilder.java:301)
at com.disruptivetech.farrago.calc.CalcProgramBuilder.addRef(CalcProgramBuilder.java:1108)
at com.disruptivetech.farrago.calc.RexToCalcTranslator.generateProgram(RexToCalcTranslator.java:496)
at com.disruptivetech.farrago.rel.FennelCalcRel.toStreamDef(FennelCalcRel.java:168)
at net.sf.farrago.query.FarragoRelImplementor.visitFennelChild(FarragoRelImplementor.java:93)
at net.sf.farrago.query.FennelToIteratorConverter.childToStreamDef(FennelToIteratorConverter.java:418)
at net.sf.farrago.query.FennelToIteratorConverter.implement(FennelToIteratorConverter.java:146)
at org.eigenbase.oj.rel.JavaRelImplementor.visitChildInternal(JavaRelImplementor.java:382)
at net.sf.farrago.query.FarragoRelImplementor.visitChildInternal(FarragoRelImplementor.java:108)
at org.eigenbase.oj.rel.JavaRelImplementor.visitChild(JavaRelImplementor.java:369)
at org.eigenbase.oj.rel.JavaRelImplementor.visitJavaChild(JavaRelImplementor.java:343)
at org.eigenbase.oj.rel.JavaRelImplementor.implementRoot(JavaRelImplementor.java:399)
at net.sf.farrago.query.FarragoRelImplementor.implementRoot(FarragoRelImplementor.java:238)
at org.eigenbase.oj.stmt.OJPreparingStmt.implement(OJPreparingStmt.java:301)
at org.eigenbase.oj.stmt.OJPreparingStmt.prepareSql(OJPreparingStmt.java:256)
at net.sf.farrago.query.FarragoPreparingStmt.prepare(FarragoPreparingStmt.java:238)
at net.sf.farrago.db.FarragoDatabase$2.initializeEntry(FarragoDatabase.java:640)
at net.sf.farrago.util.FarragoObjectCache.pin(FarragoObjectCache.java:157)
at net.sf.farrago.db.FarragoDatabase.prepareStmtImpl(FarragoDatabase.java:650)
at net.sf.farrago.db.FarragoDatabase.prepareStmt(FarragoDatabase.java:530)
at net.sf.farrago.db.FarragoDbSession.prepareImpl(FarragoDbSession.java:769)
at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:720)
at net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:154)
at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:104)