Peeyush Gupta created ASTERIXDB-3515:
----------------------------------------
Summary: Incorrect result when non-pure function passed as udf
argument
Key: ASTERIXDB-3515
URL: https://issues.apache.org/jira/browse/ASTERIXDB-3515
Project: Apache AsterixDB
Issue Type: Bug
Components: COMP - Compiler
Reporter: Peeyush Gupta
Create the following UDF
{noformat}
CREATE FUNCTION check(x) { select case when x=x then 10 else 0 end
}
{noformat}
The following query returns 0 instead of 10
{noformat}
select check(random())
{noformat}
We should not inline non-pure functions in UDF body.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)