Skip to content

Conversation

@yuvalif
Copy link
Collaborator

@yuvalif yuvalif commented Dec 22, 2025

No description provided.

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]>
@yuvalif yuvalif force-pushed the add-unittest-coverage branch from b541516 to fbab149 Compare December 22, 2025 21:05
Copy link

Copilot AI left a 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]>
@yuvalif yuvalif merged commit 8a5a150 into lancedb:main Dec 29, 2025
1 check passed
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.

1 participant