-
Notifications
You must be signed in to change notification settings - Fork 3
Add unittest coverage #4
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
Conversation
Signed-off-by: Yuval Lifshitz <[email protected]>
also, add coverage for connection builder APIs Signed-off-by: Yuval Lifshitz <[email protected]>
* table * index and vector index * query and vector query Signed-off-by: Yuval Lifshitz <[email protected]>
Signed-off-by: Yuval Lifshitz <[email protected]>
b541516 to
fbab149
Compare
Signed-off-by: Yuval Lifshitz <[email protected]>
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.
Pull request overview
This PR adds comprehensive unittest coverage for the LanceDB C API, significantly improving test infrastructure and test organization. The changes introduce 5 new test files covering different functional areas with over 2000 lines of test code, refactored test fixtures for better isolation, and enhanced CI configuration with valgrind memory checking.
Key changes:
- Refactored test infrastructure with BaseFixture and LanceDBFixture hierarchy, adding random directory generation for test isolation
- Added comprehensive test coverage for table operations, scalar/vector indices, queries, and vector queries
- Enhanced documentation for vector query parameters (nprobes, refine_factor, ef) with detailed explanations
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_common.h | Added BaseFixture with random directory generation for test isolation; added helper functions for schema and data creation |
| tests/test_common.cpp | Implemented helper functions for creating test schemas, record batches, and tables with data |
| tests/test_connection.cpp | Added connection builder tests with storage options and validation |
| tests/test_table.cpp | Added comprehensive tests for table creation, add operations, and merge_insert with various configurations |
| tests/test_index.cpp | Added tests for scalar index creation, listing, dropping, and replacement |
| tests/test_vector_index.cpp | Added tests for all vector index types (IVF_FLAT, IVF_PQ, IVF_HNSW_PQ, IVF_HNSW_SQ) |
| tests/test_query.cpp | Added tests for query operations with filters, pagination, and index usage |
| tests/test_vector_query.cpp | Added extensive tests for vector queries covering different index types and query parameters |
| CMakeLists.txt | Split tests into 6 separate executables; configured valgrind for memory checking on appropriate tests |
| include/lancedb.h | Enhanced documentation for nprobes, refine_factor, and ef parameters with detailed explanations |
| .github/workflows/ci.yml | Added valgrind installation and updated test execution to use ctest with parallelization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Yuval Lifshitz <[email protected]>
No description provided.