Skip to content

Commit f7beba8

Browse files
authored
feat: Add CREATE/DROP/LIST INDEX support (#76)
1 parent 6908f65 commit f7beba8

10 files changed

Lines changed: 2195 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ set(EXTENSION_SOURCES src/lance_extension.cpp src/lance_scan.cpp
1818
src/lance_delete.cpp
1919
src/lance_update.cpp
2020
src/lance_write.cpp
21-
src/lance_truncate.cpp)
21+
src/lance_truncate.cpp
22+
src/lance_index.cpp)
2223

2324
build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES})
2425
build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES})
@@ -118,13 +119,15 @@ set(RUST_FFI_DEPENDS
118119
${CMAKE_CURRENT_LIST_DIR}/rust/filter_ir.rs
119120
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/arrow_export.rs
120121
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/dataset.rs
122+
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/index.rs
121123
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/knn.rs
122124
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/mod.rs
123125
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/projection.rs
124126
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/scan.rs
125127
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/search.rs
126128
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/stream.rs
127129
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/types.rs
130+
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/update.rs
128131
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/util.rs
129132
${CMAKE_CURRENT_LIST_DIR}/rust/ffi/write.rs
130133
${CMAKE_CURRENT_LIST_DIR}/rust/lib.rs

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ async-trait = "0.1"
3737
datafusion-common = "50.3.0"
3838
datafusion-expr = "50.3.0"
3939
datafusion-functions = "50.3.0"
40-
datafusion-sql = "50.3.0"
41-
lance-index = "1.0.0"
42-
roaring = "0.10.12"
40+
datafusion-sql = "50.3.0"
41+
lance-index = "1.0.0"
42+
lance-linalg = "1.0.0"
43+
roaring = "0.10.12"
44+
serde_json = "1.0"

rust/error.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ pub enum ErrorCode {
3333
DirNamespaceDropTable = 26,
3434
DatasetDelete = 27,
3535
DatasetUpdateOverwrite = 28,
36+
DatasetCreateIndex = 29,
37+
DatasetDropIndex = 30,
38+
DatasetDescribeIndices = 31,
39+
DatasetOptimizeIndices = 32,
40+
IndexSchema = 33,
41+
IndexStreamCreate = 34,
3642
}
3743

3844
struct LastError {

0 commit comments

Comments
 (0)