Skip to content
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

Merged
merged 2 commits into from
Mar 11, 2024
Merged

Conversation

KiterLuc
Copy link
Contributor

This implements aggregates support with dense dimensions.


TYPE: IMPROVEMENT
DESC: Implement dense dimension aggregates.

This implements aggregates support with dense dimensions.

---
TYPE: IMPROVEMENT
DESC: Implement dense dimension aggregates.
Copy link

This pull request has been linked to Shortcut Story #42340: Aggregates on dimension for dense arrays return 0.

@KiterLuc KiterLuc requested a review from robertbindar March 11, 2024 08:38
Copy link
Contributor

@robertbindar robertbindar left a 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.

test/src/test-cppapi-aggregates.cc Show resolved Hide resolved
test/src/test-cppapi-aggregates.cc Outdated Show resolved Hide resolved
tiledb/api/c_api/query_aggregate/query_aggregate_api.cc Outdated Show resolved Hide resolved
tiledb/sm/query/readers/dense_reader.cc Show resolved Hide resolved
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();
Copy link
Contributor

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.

Copy link
Contributor Author

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.

tiledb/sm/query/readers/dense_reader.cc Outdated Show resolved Hide resolved
md_names_to_load.emplace_back(name);
}
}
load_tile_metadata(relevant_fragments, md_names_to_load);
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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

@KiterLuc KiterLuc merged commit 607d5ad into dev Mar 11, 2024
57 checks passed
@KiterLuc KiterLuc deleted the lr/dense-dim-aggregates/ch42340 branch March 11, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants