-
1. Re: Function in ORDER BY clause not being passed through to datamanager
shawkins Aug 17, 2016 4:24 PM (in response to dnicodemus)> This looks like a bug to me. I don't see why the order by express is not being passed through to the datamanager. in the first case.
The default for functions is to be deterministic, so without an argument only a single value is assumed for xscore() and the order by is effectively removed. However I do seen an issue because even if you use:
CREATE FOREIGN FUNCTION XSCORE() RETURNS FLOAT OPTIONS (NAMEINSOURCE '"app1".XSCORE', DETERMINISM 'NONDETERMINISTIC');
The rewrite will still remove the order by because it doesn't consider the function as pushed at that stage. Can you log something for that?
-
2. Re: Function in ORDER BY clause not being passed through to datamanager
dnicodemus Aug 17, 2016 4:23 PM (in response to shawkins)Sure, I'll log a ticket for you.
Are you saying that if the function had a parameter it would not be removed from the order by ?
-
3. Re: Function in ORDER BY clause not being passed through to datamanager
shawkins Aug 17, 2016 4:25 PM (in response to dnicodemus)> Are you saying that if the function had a parameter it would not be removed from the order by ?
As long as it wasn't a static value, yes.
-
4. Re: Function in ORDER BY clause not being passed through to datamanager
dnicodemus Aug 17, 2016 4:30 PM (in response to shawkins)So, it would have to be column from the row then, yes ?
-
5. Re: Function in ORDER BY clause not being passed through to datamanager
shawkins Aug 17, 2016 4:36 PM (in response to dnicodemus)Yes. Just a literal would still be seen as a deterministic expression.
-
6. Re: Function in ORDER BY clause not being passed through to datamanager
dnicodemus Aug 17, 2016 4:37 PM (in response to shawkins)Yup, that make sense, as always, thanks for the quick and coherent reply !
Dave