[teiid-issues] [JBoss JIRA] (TEIID-4391) NONDETERMINISTIC functions incorrectly optimized out of ORDER BY

Steven Hawkins (JIRA) issues at jboss.org
Wed Aug 17 18:34:00 EDT 2016


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

Steven Hawkins resolved TEIID-4391.
-----------------------------------
    Fix Version/s: 9.1
                   9.0.3
       Resolution: Done


Corrected the evaluatable check for non-determinism.

> NONDETERMINISTIC functions incorrectly optimized out of ORDER BY
> ----------------------------------------------------------------
>
>                 Key: TEIID-4391
>                 URL: https://issues.jboss.org/browse/TEIID-4391
>             Project: Teiid
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 8.13.2
>            Reporter: Dave Nicodemus
>            Assignee: Steven Hawkins
>             Fix For: 9.1, 9.0.3
>
>
> The default for functions is to be deterministic, so without an argument only a single value is assumed and these functions are optimized out of ORDER BY clauses.
> We should be able to change this behavior by marking a function and NON-DETERMINISTIC in the VDB definition like this : 
> CREATE FOREIGN FUNCTION F() RETURNS FLOAT  OPTIONS (NAMEINSOURCE '"app1".F', DETERMINISM 'NONDETERMINISTIC');
> But doing this fails to prevent the function call from being optimized out of the ORDER BY.
> Work arounds are to use the function in an expression that involves a table column or add a no-op parameter to the function and pass a table column.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the teiid-issues mailing list