dynamobi/dynamobi — Issue #821: [FRG-49] avg set function is not working
Author: dynamobi-build
Created: 2011-12-30 03:50:53+00:00
State: closed
Labels: FRG, Statement Processing

[reporter="schoi", created="Sun, 19 Feb 2006 22:39:40 -0500 (GMT-05:00)"]
Not sure from error msg if avg() is just not implemented yet..

repro sql:

---------------

create schema s;

set schema 's';

create table t1 (i int primary key);

insert into t1 values(1);

select avg(i) from t1;

error:

---------

Error: java.lang.AssertionError: Internal error: node could not be implemented: Subset#3.ITERATOR (state=,code=0)

net.sf.farrago.util.FarragoUtil$FarragoSqlException: java.lang.AssertionError: Internal error: node could not be implemented: Subset#3.ITERATOR

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

at com.disruptivetech.farrago.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:318)

at org.eigenbase.rel.RelVisitor.go(RelVisitor.java:75)

at com.disruptivetech.farrago.volcano.RelSubset.buildCheapestPlan(RelSubset.java:231)

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

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

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

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

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

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

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

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

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

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

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