Commit d9b02a9
feat: Add comprehensive GTest suite for Lance writer
Implements comprehensive unit and integration tests for Lance FFI writer:
**Test Coverage:**
- Basic initialization and path handling
- Single and multiple batch writes
- Schema locking and validation
- Empty and null batch handling
- Nullable field support
- All major Arrow data types (int32/64, float32/64, utf8, date32, boolean)
- Proper cleanup and destructor handling
**Test Organization:**
- LanceWriterBasicTest: Initialization tests
- LanceWriterIntegrationTest: End-to-end dataset creation tests
- LanceWriterDataTypeTest: Data type support verification
**Configuration:**
- Tests are guarded by TPCH_ENABLE_LANCE and TPCH_BUILD_TESTS flags
- Only built when both flags are enabled
- Follows existing test patterns (Paimon writer tests)
- Uses CMake gtest_discover_tests for automatic test discovery
**Benefits:**
- Regression prevention for Lance writer functionality
- Validates critical operations (schema locking, batch streaming)
- Ensures null handling and error conditions work correctly
- Safe guard for future maintenance and refactoring
Addresses PR #5 review comment: "Large new Lance writer functionality has no automated tests"
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent 0bafb2c commit d9b02a9
2 files changed
Lines changed: 572 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
81 | 101 | | |
82 | 102 | | |
0 commit comments