-
Notifications
You must be signed in to change notification settings - Fork 184
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
Implement dense dimension aggregates. #4801
Conversation
This implements aggregates support with dense dimensions. --- TYPE: IMPROVEMENT DESC: Implement dense dimension aggregates.
This pull request has been linked to Shortcut Story #42340: Aggregates on dimension for dense arrays return 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great work @KiterLuc! Minor optimizations below. I'd like first to clarify why the current test for sparse dimensions didn't catch the bug you fixed, then ok to merge.
const auto attribute = array_schema_.attribute(name); | ||
const auto var_size = array_schema_.var_size(name); | ||
const auto nullable = attribute->nullable(); | ||
const auto nullable = attribute != nullptr && attribute->nullable(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the callers up the stack makes sure name
exists, let me know if I'm missing something, but the nullptr
check seems redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dimensions will not work properly here. But I changed the condition to clarify.
md_names_to_load.emplace_back(name); | ||
} | ||
} | ||
load_tile_metadata(relevant_fragments, md_names_to_load); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea how this bug reproduced and why the test in #4794 didn't catch it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at some point your test stopped working because use_dim_ was never true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I remember testing with and without the fix to see if crash happens, but I don't have any other explanation for now
This implements aggregates support with dense dimensions.
TYPE: IMPROVEMENT
DESC: Implement dense dimension aggregates.