[teiid-issues] [JBoss JIRA] (TEIID-1869) Simple capabilities with PostgreSQL 8.3 using decodeinteger causes comm failure

Steven Hawkins (Resolved) (JIRA) jira-events at lists.jboss.org
Wed Dec 14 12:03:09 EST 2011


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

Steven Hawkins resolved TEIID-1869.
-----------------------------------

    Fix Version/s: 7.6.1
                   8.0
       Resolution: Done


Added a convert to the decodeinteger rewrite.  Also deprecated both decode functions as they are a legacy attempt to match the Oracle decode function - however they have different syntax (if we do want to match oracle we can since varargs are now supported) and are easily replaced with a CASE expression.  The default logic of both functions is also probably incorrect as they return the full string to be searched if no default is specified in the second argument.  This will likely result in an exception in the decodeinteger case.  Since this behavior was not specified in the reference, I documented it as is.
                
> Simple capabilities with PostgreSQL 8.3 using decodeinteger causes comm failure
> -------------------------------------------------------------------------------
>
>                 Key: TEIID-1869
>                 URL: https://issues.jboss.org/browse/TEIID-1869
>             Project: Teiid
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 7.6
>            Reporter: Paul Nittel
>            Assignee: Steven Hawkins
>             Fix For: 7.6.1, 8.0
>
>         Attachments: QT_PostgreSQL83.vdb
>
>
> We use PostgreSQL 8.3 twice: once to test push-down to the source and the other to test not-pushed-down queries. The following works fine with the push-down. It's not so good when we use simple-capabilities.
> The query is:
>  SELECT IntKey, BooleanValue, DECODEINTEGER(BooleanValue, 'false,3,true,7') AS Decoded FROM BQT1.SmallA ORDER BY IntKey
> What happens is:
> $ ./RunQT jdbc:teiid:QT_PostgreSQL83 at mm://localhost:31000 user user yes "SELECT IntKey, BooleanValue, DECODEINTEGER(BooleanValue, 'false,3,true,7') AS Decoded FROM BQT1.SmallA ORDER BY IntKey"
> Caught SQLException:
> [SingleInstanceCommunicationException]
> 1 [EOFException]
> In the case of query testing, all subsequent queries fail due to a closed socket error.
> Dev indicated "That's a bug with the rewriter.  We are just converting the decode function into a searched case statement, but are leaving the then values as string - rather than converting them to integers.  The pushdown works because the resulting string value is converted to an integer via the translator/driver logic."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list