dynamobi/dynamobi — Issue #617: [FRG-255] Updating a numeric column with a string literal results in an IndexOutOfBoundsException
Author: dynamobi-build
Created: 2011-12-30 03:38:52+00:00
State: open
Labels: FRG, SQL Validator

[reporter="zfong", created="Tue, 6 Feb 2007 19:42:06 -0500 (GMT-05:00)"]
Issue the following queries:

create table t(a int primary key, b numeric);

update t set b = '123';

Error: java.lang.IndexOutOfBoundsException: Index: 2, Size: 1 (state=,code=0)

net.sf.farrago.jdbc.FarragoJdbcUtil$FarragoSqlException: java.lang.IndexOutOfBoundsException: Index: 2, Size: 1

at java.util.ArrayList.RangeCheck(ArrayList.java:547)

at java.util.ArrayList.get(ArrayList.java:322)

at org.eigenbase.sql.SqlNodeList.get(SqlNodeList.java:109)

at org.eigenbase.sql.validate.SqlValidatorImpl.getNthExpr(SqlValidatorImpl.java:2713)

at org.eigenbase.sql.validate.SqlValidatorImpl.checkTypeAssignment(SqlValidatorImpl.java:2677)

at org.eigenbase.sql.validate.SqlValidatorImpl.validateUpdate(SqlValidatorImpl.java:2765)

at net.sf.farrago.query.FarragoSqlValidator.validateUpdate(FarragoSqlValidator.java:202)

at org.eigenbase.sql.SqlUpdate.validate(SqlUpdate.java:187)

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

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

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)