dynamobi/dynamobi — Issue #707: [FRG-165] Having clause with in predicate produces Assertion error: rex != null
Author: dynamobi-build
Created: 2011-12-30 03:44:23+00:00
State: open
Labels: FRG, Sql2Rel

[reporter="elin", created="Mon, 3 Jul 2006 17:54:12 -0500 (GMT-05:00)"]
To repro:

create table tt(cola int primary key, colb int, colc varchar(10));

insert into tt values (1, 10, 'mary'), (2, 10, 'bob'), (3, 20, 'bob'), (4, 45, 'bob'), (5, 10, 'jiji');

select sum(colb), colc from tt group by colc having colc in ('bob', 'jiji');

Stack trace:

Error: java.lang.AssertionError: rex != null (state=,code=0)

net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: java.lang.AssertionError: rex != null

at org.eigenbase.sql2rel.SqlToRelConverter$Blackboard.convertExpression(SqlToRelConverter.java:2387)

at org.eigenbase.sql2rel.SqlToRelConverter.convertAgg(SqlToRelConverter.java:1235)

at org.eigenbase.sql2rel.SqlToRelConverter.convertSelectImpl(SqlToRelConverter.java:299)

at org.eigenbase.sql2rel.SqlToRelConverter.convertSelect(SqlToRelConverter.java:261)

at org.eigenbase.sql2rel.SqlToRelConverter.convertQueryRecursive(SqlToRelConverter.java:1393)

at org.eigenbase.sql2rel.SqlToRelConverter.convertQuery(SqlToRelConverter.java:213)

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

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

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

at net.sf.farrago.util.FarragoObjectCache.pin(FarragoObjectCache.java:156)

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

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

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

at net.sf.farrago.db.FarragoDbSession.prepare(FarragoDbSession.java:827)at net.sf.farrago.db.FarragoDbStmtContext.prepare(FarragoDbStmtContext.java:108)

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

at sqlline.SqlLine$Commands.execute(Ljava.lang.String;Z)Z(Unknown Source)

at sqlline.SqlLine$Commands.sql(Ljava.lang.String;)Z(Unknown Source)

at sqlline.SqlLine.dispatch(Ljava.lang.String;)Z(Unknown Source)

at sqlline.SqlLine.begin([Ljava.lang.String;Ljava.io.InputStream;)V(Unknown Source)

at sqlline.SqlLine.mainWithInputRedirection([Ljava.lang.String;Ljava.io.InputStream;)V(Unknown Source)

at sqlline.SqlLine.main([Ljava.lang.String;)V(Unknown Source)

0: jdbc:farrago:>