|
| 1 | +// SPDX-License-Identifier: Apache-2.0 |
| 2 | +// SPDX-FileCopyrightText: Copyright The Lance Authors |
| 3 | + |
| 4 | +syntax = "proto3"; |
| 5 | + |
| 6 | +package lance.pb; |
| 7 | + |
| 8 | +import "table_identifier.proto"; |
| 9 | +import "table.proto"; |
| 10 | +import "index.proto"; |
| 11 | + |
| 12 | +// Serialized vector query parameters. |
| 13 | +message VectorQueryProto { |
| 14 | + // Query vector as Arrow IPC bytes (supports Float16, Float32, Float64, UInt8, etc.) |
| 15 | + bytes query_vector_arrow_ipc = 1; |
| 16 | + string column = 2; |
| 17 | + uint32 k = 3; |
| 18 | + optional float lower_bound = 4; |
| 19 | + optional float upper_bound = 5; |
| 20 | + optional uint32 minimum_nprobes = 6; |
| 21 | + optional uint32 maximum_nprobes = 7; |
| 22 | + optional uint32 ef = 8; |
| 23 | + optional uint32 refine_factor = 9; |
| 24 | + // Distance metric type. Absent means None (use the index's default metric). |
| 25 | + optional lance.index.pb.VectorMetricType metric_type = 10; |
| 26 | + bool use_index = 11; |
| 27 | + optional float dist_q_c = 12; |
| 28 | +} |
| 29 | + |
| 30 | +// Serializable form of ANNIvfSubIndexExec — the IVF sub-index search node. |
| 31 | +// |
| 32 | +// Note: ANNIvfSubIndexExec.prefilter_source (child ExecutionPlan) is NOT |
| 33 | +// serialized here. DataFusion's PhysicalExtensionCodec handles child plans |
| 34 | +// automatically via children() / with_new_children(). The codec receives |
| 35 | +// deserialized children in the `inputs` parameter of try_decode and |
| 36 | +// reconstructs the PreFilterSource from them. |
| 37 | +message ANNIvfSubIndexExecProto { |
| 38 | + VectorQueryProto query = 1; |
| 39 | + lance.datafusion.TableIdentifier table = 2; |
| 40 | + repeated lance.table.IndexMetadata indices = 3; |
| 41 | +} |
0 commit comments