LucidDB / luciddb

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

[FRG-72] Intersecting SargIntervalSequences whose coordinates are RexDynamicParams asserts #798

Closed dynamobi-build closed 12 years ago

dynamobi-build commented 12 years ago

[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)

dynamobi-build commented 12 years ago

[author="stephan", created="Tue, 14 Mar 2006 14:24:02 -0500 (GMT-05:00)"] org.eigenbase.util.Bug.Frg72Fixed disables a (newly added) test in FarragoJdbcTest that exhibits this bug.

Test available in //open/dt/dev as of change 5824.

dynamobi-build commented 12 years ago

[author="jvs", created="Tue, 14 Mar 2006 15:12:56 -0500 (GMT-05:00)"] This one is mine.

dynamobi-build commented 12 years ago

[author="jvs", created="Sat, 18 Mar 2006 21:20:38 -0500 (GMT-05:00)"] Fixed by eigenchange 5877.

Test case re-enabled in 5878; the expected results were wrong so I changed the query to match them.