Volodymyr Vysotskyi created DRILL-7194:
------------------------------------------
Summary: Wrong result when non-deterministic functions are used in
filter
Key: DRILL-7194
URL: https://issues.apache.org/jira/browse/DRILL-7194
Project: Apache Drill
Issue Type: Bug
Reporter: Volodymyr Vysotskyi
Fix For: Future
Drill returns the wrong result when non-deterministic functions are used in
filter condition, for example, the next query:
{code:sql}
select 1 from (values(1)) where random()=random();
{code}
returns
{noformat}
+--------+
| EXPR$0 |
+--------+
| 1 |
+--------+
1 row selected (0.105 seconds)
{noformat}
but {{random()=random()}} should be {{false}}, and therefore query shouldn't
return any rows.
If this condition is used in projection, it returns the correct result:
{code:sql}
select random()=random();
{code}
returns
{noformat}
+--------+
| EXPR$0 |
+--------+
| false |
+--------+
1 row selected (1.558 seconds)
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)