-
Notifications
You must be signed in to change notification settings - Fork 185
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
Support var length dimension labels from Python #4142
Conversation
This pull request has been linked to Shortcut Story #29317: Dimension label Python API String read support. |
4903c72
to
107803e
Compare
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.
As discussed previously, you may want to consider how to make the changes here work for both range and data dimension label queries to prevent issues down the line. A query can have either or both for a single dimension label.
I also made some comments about moving things to the experimental C++ API. I don't know how careful we want to be about not adding experimental C API to the C++ API, so you may want to check with someone else on that. Feel free to ignore those comments if we don't care as a rule.
I was working on tests for est_result_size_label variants yesterday and noticed it only works after the query is initialized. Before Query::init(), Query::dim_label_queries_ is null. I did some more testing this morning and found that the only required change to support var length labels in python was result_buffer_elements. I updated my branch for TileDB-Py this morning and CI seems to agree. All done making changes here though, will watch for review / CI failures. |
Adds [result_buffer_elements_nullable](https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/core.cc#L717) to support variable size dimension labels in TileDB-Py. --- TYPE: FEATURE DESC: Adds support for var length dimension label reads from Python
Adds [result_buffer_elements_nullable](https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/core.cc#L717) to support variable size dimension labels in TileDB-Py. --- TYPE: FEATURE DESC: Adds support for var length dimension label reads from Python Co-authored-by: Shaun M Reed <shaunrd0@gmail.com>
* If the query has not been submitted, an empty map is returned. | ||
*/ | ||
static std::unordered_map<std::string, std::pair<uint64_t, uint64_t>> | ||
result_buffer_elements(const Query& query) { |
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.
This seems like it's operating only on dimension labels? If so, the function name should reflect that. The comment should also be updated. Same below.
* Throws if there is no label data query on dim_idx. | ||
* | ||
* @param dim_idx Dimension index for label data query. | ||
* @returns Vector of DimensionLabelQuery on dim_idx |
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.
NIT: double space.
Adds support for variable length dimension label reads. This change requires TileDB-Inc/TileDB#4142 to add dimension label support for [result_buffer_elements_nullable](https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/core.cc#L717) to size read offset buffers. The experimental dimension label variant of this function is defined as `QueryExperimental::result_buffer_elements_nullable_labels` and used in this PR to determine the number of offsets read by the var-size dimension label query.
Adds support for variable length dimension label reads. This change requires TileDB-Inc/TileDB#4142 to add dimension label support for [result_buffer_elements_nullable](https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/core.cc#L717) to size read offset buffers. The experimental dimension label variant of this function is defined as `QueryExperimental::result_buffer_elements_nullable_labels` and used in this PR to determine the number of offsets read by the var-size dimension label query.
Adds support for variable length dimension label reads. This change requires TileDB-Inc/TileDB#4142 to add dimension label support for [result_buffer_elements_nullable](https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/core.cc#L717) to size read offset buffers. The experimental dimension label variant of this function is defined as `QueryExperimental::result_buffer_elements_nullable_labels` and used in this PR to determine the number of offsets read by the var-size dimension label query.
Adds support for variable length dimension label reads. This change requires TileDB-Inc/TileDB#4142 to add dimension label support for [result_buffer_elements_nullable](https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/core.cc#L717) to size read offset buffers. The experimental dimension label variant of this function is defined as `QueryExperimental::result_buffer_elements_nullable_labels` and used in this PR to determine the number of offsets read by the var-size dimension label query.
Adds result_buffer_elements_nullable to support variable size dimension labels in TileDB-Py.
TYPE: FEATURE
DESC: Adds support for var length dimension label reads from Python