-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional aggregation fails with: Invalid position %s in block with %s positions #21285
Labels
Comments
cc @dain |
Relates to #21272 |
Issue can be easily reproduced by the following queries:
|
cc @sopel39 |
Same issue on the delta connector, if that helps. 👍 Running CREATE TABLE delta.tpch.tbl AS
SELECT
date_add('day', cast(rand() * 365 as int), date'2020-01-01') payment_date,
if(rand() < 0.3, 1) converted,
if(rand() > 0.9, 1) realized
FROM TABLE(sequence(1,4734676));
SELECT
SUM(COALESCE(converted, realized)) FILTER(WHERE (payment_date <= DATE('2023-11-30'))) AS cumulative
FROM delta.tpch.tbl; |
We believe it is the same issue as #21272. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After Trino upgrade from version 409 to 442/443 we got an error on conditional aggregation. Example query:
When
join_distribution_type='PARTITIONED'
, it fails on a small dataset with following stack trace:When
join_distribution_type='REPLICATED'
, it fails only on a big dataset with following stack trace:Trino cluster size also affects on how big dataset should be to reproduce the issue. The bigger cluster size the bigger dataset should be.
A managed to reproduce it in unit tests. The file is attached
TestCorruptedAggregation.java.zip
Please let me know if I can provide more information.
The text was updated successfully, but these errors were encountered: