dynamobi/dynamobi — Issue #572: [FRG-300] IN predicate in join condition hits an assertion
Author: dynamobi-build
Created: 2011-12-30 03:36:02+00:00
State: open
Labels: FRG, SQL Validator

[reporter="jvs", created="Fri, 2 Nov 2007 23:59:08 -0500 (GMT-05:00)"]
0: jdbc:luciddb:> create table a.t1(i int, j int);

No rows affected (1.248 seconds)

0: jdbc:luciddb:> create table a.t2(i int, j int);

No rows affected (0.227 seconds)

0: jdbc:luciddb:> select * from a.t1 left outer join a.t2 on t1.i in (select j from a.t2);

Error: java.lang.AssertionError: Internal error: Not a query: SELECT `J`

FROM `A`.`T2` (state=,code=0)

net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: java.lang.AssertionError: Internal error: Not a query: SELECT `J`

FROM `A`.`T2`

at org.eigenbase.util.Util.newInternal(Util.java:832)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:622)

at org.eigenbase.sql.SqlSelect.validate(SqlSelect.java:158)

at org.eigenbase.sql.SqlNode.validateExpr(SqlNode.java:257)

at org.eigenbase.sql.SqlOperator.validateCall(SqlOperator.java:401)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateCall(SqlValidatorImpl.java:3316)

at org.eigenbase.sql.SqlCall.validate(SqlCall.java:162)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateJoin(SqlValidatorImpl.java:2314)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2279)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:2428)

at org.eigenbase.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:64)

at org.eigenbase.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:88)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:650)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:639)

at org.eigenbase.sql.SqlSelect.validate(SqlSelect.java:158)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:606)

at org.eigenbase.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:430)

at net.sf.farrago.query.FarragoSqlValidator.validate(FarragoSqlValidator.java:102)

at net.sf.farrago.db.FarragoDatabase.prepareStmtImpl(FarragoDatabase.java:846)

at net.sf.farrago.db.FarragoDatabase.prepareStmt(FarragoDatabase.java:766)

at net.sf.farrago.db.FarragoDbSession.prepareImpl(FarragoDbSession.java:1018)

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

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

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

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: jdbc:luciddb:>