[teiid-issues] [JBoss JIRA] (TEIID-5161) Push down rand() function

Steven Hawkins (JIRA) issues at jboss.org
Mon Dec 18 11:23:00 EST 2017


    [ https://issues.jboss.org/browse/TEIID-5161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506788#comment-13506788 ] 

Steven Hawkins commented on TEIID-5161:
---------------------------------------

> I don't know what we can do here, maybe it's better just not to push down rand function for MSSQL or maybe there is a problem on teiid core...

This isn't an issue with Teiid other than I missed that SQL Server doesn't treat the rand function as non-deterministic.  It is evaluated only once per query.  We can still push it down, but will have to resort to effectively passing a random seed - https://stackoverflow.com/questions/1045138/how-do-i-generate-random-number-for-each-row-in-a-tsql-select

So it's probably safest to just not push to SQL Server.

> Push down rand() function
> -------------------------
>
>                 Key: TEIID-5161
>                 URL: https://issues.jboss.org/browse/TEIID-5161
>             Project: Teiid
>          Issue Type: Quality Risk
>          Components: JDBC Connector, Query Engine
>    Affects Versions: 9.3.4
>         Environment: teiid-9.3.4 on WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final)
>            Reporter: dalex dalex
>            Assignee: Steven Hawkins
>             Fix For: 10.1
>
>         Attachments: mssql_rand_function.jpg
>
>
> As per discussion within TEIID-5153 we should push down rand() function where ever it seems to be missing. But first of all the function should be pushed down for at least PostgreSQL, MySQL, MSSQL and Oracle databases.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the teiid-issues mailing list