Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FRG-59] EXISTS fails in optimizer #811

Open
dynamobi-build opened this issue Dec 30, 2011 · 0 comments
Open

[FRG-59] EXISTS fails in optimizer #811

dynamobi-build opened this issue Dec 30, 2011 · 0 comments

Comments

@dynamobi-build
Copy link

[reporter="edan", created="Wed, 8 Mar 2006 14:42:38 -0500 (GMT-05:00)"]
EXITS fails in optimizer.

 

 

0: jdbc:farrago:> select age from sales.emps where exists (select age from

sales.emps);

Error: net.sf.saffron.runtime.SaffronError: Internal error: while visiting

tree (state=,code=0)

java.sql.SQLException: net.sf.saffron.runtime.SaffronError: Internal error:

while visiting tree

        at openjava.mop.Toolbox.newInternal(Toolbox.java:1132)

        at net.sf.saffron.opt.OptUtil.go(OptUtil.java:180)

        at net.sf.saffron.opt.RelSubset.buildCheapestPlan(RelSubset.java:192)

        at

net.sf.saffron.opt.VolcanoPlanner.findBestExp(VolcanoPlanner.java:310)

        at net.sf.saffron.oj.stmt.OJStatement.prepareSql(OJStatement.java:409)

        at

net.sf.farrago.query.FarragoPreparingStmt.implement(FarragoPreparingStmt.java:283)

        at

net.sf.farrago.db.FarragoDatabase$1.initializeEntry(FarragoDatabase.java:546)

        at

net.sf.farrago.util.FarragoObjectCache.pin(FarragoObjectCache.java:144)

        at

net.sf.farrago.db.FarragoDatabase.prepareStmtImpl(FarragoDatabase.java:554)

        at

net.sf.farrago.db.FarragoDatabase.prepareStmt(FarragoDatabase.java:486)

        at

net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:550)

        at

net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:125)

        at

net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:106)

        at sqlline.SqlLine$Commands.sql(SqlLine.java:3501)

        at sqlline.SqlLine.dispatch(SqlLine.java:911)

        at sqlline.SqlLine.begin(SqlLine.java:762)

        at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:436)

        at sqlline.SqlLine.main(SqlLine.java:419)



------- Comment #1 From Julian Hyde 2005-11-08 14:06 [reply] -------

The fix would be in the SQL to Rel translation process. We now have the right

relational expression -- CorrelatorRel -- to translate to.



We would also have to make sure that the validation is being done correctly,

and update the spec for how EXISTS interacts with streaming queries (is it OK

to write 'select * from aTable where exists (select * from aStream)'?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant