You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Yida Wu (Jira)" <ji...@apache.org> on 2025/06/14 00:36:00 UTC

[jira] [Created] (IMPALA-14145) WHERE filter results incorrectly with rand() as constant expression

Yida Wu created IMPALA-14145:
--------------------------------

             Summary: WHERE filter results incorrectly with rand() as constant expression
                 Key: IMPALA-14145
                 URL: https://issues.apache.org/jira/browse/IMPALA-14145
             Project: IMPALA
          Issue Type: Bug
    Affects Versions: Impala 5.0.0
            Reporter: Yida Wu


When using rand() in a query, the behavior can be inconsistent between constant expressions and conditions in subqueries.
For example:
{code:java}
SELECT * FROM (SELECT rand() AS rd) t1 WHERE rd < 0.1;
{code}
Returns:
{code:java}
+---------------------+
| rd                  |
+---------------------+
| 0.47849725790014347 |
+---------------------+
{code}
The value of rd is larger than 0.1, but it still passes the filter rd < 0.1. This seems incorrect.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)