test(python): add nested field regression matrix tests#3518
Merged
wjones127 merged 2 commits intoJun 11, 2026
Merged
Conversation
Add a regression matrix covering the nested field index lifecycle for both sync and async Python table APIs. Tests verify that list_indices, index_stats, search, filter, append, and optimize all use canonical full dotted field paths rather than leaf-only names. Field-name edge cases covered: - rowId (camelCase top-level) - `row-id` (hyphenated top-level, escaped) - parent.`leaf.name` (struct leaf with a literal dot in its name) - MetaData.userId (mixed-case nested path) - `meta-data`.`user-id` (hyphenated struct + hyphenated leaf) Index types covered: BTree scalar, IvfPq vector, FTS.
wjones127
approved these changes
Jun 9, 2026
wjones127
left a comment
Contributor
There was a problem hiding this comment.
This looks good. I have a suggestion for an additional test case, but if it's turns out to be failing or too complex, happy to defer to a follow up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3406
Add a regression matrix in
python/python/tests/test_nested_fields.pythat exercises the full nested field index lifecycle for both the sync and async Python table APIs. The tests will fail if any implementation regresses to leaf-only field names inlist_indices,index_stats, search, or filter results.Test scenarios covered
Index types: BTree scalar, IvfPq vector, FTS
Field-name edge cases (per acceptance criteria):
rowId— camelCase top-level field`row-id`— hyphenated top-level field (escaped)parent.`leaf.name`— struct leaf whose name contains a literal dotMetaData.userId— mixed-case nested path`meta-data`.`user-id`— hyphenated struct with hyphenated leafLifecycle operations per index type:
create_index/create_scalar_index/create_fts_indexlist_indices→ verify canonical full dotted path (not leaf name)index_stats→ verify row count and index typeWHERE nested.field = value)add(append) then re-check index listingoptimizethen re-check index listingBoth sync and async APIs are covered in parallel test classes.
Notes
Lance forbids top-level field names that contain a literal
., so the`a.b`acceptance-criterion variant is exercised as a struct leaf field (parent.`leaf.name``) rather than a top-level column.