Skip to content

Commit ceb3131

Browse files
authored
ci: Refactor sqllogictests (#96)
* ci: Refactor sqllogictests * ci: Fix MinIO sqllogictest failures * test: Stop using removed lance_scan table function
1 parent 24ac595 commit ceb3131

29 files changed

+255
-212
lines changed

AGENTS.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ Uses DuckDB's `sqllogictest` format in `test/sql/`:
106106
- `require lance`: Load the extension
107107

108108
Key test files:
109-
- `test/sql/lance.test` (scan, pushdown, explain diagnostics, replacement scan)
110-
- `test/sql/knn.test` (KNN API validation)
111-
- `test/sql/search.test` (vector/FTS/hybrid search surface)
112-
- `test/sql/lance_s3_minio.test` (S3 scan/search via DuckDB secrets, gated by `LANCE_TEST_S3=1`)
109+
- `test/sql/scan_smoke.test` (scan smoke + replacement scan + error handling)
110+
- `test/sql/scan_limit_offset_sampling.test` (LIMIT/OFFSET and TABLESAMPLE pushdown)
111+
- `test/sql/scan_filter_pushdown.test` (filter/projection pushdown + explain diagnostics)
112+
- `test/sql/search_functions.test` (vector/FTS/hybrid search surface)
113+
- `test/sql/index_ddl.test` (index DDL + index-backed query paths)
114+
- `test/sql/s3_scan_minio.test` (S3 scan/search via DuckDB secrets, gated by `LANCE_TEST_S3=1`)
113115

114116
## Common Issues
115117

test/sql/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# SQLLogicTest Conventions
2+
3+
This directory contains SQLLogicTest suites for the `lance` DuckDB extension.
4+
5+
## File Naming
6+
7+
Tests are grouped by prefix to keep related coverage discoverable:
8+
9+
- `scan_*`: Scan/replacement scan behavior and rowid semantics
10+
- `pushdown_*`: Filter/predicate pushdown and related diagnostics
11+
- `search_*`: `lance_*_search` and `lance_fts` SQL surface
12+
- `index_*`: Index DDL and index-backed query paths
13+
- `optimizer_*`: Optimizer/statistics integration
14+
- `namespace_*`: `ATTACH ... (TYPE LANCE)` namespace mapping and table discovery
15+
- `dml_*`: Write-path SQL (COPY/INSERT/UPDATE/DELETE/TRUNCATE/DROP/ALTER)
16+
- `s3_*`: End-to-end S3 tests (MinIO), gated by `require-env`
17+
- `tpch.test`: TPC-H correctness suite
18+
- `bench_*`: Larger correctness suites and fixtures (e.g., BigANN)
19+
20+
## Header and Layout
21+
22+
Each file starts with:
23+
24+
- `# name: ...`
25+
- `# description: ...`
26+
- `# group: [sql]`
27+
28+
For environment-gated tests, use this order:
29+
30+
1. `require-env ...`
31+
2. `test-env ...` (separate each entry with an empty line)
32+
3. `require lance`
33+
34+
Prefer small, focused files with section comments for setup, correctness, and diagnostics.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# name: test/sql/bigann_tiny.test
1+
# name: test/sql/bench_bigann_tiny.test
22
# description: Big-ANN style fixture coverage (exact + prefilter + index path)
33
# group: [sql]
44

test/sql/alter_table_schema_evolution.test renamed to test/sql/dml_alter_table_schema_evolution.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# name: test/sql/alter_table_schema_evolution.test
1+
# name: test/sql/dml_alter_table_schema_evolution.test
22
# description: ALTER TABLE schema evolution for attached Lance tables
33
# group: [sql]
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# name: test/sql/lance_write.test
1+
# name: test/sql/dml_copy_to.test
22
# description: COPY TO (FORMAT lance) writes datasets
33
# group: [sql]
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# name: test/sql/lance_delete.test
1+
# name: test/sql/dml_delete.test
22
# description: DELETE FROM ... WHERE ... deletes rows in Lance datasets
33
# group: [sql]
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# name: test/sql/drop_table.test
1+
# name: test/sql/dml_drop_table.test
22
# description: DROP TABLE deletes Lance datasets in attached directory namespaces
33
# group: [sql]
44

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# name: test/sql/lance_insert.test
1+
# name: test/sql/dml_insert.test
22
# description: INSERT INTO appends to Lance datasets
33
# group: [sql]
44

@@ -70,4 +70,3 @@ SELECT sum(id) FROM ns.main.lance_insert_append;
7070

7171
statement ok
7272
DETACH ns;
73-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# name: test/sql/truncate_table.test
1+
# name: test/sql/dml_truncate.test
22
# description: TRUNCATE TABLE for Lance namespace tables
33
# group: [sql]
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# name: test/sql/lance_update.test
1+
# name: test/sql/dml_update.test
22
# description: UPDATE ... SET ... WHERE updates Lance datasets
33
# group: [sql]
44

0 commit comments

Comments
 (0)