Skip to content

Allow query conditions on dense array dimensions#2303

Merged
kounelisagis merged 2 commits intomainfrom
agis/qc-dense-dim
Mar 6, 2026
Merged

Allow query conditions on dense array dimensions#2303
kounelisagis merged 2 commits intomainfrom
agis/qc-dense-dim

Conversation

@kounelisagis
Copy link
Member

This PR removes Python-side guard that blocked query conditions on dimensions for dense arrays. This was originally added in #722 when Core didn't support QC on dimensions at all. Core has supported this since PR TileDB-Inc/TileDB#3887 but the Python guard was never updated.

@kounelisagis kounelisagis requested review from ihnorton and ktsitsi March 6, 2026 07:57
Copy link
Contributor

@ktsitsi ktsitsi left a comment

Choose a reason for hiding this comment

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

What happens if the attribute and the dimension have the same id? How is this resolved?

@kounelisagis
Copy link
Member Author

What happens if the attribute and the dimension have the same id? How is this resolved?

Core's ArraySchema::check_attribute_dimension_label_names() throws on ArraySchema creation. So, that's not possible:

>>> import tiledb, numpy as np
>>> dom = tiledb.Domain(tiledb.Dim(name='x', domain=(0, 9), tile=10, dtype=np.int32))                                                               
>>> attr = tiledb.Attr(name='x', dtype=np.int32)                               
>>> schema = tiledb.ArraySchema(domain=dom, attrs=[attr])                      
TileDBError: ArraySchema: Array schema check failed; Attributes, dimensions and
   dimension labels must have unique names

@ktsitsi ktsitsi self-requested a review March 6, 2026 15:53
Copy link
Contributor

@ktsitsi ktsitsi left a comment

Choose a reason for hiding this comment

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

LGTM!

@kounelisagis kounelisagis merged commit ea5016d into main Mar 6, 2026
27 checks passed
@kounelisagis kounelisagis deleted the agis/qc-dense-dim branch March 6, 2026 16:11
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