dynamobi/dynamobi — Issue #620: [FRG-252] create or replace view can't deal with column type family changes
Author: dynamobi-build
Created: 2011-12-30 03:39:07+00:00
State: open
Labels: DDL, FRG

[reporter="jvs", created="Mon, 22 Jan 2007 13:54:56 -0500 (GMT-05:00)"]
create schema y;

set schema 'y';

create view v1 as select 'abc' from (values(0));

create view v2 as select * from v1;

create or replace view v1 as select 12 from (values(0));

select * from v2;

gives

Error: java.lang.AssertionError: Internal error: pre-condition failed: typeName.allowsPrecScale(true,false) (state=,code=0)

net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: java.lang.AssertionError: Internal error: pre-condition failed: typeName.allowsPrecScale(true,false)

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

at org.eigenbase.util.Util.pre(Util.java:901)

at org.eigenbase.sql.type.BasicSqlType.(BasicSqlType.java:88)

at org.eigenbase.sql.type.SqlTypeFactoryImpl.createSqlType(SqlTypeFactoryImpl.java:66)

at net.sf.farrago.type.FarragoTypeFactoryImpl.createSqlType(FarragoTypeFactoryImpl.java:1066)

at net.sf.farrago.type.FarragoTypeFactoryImpl.createCwmTypeImpl(FarragoTypeFactoryImpl.java:173)

at net.sf.farrago.type.FarragoTypeFactoryImpl.createCwmElementType(FarragoTypeFactoryImpl.java:116)

at net.sf.farrago.type.FarragoTypeFactoryImpl$1.getFieldType(FarragoTypeFactoryImpl.java:300)

at org.eigenbase.reltype.RelDataTypeFactoryImpl.createStructType(RelDataTypeFactoryImpl.java:111)

at net.sf.farrago.type.FarragoTypeFactoryImpl.createStructTypeFromClassifier(FarragoTypeFactoryImpl.java:284)

at net.sf.farrago.query.FarragoPreparingStmt.createTableRowType(FarragoPreparingStmt.java:1355)

at net.sf.farrago.query.FarragoPreparingStmt.getTable(FarragoPreparingStmt.java:1334)

at org.eigenbase.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:70)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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)