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++] SOMAColumn [WIP] #3329

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Conversation

XanthosXanthopoulos
Copy link
Collaborator

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.

Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.89%. Comparing base (cd1e487) to head (549a5fe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3329      +/-   ##
==========================================
+ Coverage   85.79%   85.89%   +0.09%     
==========================================
  Files          55       55              
  Lines        6176     6176              
==========================================
+ Hits         5299     5305       +6     
+ Misses        877      871       -6     
Flag Coverage Δ
python 85.89% <ø> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api 85.89% <ø> (+0.09%) ⬆️
libtiledbsoma ∅ <ø> (∅)

* @tparam T
* @param dim
* @param ranges
Copy link
Collaborator

Choose a reason for hiding this comment

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

These don't match the function template parameter/parameter names.

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.

This looks like interesting work but it's not clear why it's being done.

You need a GitHub issue, or Shortcut link, in the description field.

From your GitHub branch name I can discover a Shortcut story number -- since this is an open-source project, please include within a GitHub issue the context that is necessary for anyone who is not a TileDB employee to understand what changes you're making here, and why.

This PR introduces new code without any unit tests, and no callsite from existing code that would exercise existing unit tests. It could be stamped now with guarantee of unit-test cases to follow, but, I'd be happier if you could offer at least a minimal set of tests.

*
* @section DESCRIPTION
*
* This file defines the SOMAColumn class.
Copy link
Member

Choose a reason for hiding this comment

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

Please say what this class is for, what problem it solves. This comment, as is, doesn't tell anything that class SOMAColuimn { ... } doesn't.

In particular, up until there's been a 1-1 mapping of one soma column -> one tiledb dim or one tiledb attr. Here it appears (I'm still reading but it appears so far) that you are allowing for one-to-many mappings of one soma column -> more than one tiledb dim and/or more than one tiledb attr. A top-of-file comment here would need to explain this in at least several sentences' worth of detail.


/**
* @brief Select columns names to query (dim and attr). If the
* `if_not_empty` parameter is `true`, the column will be selected iff the
Copy link
Member

Choose a reason for hiding this comment

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

"iff" is specialist mathematical jargon that non-mathematicians are unlikely to recognize. Please don't use it.

* from changing an empty list (all columns) to a subset of columns.
*
* @param query the ManagedQuery object to modify
* @param if_not_empty Prevent changing an "empty" selection of all columns
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @param if_not_empty Prevent changing an "empty" selection of all columns
* @param if_not_empty Prevent changing an empty selection of all columns

libtiledbsoma/src/soma/soma_column.h Outdated Show resolved Hide resolved
Comment on lines 60 to 63
* @param ctx TileDB context
*/
SOMAColumn(const Context& ctx)
: ctx(ctx){};
Copy link
Member

Choose a reason for hiding this comment

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

Should we take in a tiledb::Context or SOMAContext?

@XanthosXanthopoulos XanthosXanthopoulos changed the title [c++] SOMAColumn [c++] SOMAColumn [WIP] Nov 20, 2024
@XanthosXanthopoulos XanthosXanthopoulos marked this pull request as draft November 20, 2024 20:36
@XanthosXanthopoulos XanthosXanthopoulos force-pushed the xan/sc-59427/soma-column branch 2 times, most recently from 01d39fc to 792dc96 Compare November 21, 2024 13:19
@XanthosXanthopoulos XanthosXanthopoulos force-pushed the xan/sc-59427/soma-column branch 8 times, most recently from 7de2ced to 5c6c484 Compare November 25, 2024 15:50
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
4 participants