[teiid-issues] [JBoss JIRA] Resolved: (TEIID-1480) Teiid's ODBC interaction with PostgreSQL-ODBC fails when column lengths exceed 64K as PostgreSQL stores these values as a short

Ramesh Reddy (JIRA) jira-events at lists.jboss.org
Wed Feb 23 13:56:13 EST 2011


     [ https://issues.jboss.org/browse/TEIID-1480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramesh Reddy resolved TEIID-1480.
---------------------------------

         Assignee: Ramesh Reddy  (was: Steven Hawkins)
    Fix Version/s: 7.4
       Resolution: Done


Teiid was projecting the length of the columns as the attribute length; however pg expects them to be the size defined in the pg_type table for that type. So, the new code will ignore the length specified in the Teiid and return the pg_defined type length for that data type.

> Teiid's ODBC interaction with PostgreSQL-ODBC fails when column lengths exceed 64K as PostgreSQL stores these values as a short
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TEIID-1480
>                 URL: https://issues.jboss.org/browse/TEIID-1480
>             Project: Teiid
>          Issue Type: Bug
>            Reporter: Paul Nittel
>            Assignee: Ramesh Reddy
>             Fix For: 7.4
>
>
> I imported the AdventureWorks2000 database from SQL Server. I had a simple VDB which contained this model. In Excel I was able to see the basic metadata (names of tables), but trying to do anything with a column caused an error. The server.log reported:
> 2011-02-23 10:15:50,330 ERROR [org.teiid.PROCESSOR.MATVIEWS] (Worker6_QueryProcessorQueue146) Failed to load materialized view table #MAT_PG_CATALOG.PG_ATTRIBUTE.
> [ExpressionEvaluationException] ERR.015.001.0003: Error Code:ERR.015.001.0003 Message:Unable to evaluate convert(t1__1.Length, short): Error Code:ERR.015.001.0003 Message:Error while evaluating function convert
> 1 [FunctionExecutionException] ERR.015.001.0003: Error Code:ERR.015.001.0003 Message:Error while evaluating function convert
> 2 [FunctionExecutionException] ERR.015.001.0033: Error Code:ERR.015.001.0033 Message:Error converting [2,147,483,647] of type integer to type short
> 3 [TransformationException]The Integer value '2,147,483,647' is outside the of range for Short
> 	at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:605)
> 	at org.teiid.query.processor.relational.ProjectNode.updateTuple(ProjectNode.java:218)
> 	at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:181)
> 	at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:274)
> 	at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:107)
> 	at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:150)
> 	at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)
> 	at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:71)
> 	at org.teiid.query.tempdata.TempTable$UpdateProcessor.process(TempTable.java:205)
> 	at org.teiid.query.tempdata.TempTable.insert(TempTable.java:446)
> 	at org.teiid.query.tempdata.TempTableDataManager.loadGlobalTable(TempTableDataManager.java:516)
> 	at org.teiid.query.tempdata.TempTableDataManager.registerQuery(TempTableDataManager.java:410)
> 	at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:182)
> 	at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:170)
> 	at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:197)
> 	at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:118)
> 	at org.teiid.query.processor.relational.JoinStrategy.openRight(JoinStrategy.java:102)
> 	at org.teiid.query.processor.relational.JoinNode.open(JoinNode.java:141)
> 	at org.teiid.query.processor.relational.JoinStrategy.openLeft(JoinStrategy.java:92)
> 	at org.teiid.query.processor.relational.JoinNode.open(JoinNode.java:138)
> 	at org.teiid.query.processor.relational.JoinStrategy.openLeft(JoinStrategy.java:92)
> 	at org.teiid.query.processor.relational.JoinNode.open(JoinNode.java:138)
> 	at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:250)
> 	at org.teiid.query.processor.relational.JoinStrategy.openLeft(JoinStrategy.java:92)
> 	at org.teiid.query.processor.relational.JoinNode.open(JoinNode.java:138)
> 	at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:250)
> 	at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:250)
> 	at org.teiid.query.processor.relational.RelationalPlan.open(RelationalPlan.java:98)
> 	at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:134)
> 	at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:105)
> 	at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:115)
> 	at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:250)
> 	at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:184)
> 	at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)
> 	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:188)
> 	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:116)
> 	at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:290)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> 	at java.lang.Thread.run(Thread.java:636)
> The pg_attribute field was modeled as a short to conform to PostgreSQL.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list