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

[c++] Column abstraction: SOMADimension, part 1 #3425

Merged
merged 22 commits into from
Jan 2, 2025

Conversation

XanthosXanthopoulos
Copy link
Collaborator

@XanthosXanthopoulos XanthosXanthopoulos commented Dec 12, 2024

SOMAColumn provides an abstraction over TileDB attributes and dimensions and exposes a common interface for all columns regardless of type. Subclasses of SOMAColumn can implement complex indexing mechanism through additional dimensions and encapsulate all that logic in one place and make it modular.

Subsequent PRs will add implementation for dimension and attributes.

Throughout this PR there is extensive use of std::any to enable polymorphism with the different SOMAColumn types while maintaining a templated interface at the abstract SOMAColumn.

Notes for Reviewer:
This PR introduces the abstract SOMAColumn class and the SOMADimension concrete class with basic unit tests.

@XanthosXanthopoulos XanthosXanthopoulos changed the title SOMADimension, part 1 [c++] Column abstraction: SOMADimension, part 1 Dec 12, 2024
Copy link
Member

@johnkerl johnkerl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only partway through this PR. I'm still struggling with this (now) 1,875-line PR -- it's doing a lot of things. I'll need to pause and work on some other things for a while, and come back to this. (The other 3 PRs you split out that were smaller were nicely self-contained and self-descriptive and I was able to understand and review them earlier today.)

libtiledbsoma/src/soma/soma_column.cc Show resolved Hide resolved
Copy link
Collaborator

@jp-dark jp-dark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good for the most part, but it's so big it's hard to follow everything. Let's do a code walk through together next time we are both working.

I also added a couple small comments, and John's comment about the missing code comments still needs to be addressed.

libtiledbsoma/src/soma/soma_dimension.h Outdated Show resolved Hide resolved
Comment on lines +52 to +53
#include "soma/soma_column.h"
#include "soma/soma_dimension.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you remove these in a future PR. Might as well just not add them in to begin with.

@XanthosXanthopoulos XanthosXanthopoulos force-pushed the xan/sc-sc-59427/soma-dimension branch from f134822 to 0ad22da Compare December 31, 2024 10:17
@jp-dark jp-dark merged commit 44b2b18 into xan/sc-59427/arrow-helpers Jan 2, 2025
16 checks passed
@jp-dark jp-dark deleted the xan/sc-sc-59427/soma-dimension branch January 2, 2025 15:41
@XanthosXanthopoulos XanthosXanthopoulos restored the xan/sc-sc-59427/soma-dimension branch January 2, 2025 17:35
jp-dark pushed a commit that referenced this pull request Jan 2, 2025
* Add helper methods for to and from arrow contructs

* Remove unnecessary `std::string` conversion to `c_str`

Co-authored-by: John Kerl <[email protected]>

* lint fix

* Switch C-style casts to named casts

* [c++] Column abstraction: `SOMADimension`, part 1 (#3425)

`SOMAColumn` provides an abstraction over TileDB attributes and dimensions and exposes a common interface for all columns regardless of type. Subclasses of `SOMAColumn` can implement complex indexing mechanism through additional dimensions and encapsulate all that logic in one place and make it modular.

---------

Co-authored-by: John Kerl <[email protected]>
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.

[c++] Add an abstraction layer between SOMA columns and TileDB dimensions and attributes
3 participants