-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
NPE when using max_by/min_by #2040
Comments
This can happen if the state contains a single-valued block for the key field with a "null" position coming out of the worker. When the object is deserialized on the other side, instead of recreating the single-valued block, it leave the key null. The combine method doesn't expect "other" to ever be null, so it blows up. The issue is partly due to inconsistent handling of nulls in MaxBy/MinBy. We should pick whether we're going to represent them as single-valued blocks with a single null position or as plain old null reference. |
We also need better test coverage for these aggregation functions. |
I wanna work on this issue. |
@huanghuashou are you still working on this? |
Sorry for late, working on it now. Will provide a diff soon. |
Hi @martint, I'm going to be working on this one. I'm new to presto and DB engine development in general. Can you advise on how to repro the exception? |
I haven't been able to come up with a query that reproduces this deterministically. You might need to write a unit test that exercises the API of those functions directly. |
The text was updated successfully, but these errors were encountered: