You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
window functions with NULL literals in partition by and order by do not work: Internal("Sort operation is not applicable to scalar value NULL") #1194
CREATE EXTERNAL TABLE foo(x int)
STORED AS CSV
LOCATION '/tmp/foo.csv';
>select percent_rank() OVER (partition by x) from foo;
+----------------+
| PERCENT_RANK() |
+----------------+
| 0 |
+----------------+1 row inset. Query took 0.013 seconds.
>select percent_rank() OVER (partition by null) from foo;
ArrowError(ExternalError(ArrowError(ExternalError(Internal("Sort operation is not applicable to scalar value NULL")))))
>select percent_rank() OVER (partition by x order bynull) from foo;
ArrowError(ExternalError(ArrowError(ExternalError(Internal("Sort operation is not applicable to scalar value NULL")))))
changed the title [-]window functions with NULL literals in `partition by` and `order by` do not work[/-][+]window functions with NULL literals in `partition by` and `order by` do not work: Internal("Sort operation is not applicable to scalar value NULL")[/+]on Oct 28, 2021
> CREATE EXTERNAL TABLE foo(x int)
STORED AS CSV
LOCATION '/tmp/foo.csv';
0 rows in set. Query took 0.002 seconds.
> select percent_rank() OVER (partition by x) from foo;
+----------------+
| PERCENT_RANK() |
+----------------+
| 0 |
+----------------+
1 row in set. Query took 0.019 seconds.
> select percent_rank() OVER (partition by null) from foo;
+----------------+
| PERCENT_RANK() |
+----------------+
| 0 |
+----------------+
1 row in set. Query took 0.014 seconds.
> select percent_rank() OVER (partition by x order by null) from foo;
+----------------+
| PERCENT_RANK() |
+----------------+
| 0 |
+----------------+
1 row in set. Query took 0.014 seconds.
>
Activity
[-]window functions with NULL literals in `partition by` and `order by` do not work[/-][+]window functions with NULL literals in `partition by` and `order by` do not work: Internal("Sort operation is not applicable to scalar value NULL")[/+]alamb commentedon Oct 28, 2021
#1195 may be the same underlying cause
xudong963 commentedon Oct 28, 2021
@alamb Nice! It's the same cause.
xudong963 commentedon Oct 29, 2021
Maybe the issue can close too.
alamb commentedon Oct 29, 2021
As @xudong963 mentions, closed in #1197
minor: refactor prepare_output so that it does not require an Executi…
feat: add support for array_contains expression (apache#1163)