Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.15.0
-
None
-
None
Description
Drill returns the wrong result when non-deterministic functions are used in filter condition, for example, the next query:
select 1 from (values(1)) where random()=random();
returns
+--------+ | EXPR$0 | +--------+ | 1 | +--------+ 1 row selected (0.105 seconds)
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:
select random()=random();
returns
+--------+ | EXPR$0 | +--------+ | false | +--------+ 1 row selected (1.558 seconds)