dynamobi/dynamobi — Issue #798: [FRG-72] Intersecting SargIntervalSequences whose coordinates are RexDynamicParams asserts
Author: dynamobi-build
Created: 2011-12-30 03:49:29+00:00
State: open
Labels: FRG, Java Calc Codegen

[reporter="stephan", created="Tue, 14 Mar 2006 13:41:18 -0500 (GMT-05:00)"]
Intersecting SargIntervalSequences whose coordinates are RexDynamicParams asserts.

For example:

select empid from sales.emps where deptno >= ? and deptno < ?

select empid from sales.emps where deptno >= ? and deptno < 100

select empid from sales.emps where deptno >= 10 and deptno < ?

all cause:

net.sf.farrago.util.FarragoUtil$FarragoSqlException: java.lang.AssertionError: null

at org.eigenbase.sarg.SargEndpoint.compareCoordinates(SargEndpoint.java:427)

at org.eigenbase.sarg.SargEndpoint.compareTo(SargEndpoint.java:490)

at org.eigenbase.sarg.SargSetExpr.intersectSequences(SargSetExpr.java:254)

at org.eigenbase.sarg.SargSetExpr.evaluateIntersection(SargSetExpr.java:225)

at org.eigenbase.sarg.SargSetExpr.evaluate(SargSetExpr.java:114)

at net.sf.farrago.query.FennelRelUtil.convertSargExpr(FennelRelUtil.java:535)

at net.sf.farrago.namespace.ftrs.FtrsScanToSearchRule.considerIndex(FtrsScanToSearchRule.java:225)

at net.sf.farrago.namespace.ftrs.FtrsScanToSearchRule.onMatch(FtrsScanToSearchRule.java:128)

at com.disruptivetech.farrago.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:127)

at com.disruptivetech.farrago.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:422)

at org.eigenbase.oj.stmt.OJPreparingStmt.optimize(OJPreparingStmt.java:281)

at net.sf.farrago.query.FarragoPreparingStmt.optimize(FarragoPreparingStmt.java:588)

at org.eigenbase.oj.stmt.OJPreparingStmt.prepareSql(OJPreparingStmt.java:255)

at net.sf.farrago.query.FarragoPreparingStmt.prepare(FarragoPreparingStmt.java:238)

at net.sf.farrago.db.FarragoDatabase$2.initializeEntry(FarragoDatabase.java:655)

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:778)

at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:729)

at net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:156)

at net.sf.farrago.jdbc.engine.FarragoJdbcEngineConnection.prepareStatement(FarragoJdbcEngineConnection.java:293)

at net.sf.farrago.test.FarragoJdbcTest.testMultipleDynamicParameters2(FarragoJdbcTest.java:2443)

at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)

at junit.extensions.TestSetup$1.protect(TestSetup.java:19)

at junit.extensions.TestSetup.run(TestSetup.java:23)