diff --git a/weed/pb/Makefile b/weed/pb/Makefile index 7b0a9dd6b..623cdb568 100644 --- a/weed/pb/Makefile +++ b/weed/pb/Makefile @@ -18,6 +18,8 @@ gen: protoc worker.proto --go_out=./worker_pb --go-grpc_out=./worker_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative mkdir -p ./plugin_pb protoc plugin.proto --go_out=./plugin_pb --go-grpc_out=./plugin_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative + mkdir -p ./parquet_pushdown_pb + protoc parquet_pushdown.proto --go_out=./parquet_pushdown_pb --go-grpc_out=./parquet_pushdown_pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative # protoc filer.proto --java_out=../../other/java/client/src/main/java cp filer.proto ../../other/java/client/src/main/proto cp volume_server.proto master.proto remote.proto ../../seaweed-volume/proto/ diff --git a/weed/pb/parquet_pushdown.proto b/weed/pb/parquet_pushdown.proto new file mode 100644 index 000000000..66d3c2499 --- /dev/null +++ b/weed/pb/parquet_pushdown.proto @@ -0,0 +1,234 @@ +syntax = "proto3"; + +package parquet_pushdown_pb; + +option go_package = "github.com/seaweedfs/seaweedfs/weed/pb/parquet_pushdown_pb"; + +// SeaweedParquetPushdown is the gRPC surface of the standalone +// `weed pushdown` daemon. See PARQUET_PUSHDOWN_DESIGN.md and +// PARQUET_PUSHDOWN_DEV_PLAN.md for the surrounding design. +service SeaweedParquetPushdown { + // Ping returns daemon liveness information. Cheap; intended for + // smoke tests and connector health checks. + rpc Ping (PingRequest) returns (PingResponse); + + // Pushdown takes a planner-resolved set of Iceberg data files and + // returns the byte ranges, row groups, pages, and (optionally) row + // refs that satisfy the request's predicate and vector clauses. + // M0 returns Unimplemented; later milestones fill in pruning logic. + rpc Pushdown (ParquetPushdownRequest) returns (ParquetPushdownResponse); +} + +// -- Ping -------------------------------------------------------------------- + +message PingRequest {} + +message PingResponse { + string version = 1; + // TrustMode the daemon is configured for: "catalog-validated" or + // "connector-trusted". Connector-trusted is dev-only. + string trust_mode = 2; +} + +// -- Request ----------------------------------------------------------------- + +message ParquetPushdownRequest { + string table = 1; + int64 snapshot_id = 2; + + // The authoritative list of files to scan, already resolved by the + // client's Iceberg planner. The server validates these against the + // catalog when running in catalog-validated trust mode. + repeated DataFileDescriptor data_files = 3; + + // Columns to project. Identified by Iceberg field id (preferred) + // or path hint (fallback for non-Iceberg-managed Parquet). + repeated ColumnRef columns = 4; + + PredicateKind predicate_kind = 5; + bytes predicate = 6; // serialized per predicate_kind + + VectorQuery vector_query = 7; + + int32 limit = 8; + + // If true, the response may include per-row refs (RowRef list). + // Bounded by max_row_ids. + bool request_row_ids = 9; + int32 max_row_ids = 10; +} + +message DataFileDescriptor { + string path = 1; + int64 size_bytes = 2; // Iceberg manifest file_size_in_bytes + int64 record_count = 3; // Iceberg manifest record_count + string etag = 4; // optional, when no Iceberg manifest + + // Iceberg manifest entry's data_sequence_number; drives + // delete-file applicability (NOT file_sequence_number). + int64 data_sequence_number = 5; + + // Partition spec id and serialized partition values; required to + // match delete-file applicability for partitioned tables. + int32 partition_spec_id = 6; + bytes partition_values = 7; + + // Position-delete files, equality-delete files, and deletion + // vectors that apply to this data file. Discriminated by + // DeleteFileRef.content + DeleteFileRef.file_format. + repeated DeleteFileRef deletes = 8; +} + +message DeleteFileRef { + string path = 1; + int64 size_bytes = 2; + + // Iceberg manifest entry's data_sequence_number for this delete + // file. Applicability rule: + // data_file.seq <= delete_file.seq for position deletes / DVs + // data_file.seq < delete_file.seq for equality deletes + int64 data_sequence_number = 3; + + // Partition spec id and serialized partition values; must match + // the data file's partition for the delete to apply. + int32 partition_spec_id = 4; + bytes partition_values = 5; + + DeleteContent content = 6; // POSITION_DELETES / EQUALITY_DELETES + FileFormat file_format = 7; // PARQUET / AVRO / ORC / PUFFIN + + // Required for content == EQUALITY_DELETES, empty otherwise. + repeated int32 equality_field_ids = 8; + + // Puffin-only: when content == POSITION_DELETES and file_format + // == PUFFIN (deletion vectors), the DV blob lives at + // (path, blob_offset, blob_length). blob_crc32 is the Puffin + // footer's per-blob CRC, used for tamper detection (not as + // identity for cache lookup). + int64 blob_offset = 9; + int64 blob_length = 10; + uint32 blob_crc32 = 11; + + // When this delete file targets one specific data file (mandatory + // for v3 deletion vectors). Empty when the delete file may target + // many data files. + string referenced_data_file = 12; +} + +enum DeleteContent { + DELETE_CONTENT_UNSPECIFIED = 0; + POSITION_DELETES = 1; // Iceberg manifest content=1 (file or DV) + EQUALITY_DELETES = 2; // Iceberg manifest content=2 + // Iceberg v3 deletion vectors are POSITION_DELETES with + // file_format == PUFFIN; there is no separate enum value. +} + +enum FileFormat { + FILE_FORMAT_UNSPECIFIED = 0; + FILE_FORMAT_PARQUET = 1; + FILE_FORMAT_AVRO = 2; + FILE_FORMAT_ORC = 3; + FILE_FORMAT_PUFFIN = 4; +} + +enum PredicateKind { + PREDICATE_KIND_UNSPECIFIED = 0; + PREDICATE_KIND_SUBSTRAIT = 1; // Substrait ExtendedExpression protobuf + PREDICATE_KIND_ICEBERG = 2; // Iceberg Expression JSON +} + +enum VectorMetric { + VECTOR_METRIC_UNSPECIFIED = 0; + VECTOR_METRIC_L2 = 1; + VECTOR_METRIC_COSINE = 2; + VECTOR_METRIC_DOT = 3; +} + +message VectorQuery { + ColumnRef column = 1; + repeated float vector = 2; + VectorMetric metric = 3; + int32 top_k = 4; + int32 nprobe = 5; +} + +// ColumnRef identifies a column by Iceberg field id (stable across +// rename and reordering). Path is an optional hint used only when +// field_id == 0 (e.g. non-Iceberg Parquet that has no field ids). +message ColumnRef { + int32 field_id = 1; + string path = 2; +} + +// -- Response ---------------------------------------------------------------- + +message ParquetPushdownResponse { + repeated FileRange file_ranges = 1; + repeated RowGroupRef row_groups = 2; + repeated PageRef pages = 3; + + // Optional, emitted only when request.request_row_ids is true and + // the result fits within request.max_row_ids. + repeated ScoredRowRef row_refs = 4; + + // True if a row-ref list was omitted or truncated due to size cap. + bool truncated = 5; + + PushdownStats stats = 6; +} + +message FileRange { + string file = 1; + int64 offset = 2; + int64 length = 3; +} + +message RowGroupRef { + string file = 1; + int32 row_group = 2; +} + +message PageRef { + string file = 1; + int32 row_group = 2; + ColumnRef column = 3; + int32 page = 4; + int64 offset = 5; + int64 length = 6; +} + +// RowRef identifies a row by file-absolute position (matching Iceberg +// position-delete semantics). row_group is a locality hint, not +// authoritative. +message RowRef { + string file = 1; + int32 row_group = 2; + int64 file_position = 3; +} + +message ScoredRowRef { + RowRef ref = 1; + float score = 2; +} + +message PushdownStats { + // The trust mode that serviced this request. + string trust_mode = 1; + + // Server-side wall time spent on this request, in microseconds. + int64 server_time_micros = 2; + + // Filled in by later milestones as the corresponding subsystems + // come online. Names use the design doc's per-feature labels. + int64 footer_cache_hits = 3; + int64 footer_cache_misses = 4; + int64 row_groups_pruned = 5; + int64 pages_pruned = 6; + int64 bytes_planned_scan = 7; + + // Side indexes consulted vs missing, by index kind ("bloom", + // "bitmap", "btree", "page", "vector", ...). Useful both for + // observability and for the connector's cost-model feedback loop. + repeated string indexes_used = 8; + repeated string indexes_missing = 9; +} diff --git a/weed/pb/parquet_pushdown_pb/parquet_pushdown.pb.go b/weed/pb/parquet_pushdown_pb/parquet_pushdown.pb.go new file mode 100644 index 000000000..3a9bbd5b1 --- /dev/null +++ b/weed/pb/parquet_pushdown_pb/parquet_pushdown.pb.go @@ -0,0 +1,1553 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.6 +// protoc v6.33.4 +// source: parquet_pushdown.proto + +package parquet_pushdown_pb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DeleteContent int32 + +const ( + DeleteContent_DELETE_CONTENT_UNSPECIFIED DeleteContent = 0 + DeleteContent_POSITION_DELETES DeleteContent = 1 // Iceberg manifest content=1 (file or DV) + DeleteContent_EQUALITY_DELETES DeleteContent = 2 // Iceberg manifest content=2 +) + +// Enum value maps for DeleteContent. +var ( + DeleteContent_name = map[int32]string{ + 0: "DELETE_CONTENT_UNSPECIFIED", + 1: "POSITION_DELETES", + 2: "EQUALITY_DELETES", + } + DeleteContent_value = map[string]int32{ + "DELETE_CONTENT_UNSPECIFIED": 0, + "POSITION_DELETES": 1, + "EQUALITY_DELETES": 2, + } +) + +func (x DeleteContent) Enum() *DeleteContent { + p := new(DeleteContent) + *p = x + return p +} + +func (x DeleteContent) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DeleteContent) Descriptor() protoreflect.EnumDescriptor { + return file_parquet_pushdown_proto_enumTypes[0].Descriptor() +} + +func (DeleteContent) Type() protoreflect.EnumType { + return &file_parquet_pushdown_proto_enumTypes[0] +} + +func (x DeleteContent) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DeleteContent.Descriptor instead. +func (DeleteContent) EnumDescriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{0} +} + +type FileFormat int32 + +const ( + FileFormat_FILE_FORMAT_UNSPECIFIED FileFormat = 0 + FileFormat_FILE_FORMAT_PARQUET FileFormat = 1 + FileFormat_FILE_FORMAT_AVRO FileFormat = 2 + FileFormat_FILE_FORMAT_ORC FileFormat = 3 + FileFormat_FILE_FORMAT_PUFFIN FileFormat = 4 +) + +// Enum value maps for FileFormat. +var ( + FileFormat_name = map[int32]string{ + 0: "FILE_FORMAT_UNSPECIFIED", + 1: "FILE_FORMAT_PARQUET", + 2: "FILE_FORMAT_AVRO", + 3: "FILE_FORMAT_ORC", + 4: "FILE_FORMAT_PUFFIN", + } + FileFormat_value = map[string]int32{ + "FILE_FORMAT_UNSPECIFIED": 0, + "FILE_FORMAT_PARQUET": 1, + "FILE_FORMAT_AVRO": 2, + "FILE_FORMAT_ORC": 3, + "FILE_FORMAT_PUFFIN": 4, + } +) + +func (x FileFormat) Enum() *FileFormat { + p := new(FileFormat) + *p = x + return p +} + +func (x FileFormat) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FileFormat) Descriptor() protoreflect.EnumDescriptor { + return file_parquet_pushdown_proto_enumTypes[1].Descriptor() +} + +func (FileFormat) Type() protoreflect.EnumType { + return &file_parquet_pushdown_proto_enumTypes[1] +} + +func (x FileFormat) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FileFormat.Descriptor instead. +func (FileFormat) EnumDescriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{1} +} + +type PredicateKind int32 + +const ( + PredicateKind_PREDICATE_KIND_UNSPECIFIED PredicateKind = 0 + PredicateKind_PREDICATE_KIND_SUBSTRAIT PredicateKind = 1 // Substrait ExtendedExpression protobuf + PredicateKind_PREDICATE_KIND_ICEBERG PredicateKind = 2 // Iceberg Expression JSON +) + +// Enum value maps for PredicateKind. +var ( + PredicateKind_name = map[int32]string{ + 0: "PREDICATE_KIND_UNSPECIFIED", + 1: "PREDICATE_KIND_SUBSTRAIT", + 2: "PREDICATE_KIND_ICEBERG", + } + PredicateKind_value = map[string]int32{ + "PREDICATE_KIND_UNSPECIFIED": 0, + "PREDICATE_KIND_SUBSTRAIT": 1, + "PREDICATE_KIND_ICEBERG": 2, + } +) + +func (x PredicateKind) Enum() *PredicateKind { + p := new(PredicateKind) + *p = x + return p +} + +func (x PredicateKind) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PredicateKind) Descriptor() protoreflect.EnumDescriptor { + return file_parquet_pushdown_proto_enumTypes[2].Descriptor() +} + +func (PredicateKind) Type() protoreflect.EnumType { + return &file_parquet_pushdown_proto_enumTypes[2] +} + +func (x PredicateKind) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PredicateKind.Descriptor instead. +func (PredicateKind) EnumDescriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{2} +} + +type VectorMetric int32 + +const ( + VectorMetric_VECTOR_METRIC_UNSPECIFIED VectorMetric = 0 + VectorMetric_VECTOR_METRIC_L2 VectorMetric = 1 + VectorMetric_VECTOR_METRIC_COSINE VectorMetric = 2 + VectorMetric_VECTOR_METRIC_DOT VectorMetric = 3 +) + +// Enum value maps for VectorMetric. +var ( + VectorMetric_name = map[int32]string{ + 0: "VECTOR_METRIC_UNSPECIFIED", + 1: "VECTOR_METRIC_L2", + 2: "VECTOR_METRIC_COSINE", + 3: "VECTOR_METRIC_DOT", + } + VectorMetric_value = map[string]int32{ + "VECTOR_METRIC_UNSPECIFIED": 0, + "VECTOR_METRIC_L2": 1, + "VECTOR_METRIC_COSINE": 2, + "VECTOR_METRIC_DOT": 3, + } +) + +func (x VectorMetric) Enum() *VectorMetric { + p := new(VectorMetric) + *p = x + return p +} + +func (x VectorMetric) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VectorMetric) Descriptor() protoreflect.EnumDescriptor { + return file_parquet_pushdown_proto_enumTypes[3].Descriptor() +} + +func (VectorMetric) Type() protoreflect.EnumType { + return &file_parquet_pushdown_proto_enumTypes[3] +} + +func (x VectorMetric) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VectorMetric.Descriptor instead. +func (VectorMetric) EnumDescriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{3} +} + +type PingRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PingRequest) Reset() { + *x = PingRequest{} + mi := &file_parquet_pushdown_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingRequest) ProtoMessage() {} + +func (x *PingRequest) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead. +func (*PingRequest) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{0} +} + +type PingResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // TrustMode the daemon is configured for: "catalog-validated" or + // "connector-trusted". Connector-trusted is dev-only. + TrustMode string `protobuf:"bytes,2,opt,name=trust_mode,json=trustMode,proto3" json:"trust_mode,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PingResponse) Reset() { + *x = PingResponse{} + mi := &file_parquet_pushdown_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PingResponse) ProtoMessage() {} + +func (x *PingResponse) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PingResponse.ProtoReflect.Descriptor instead. +func (*PingResponse) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{1} +} + +func (x *PingResponse) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *PingResponse) GetTrustMode() string { + if x != nil { + return x.TrustMode + } + return "" +} + +type ParquetPushdownRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Table string `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` + SnapshotId int64 `protobuf:"varint,2,opt,name=snapshot_id,json=snapshotId,proto3" json:"snapshot_id,omitempty"` + // The authoritative list of files to scan, already resolved by the + // client's Iceberg planner. The server validates these against the + // catalog when running in catalog-validated trust mode. + DataFiles []*DataFileDescriptor `protobuf:"bytes,3,rep,name=data_files,json=dataFiles,proto3" json:"data_files,omitempty"` + // Columns to project. Identified by Iceberg field id (preferred) + // or path hint (fallback for non-Iceberg-managed Parquet). + Columns []*ColumnRef `protobuf:"bytes,4,rep,name=columns,proto3" json:"columns,omitempty"` + PredicateKind PredicateKind `protobuf:"varint,5,opt,name=predicate_kind,json=predicateKind,proto3,enum=parquet_pushdown_pb.PredicateKind" json:"predicate_kind,omitempty"` + Predicate []byte `protobuf:"bytes,6,opt,name=predicate,proto3" json:"predicate,omitempty"` // serialized per predicate_kind + VectorQuery *VectorQuery `protobuf:"bytes,7,opt,name=vector_query,json=vectorQuery,proto3" json:"vector_query,omitempty"` + Limit int32 `protobuf:"varint,8,opt,name=limit,proto3" json:"limit,omitempty"` + // If true, the response may include per-row refs (RowRef list). + // Bounded by max_row_ids. + RequestRowIds bool `protobuf:"varint,9,opt,name=request_row_ids,json=requestRowIds,proto3" json:"request_row_ids,omitempty"` + MaxRowIds int32 `protobuf:"varint,10,opt,name=max_row_ids,json=maxRowIds,proto3" json:"max_row_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParquetPushdownRequest) Reset() { + *x = ParquetPushdownRequest{} + mi := &file_parquet_pushdown_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParquetPushdownRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParquetPushdownRequest) ProtoMessage() {} + +func (x *ParquetPushdownRequest) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParquetPushdownRequest.ProtoReflect.Descriptor instead. +func (*ParquetPushdownRequest) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{2} +} + +func (x *ParquetPushdownRequest) GetTable() string { + if x != nil { + return x.Table + } + return "" +} + +func (x *ParquetPushdownRequest) GetSnapshotId() int64 { + if x != nil { + return x.SnapshotId + } + return 0 +} + +func (x *ParquetPushdownRequest) GetDataFiles() []*DataFileDescriptor { + if x != nil { + return x.DataFiles + } + return nil +} + +func (x *ParquetPushdownRequest) GetColumns() []*ColumnRef { + if x != nil { + return x.Columns + } + return nil +} + +func (x *ParquetPushdownRequest) GetPredicateKind() PredicateKind { + if x != nil { + return x.PredicateKind + } + return PredicateKind_PREDICATE_KIND_UNSPECIFIED +} + +func (x *ParquetPushdownRequest) GetPredicate() []byte { + if x != nil { + return x.Predicate + } + return nil +} + +func (x *ParquetPushdownRequest) GetVectorQuery() *VectorQuery { + if x != nil { + return x.VectorQuery + } + return nil +} + +func (x *ParquetPushdownRequest) GetLimit() int32 { + if x != nil { + return x.Limit + } + return 0 +} + +func (x *ParquetPushdownRequest) GetRequestRowIds() bool { + if x != nil { + return x.RequestRowIds + } + return false +} + +func (x *ParquetPushdownRequest) GetMaxRowIds() int32 { + if x != nil { + return x.MaxRowIds + } + return 0 +} + +type DataFileDescriptor struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` // Iceberg manifest file_size_in_bytes + RecordCount int64 `protobuf:"varint,3,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty"` // Iceberg manifest record_count + Etag string `protobuf:"bytes,4,opt,name=etag,proto3" json:"etag,omitempty"` // optional, when no Iceberg manifest + // Iceberg manifest entry's data_sequence_number; drives + // delete-file applicability (NOT file_sequence_number). + DataSequenceNumber int64 `protobuf:"varint,5,opt,name=data_sequence_number,json=dataSequenceNumber,proto3" json:"data_sequence_number,omitempty"` + // Partition spec id and serialized partition values; required to + // match delete-file applicability for partitioned tables. + PartitionSpecId int32 `protobuf:"varint,6,opt,name=partition_spec_id,json=partitionSpecId,proto3" json:"partition_spec_id,omitempty"` + PartitionValues []byte `protobuf:"bytes,7,opt,name=partition_values,json=partitionValues,proto3" json:"partition_values,omitempty"` + // Position-delete files, equality-delete files, and deletion + // vectors that apply to this data file. Discriminated by + // DeleteFileRef.content + DeleteFileRef.file_format. + Deletes []*DeleteFileRef `protobuf:"bytes,8,rep,name=deletes,proto3" json:"deletes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DataFileDescriptor) Reset() { + *x = DataFileDescriptor{} + mi := &file_parquet_pushdown_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DataFileDescriptor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataFileDescriptor) ProtoMessage() {} + +func (x *DataFileDescriptor) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataFileDescriptor.ProtoReflect.Descriptor instead. +func (*DataFileDescriptor) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{3} +} + +func (x *DataFileDescriptor) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *DataFileDescriptor) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *DataFileDescriptor) GetRecordCount() int64 { + if x != nil { + return x.RecordCount + } + return 0 +} + +func (x *DataFileDescriptor) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +func (x *DataFileDescriptor) GetDataSequenceNumber() int64 { + if x != nil { + return x.DataSequenceNumber + } + return 0 +} + +func (x *DataFileDescriptor) GetPartitionSpecId() int32 { + if x != nil { + return x.PartitionSpecId + } + return 0 +} + +func (x *DataFileDescriptor) GetPartitionValues() []byte { + if x != nil { + return x.PartitionValues + } + return nil +} + +func (x *DataFileDescriptor) GetDeletes() []*DeleteFileRef { + if x != nil { + return x.Deletes + } + return nil +} + +type DeleteFileRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // Iceberg manifest entry's data_sequence_number for this delete + // file. Applicability rule: + // + // data_file.seq <= delete_file.seq for position deletes / DVs + // data_file.seq < delete_file.seq for equality deletes + DataSequenceNumber int64 `protobuf:"varint,3,opt,name=data_sequence_number,json=dataSequenceNumber,proto3" json:"data_sequence_number,omitempty"` + // Partition spec id and serialized partition values; must match + // the data file's partition for the delete to apply. + PartitionSpecId int32 `protobuf:"varint,4,opt,name=partition_spec_id,json=partitionSpecId,proto3" json:"partition_spec_id,omitempty"` + PartitionValues []byte `protobuf:"bytes,5,opt,name=partition_values,json=partitionValues,proto3" json:"partition_values,omitempty"` + Content DeleteContent `protobuf:"varint,6,opt,name=content,proto3,enum=parquet_pushdown_pb.DeleteContent" json:"content,omitempty"` // POSITION_DELETES / EQUALITY_DELETES + FileFormat FileFormat `protobuf:"varint,7,opt,name=file_format,json=fileFormat,proto3,enum=parquet_pushdown_pb.FileFormat" json:"file_format,omitempty"` // PARQUET / AVRO / ORC / PUFFIN + // Required for content == EQUALITY_DELETES, empty otherwise. + EqualityFieldIds []int32 `protobuf:"varint,8,rep,packed,name=equality_field_ids,json=equalityFieldIds,proto3" json:"equality_field_ids,omitempty"` + // Puffin-only: when content == POSITION_DELETES and file_format + // == PUFFIN (deletion vectors), the DV blob lives at + // (path, blob_offset, blob_length). blob_crc32 is the Puffin + // footer's per-blob CRC, used for tamper detection (not as + // identity for cache lookup). + BlobOffset int64 `protobuf:"varint,9,opt,name=blob_offset,json=blobOffset,proto3" json:"blob_offset,omitempty"` + BlobLength int64 `protobuf:"varint,10,opt,name=blob_length,json=blobLength,proto3" json:"blob_length,omitempty"` + BlobCrc32 uint32 `protobuf:"varint,11,opt,name=blob_crc32,json=blobCrc32,proto3" json:"blob_crc32,omitempty"` + // When this delete file targets one specific data file (mandatory + // for v3 deletion vectors). Empty when the delete file may target + // many data files. + ReferencedDataFile string `protobuf:"bytes,12,opt,name=referenced_data_file,json=referencedDataFile,proto3" json:"referenced_data_file,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteFileRef) Reset() { + *x = DeleteFileRef{} + mi := &file_parquet_pushdown_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteFileRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteFileRef) ProtoMessage() {} + +func (x *DeleteFileRef) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteFileRef.ProtoReflect.Descriptor instead. +func (*DeleteFileRef) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{4} +} + +func (x *DeleteFileRef) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *DeleteFileRef) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *DeleteFileRef) GetDataSequenceNumber() int64 { + if x != nil { + return x.DataSequenceNumber + } + return 0 +} + +func (x *DeleteFileRef) GetPartitionSpecId() int32 { + if x != nil { + return x.PartitionSpecId + } + return 0 +} + +func (x *DeleteFileRef) GetPartitionValues() []byte { + if x != nil { + return x.PartitionValues + } + return nil +} + +func (x *DeleteFileRef) GetContent() DeleteContent { + if x != nil { + return x.Content + } + return DeleteContent_DELETE_CONTENT_UNSPECIFIED +} + +func (x *DeleteFileRef) GetFileFormat() FileFormat { + if x != nil { + return x.FileFormat + } + return FileFormat_FILE_FORMAT_UNSPECIFIED +} + +func (x *DeleteFileRef) GetEqualityFieldIds() []int32 { + if x != nil { + return x.EqualityFieldIds + } + return nil +} + +func (x *DeleteFileRef) GetBlobOffset() int64 { + if x != nil { + return x.BlobOffset + } + return 0 +} + +func (x *DeleteFileRef) GetBlobLength() int64 { + if x != nil { + return x.BlobLength + } + return 0 +} + +func (x *DeleteFileRef) GetBlobCrc32() uint32 { + if x != nil { + return x.BlobCrc32 + } + return 0 +} + +func (x *DeleteFileRef) GetReferencedDataFile() string { + if x != nil { + return x.ReferencedDataFile + } + return "" +} + +type VectorQuery struct { + state protoimpl.MessageState `protogen:"open.v1"` + Column *ColumnRef `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"` + Vector []float32 `protobuf:"fixed32,2,rep,packed,name=vector,proto3" json:"vector,omitempty"` + Metric VectorMetric `protobuf:"varint,3,opt,name=metric,proto3,enum=parquet_pushdown_pb.VectorMetric" json:"metric,omitempty"` + TopK int32 `protobuf:"varint,4,opt,name=top_k,json=topK,proto3" json:"top_k,omitempty"` + Nprobe int32 `protobuf:"varint,5,opt,name=nprobe,proto3" json:"nprobe,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VectorQuery) Reset() { + *x = VectorQuery{} + mi := &file_parquet_pushdown_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VectorQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VectorQuery) ProtoMessage() {} + +func (x *VectorQuery) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VectorQuery.ProtoReflect.Descriptor instead. +func (*VectorQuery) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{5} +} + +func (x *VectorQuery) GetColumn() *ColumnRef { + if x != nil { + return x.Column + } + return nil +} + +func (x *VectorQuery) GetVector() []float32 { + if x != nil { + return x.Vector + } + return nil +} + +func (x *VectorQuery) GetMetric() VectorMetric { + if x != nil { + return x.Metric + } + return VectorMetric_VECTOR_METRIC_UNSPECIFIED +} + +func (x *VectorQuery) GetTopK() int32 { + if x != nil { + return x.TopK + } + return 0 +} + +func (x *VectorQuery) GetNprobe() int32 { + if x != nil { + return x.Nprobe + } + return 0 +} + +// ColumnRef identifies a column by Iceberg field id (stable across +// rename and reordering). Path is an optional hint used only when +// field_id == 0 (e.g. non-Iceberg Parquet that has no field ids). +type ColumnRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + FieldId int32 `protobuf:"varint,1,opt,name=field_id,json=fieldId,proto3" json:"field_id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColumnRef) Reset() { + *x = ColumnRef{} + mi := &file_parquet_pushdown_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColumnRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnRef) ProtoMessage() {} + +func (x *ColumnRef) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColumnRef.ProtoReflect.Descriptor instead. +func (*ColumnRef) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{6} +} + +func (x *ColumnRef) GetFieldId() int32 { + if x != nil { + return x.FieldId + } + return 0 +} + +func (x *ColumnRef) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type ParquetPushdownResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + FileRanges []*FileRange `protobuf:"bytes,1,rep,name=file_ranges,json=fileRanges,proto3" json:"file_ranges,omitempty"` + RowGroups []*RowGroupRef `protobuf:"bytes,2,rep,name=row_groups,json=rowGroups,proto3" json:"row_groups,omitempty"` + Pages []*PageRef `protobuf:"bytes,3,rep,name=pages,proto3" json:"pages,omitempty"` + // Optional, emitted only when request.request_row_ids is true and + // the result fits within request.max_row_ids. + RowRefs []*ScoredRowRef `protobuf:"bytes,4,rep,name=row_refs,json=rowRefs,proto3" json:"row_refs,omitempty"` + // True if a row-ref list was omitted or truncated due to size cap. + Truncated bool `protobuf:"varint,5,opt,name=truncated,proto3" json:"truncated,omitempty"` + Stats *PushdownStats `protobuf:"bytes,6,opt,name=stats,proto3" json:"stats,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ParquetPushdownResponse) Reset() { + *x = ParquetPushdownResponse{} + mi := &file_parquet_pushdown_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ParquetPushdownResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParquetPushdownResponse) ProtoMessage() {} + +func (x *ParquetPushdownResponse) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParquetPushdownResponse.ProtoReflect.Descriptor instead. +func (*ParquetPushdownResponse) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{7} +} + +func (x *ParquetPushdownResponse) GetFileRanges() []*FileRange { + if x != nil { + return x.FileRanges + } + return nil +} + +func (x *ParquetPushdownResponse) GetRowGroups() []*RowGroupRef { + if x != nil { + return x.RowGroups + } + return nil +} + +func (x *ParquetPushdownResponse) GetPages() []*PageRef { + if x != nil { + return x.Pages + } + return nil +} + +func (x *ParquetPushdownResponse) GetRowRefs() []*ScoredRowRef { + if x != nil { + return x.RowRefs + } + return nil +} + +func (x *ParquetPushdownResponse) GetTruncated() bool { + if x != nil { + return x.Truncated + } + return false +} + +func (x *ParquetPushdownResponse) GetStats() *PushdownStats { + if x != nil { + return x.Stats + } + return nil +} + +type FileRange struct { + state protoimpl.MessageState `protogen:"open.v1"` + File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` + Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` + Length int64 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FileRange) Reset() { + *x = FileRange{} + mi := &file_parquet_pushdown_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FileRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FileRange) ProtoMessage() {} + +func (x *FileRange) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FileRange.ProtoReflect.Descriptor instead. +func (*FileRange) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{8} +} + +func (x *FileRange) GetFile() string { + if x != nil { + return x.File + } + return "" +} + +func (x *FileRange) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *FileRange) GetLength() int64 { + if x != nil { + return x.Length + } + return 0 +} + +type RowGroupRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` + RowGroup int32 `protobuf:"varint,2,opt,name=row_group,json=rowGroup,proto3" json:"row_group,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RowGroupRef) Reset() { + *x = RowGroupRef{} + mi := &file_parquet_pushdown_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RowGroupRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RowGroupRef) ProtoMessage() {} + +func (x *RowGroupRef) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RowGroupRef.ProtoReflect.Descriptor instead. +func (*RowGroupRef) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{9} +} + +func (x *RowGroupRef) GetFile() string { + if x != nil { + return x.File + } + return "" +} + +func (x *RowGroupRef) GetRowGroup() int32 { + if x != nil { + return x.RowGroup + } + return 0 +} + +type PageRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` + RowGroup int32 `protobuf:"varint,2,opt,name=row_group,json=rowGroup,proto3" json:"row_group,omitempty"` + Column *ColumnRef `protobuf:"bytes,3,opt,name=column,proto3" json:"column,omitempty"` + Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"` + Offset int64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"` + Length int64 `protobuf:"varint,6,opt,name=length,proto3" json:"length,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PageRef) Reset() { + *x = PageRef{} + mi := &file_parquet_pushdown_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PageRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PageRef) ProtoMessage() {} + +func (x *PageRef) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PageRef.ProtoReflect.Descriptor instead. +func (*PageRef) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{10} +} + +func (x *PageRef) GetFile() string { + if x != nil { + return x.File + } + return "" +} + +func (x *PageRef) GetRowGroup() int32 { + if x != nil { + return x.RowGroup + } + return 0 +} + +func (x *PageRef) GetColumn() *ColumnRef { + if x != nil { + return x.Column + } + return nil +} + +func (x *PageRef) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *PageRef) GetOffset() int64 { + if x != nil { + return x.Offset + } + return 0 +} + +func (x *PageRef) GetLength() int64 { + if x != nil { + return x.Length + } + return 0 +} + +// RowRef identifies a row by file-absolute position (matching Iceberg +// position-delete semantics). row_group is a locality hint, not +// authoritative. +type RowRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + File string `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` + RowGroup int32 `protobuf:"varint,2,opt,name=row_group,json=rowGroup,proto3" json:"row_group,omitempty"` + FilePosition int64 `protobuf:"varint,3,opt,name=file_position,json=filePosition,proto3" json:"file_position,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RowRef) Reset() { + *x = RowRef{} + mi := &file_parquet_pushdown_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RowRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RowRef) ProtoMessage() {} + +func (x *RowRef) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RowRef.ProtoReflect.Descriptor instead. +func (*RowRef) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{11} +} + +func (x *RowRef) GetFile() string { + if x != nil { + return x.File + } + return "" +} + +func (x *RowRef) GetRowGroup() int32 { + if x != nil { + return x.RowGroup + } + return 0 +} + +func (x *RowRef) GetFilePosition() int64 { + if x != nil { + return x.FilePosition + } + return 0 +} + +type ScoredRowRef struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ref *RowRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` + Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScoredRowRef) Reset() { + *x = ScoredRowRef{} + mi := &file_parquet_pushdown_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScoredRowRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScoredRowRef) ProtoMessage() {} + +func (x *ScoredRowRef) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScoredRowRef.ProtoReflect.Descriptor instead. +func (*ScoredRowRef) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{12} +} + +func (x *ScoredRowRef) GetRef() *RowRef { + if x != nil { + return x.Ref + } + return nil +} + +func (x *ScoredRowRef) GetScore() float32 { + if x != nil { + return x.Score + } + return 0 +} + +type PushdownStats struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The trust mode that serviced this request. + TrustMode string `protobuf:"bytes,1,opt,name=trust_mode,json=trustMode,proto3" json:"trust_mode,omitempty"` + // Server-side wall time spent on this request, in microseconds. + ServerTimeMicros int64 `protobuf:"varint,2,opt,name=server_time_micros,json=serverTimeMicros,proto3" json:"server_time_micros,omitempty"` + // Filled in by later milestones as the corresponding subsystems + // come online. Names use the design doc's per-feature labels. + FooterCacheHits int64 `protobuf:"varint,3,opt,name=footer_cache_hits,json=footerCacheHits,proto3" json:"footer_cache_hits,omitempty"` + FooterCacheMisses int64 `protobuf:"varint,4,opt,name=footer_cache_misses,json=footerCacheMisses,proto3" json:"footer_cache_misses,omitempty"` + RowGroupsPruned int64 `protobuf:"varint,5,opt,name=row_groups_pruned,json=rowGroupsPruned,proto3" json:"row_groups_pruned,omitempty"` + PagesPruned int64 `protobuf:"varint,6,opt,name=pages_pruned,json=pagesPruned,proto3" json:"pages_pruned,omitempty"` + BytesPlannedScan int64 `protobuf:"varint,7,opt,name=bytes_planned_scan,json=bytesPlannedScan,proto3" json:"bytes_planned_scan,omitempty"` + // Side indexes consulted vs missing, by index kind ("bloom", + // "bitmap", "btree", "page", "vector", ...). Useful both for + // observability and for the connector's cost-model feedback loop. + IndexesUsed []string `protobuf:"bytes,8,rep,name=indexes_used,json=indexesUsed,proto3" json:"indexes_used,omitempty"` + IndexesMissing []string `protobuf:"bytes,9,rep,name=indexes_missing,json=indexesMissing,proto3" json:"indexes_missing,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PushdownStats) Reset() { + *x = PushdownStats{} + mi := &file_parquet_pushdown_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PushdownStats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushdownStats) ProtoMessage() {} + +func (x *PushdownStats) ProtoReflect() protoreflect.Message { + mi := &file_parquet_pushdown_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushdownStats.ProtoReflect.Descriptor instead. +func (*PushdownStats) Descriptor() ([]byte, []int) { + return file_parquet_pushdown_proto_rawDescGZIP(), []int{13} +} + +func (x *PushdownStats) GetTrustMode() string { + if x != nil { + return x.TrustMode + } + return "" +} + +func (x *PushdownStats) GetServerTimeMicros() int64 { + if x != nil { + return x.ServerTimeMicros + } + return 0 +} + +func (x *PushdownStats) GetFooterCacheHits() int64 { + if x != nil { + return x.FooterCacheHits + } + return 0 +} + +func (x *PushdownStats) GetFooterCacheMisses() int64 { + if x != nil { + return x.FooterCacheMisses + } + return 0 +} + +func (x *PushdownStats) GetRowGroupsPruned() int64 { + if x != nil { + return x.RowGroupsPruned + } + return 0 +} + +func (x *PushdownStats) GetPagesPruned() int64 { + if x != nil { + return x.PagesPruned + } + return 0 +} + +func (x *PushdownStats) GetBytesPlannedScan() int64 { + if x != nil { + return x.BytesPlannedScan + } + return 0 +} + +func (x *PushdownStats) GetIndexesUsed() []string { + if x != nil { + return x.IndexesUsed + } + return nil +} + +func (x *PushdownStats) GetIndexesMissing() []string { + if x != nil { + return x.IndexesMissing + } + return nil +} + +var File_parquet_pushdown_proto protoreflect.FileDescriptor + +const file_parquet_pushdown_proto_rawDesc = "" + + "\n" + + "\x16parquet_pushdown.proto\x12\x13parquet_pushdown_pb\"\r\n" + + "\vPingRequest\"G\n" + + "\fPingResponse\x12\x18\n" + + "\aversion\x18\x01 \x01(\tR\aversion\x12\x1d\n" + + "\n" + + "trust_mode\x18\x02 \x01(\tR\ttrustMode\"\xdd\x03\n" + + "\x16ParquetPushdownRequest\x12\x14\n" + + "\x05table\x18\x01 \x01(\tR\x05table\x12\x1f\n" + + "\vsnapshot_id\x18\x02 \x01(\x03R\n" + + "snapshotId\x12F\n" + + "\n" + + "data_files\x18\x03 \x03(\v2'.parquet_pushdown_pb.DataFileDescriptorR\tdataFiles\x128\n" + + "\acolumns\x18\x04 \x03(\v2\x1e.parquet_pushdown_pb.ColumnRefR\acolumns\x12I\n" + + "\x0epredicate_kind\x18\x05 \x01(\x0e2\".parquet_pushdown_pb.PredicateKindR\rpredicateKind\x12\x1c\n" + + "\tpredicate\x18\x06 \x01(\fR\tpredicate\x12C\n" + + "\fvector_query\x18\a \x01(\v2 .parquet_pushdown_pb.VectorQueryR\vvectorQuery\x12\x14\n" + + "\x05limit\x18\b \x01(\x05R\x05limit\x12&\n" + + "\x0frequest_row_ids\x18\t \x01(\bR\rrequestRowIds\x12\x1e\n" + + "\vmax_row_ids\x18\n" + + " \x01(\x05R\tmaxRowIds\"\xc5\x02\n" + + "\x12DataFileDescriptor\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x1d\n" + + "\n" + + "size_bytes\x18\x02 \x01(\x03R\tsizeBytes\x12!\n" + + "\frecord_count\x18\x03 \x01(\x03R\vrecordCount\x12\x12\n" + + "\x04etag\x18\x04 \x01(\tR\x04etag\x120\n" + + "\x14data_sequence_number\x18\x05 \x01(\x03R\x12dataSequenceNumber\x12*\n" + + "\x11partition_spec_id\x18\x06 \x01(\x05R\x0fpartitionSpecId\x12)\n" + + "\x10partition_values\x18\a \x01(\fR\x0fpartitionValues\x12<\n" + + "\adeletes\x18\b \x03(\v2\".parquet_pushdown_pb.DeleteFileRefR\adeletes\"\x8c\x04\n" + + "\rDeleteFileRef\x12\x12\n" + + "\x04path\x18\x01 \x01(\tR\x04path\x12\x1d\n" + + "\n" + + "size_bytes\x18\x02 \x01(\x03R\tsizeBytes\x120\n" + + "\x14data_sequence_number\x18\x03 \x01(\x03R\x12dataSequenceNumber\x12*\n" + + "\x11partition_spec_id\x18\x04 \x01(\x05R\x0fpartitionSpecId\x12)\n" + + "\x10partition_values\x18\x05 \x01(\fR\x0fpartitionValues\x12<\n" + + "\acontent\x18\x06 \x01(\x0e2\".parquet_pushdown_pb.DeleteContentR\acontent\x12@\n" + + "\vfile_format\x18\a \x01(\x0e2\x1f.parquet_pushdown_pb.FileFormatR\n" + + "fileFormat\x12,\n" + + "\x12equality_field_ids\x18\b \x03(\x05R\x10equalityFieldIds\x12\x1f\n" + + "\vblob_offset\x18\t \x01(\x03R\n" + + "blobOffset\x12\x1f\n" + + "\vblob_length\x18\n" + + " \x01(\x03R\n" + + "blobLength\x12\x1d\n" + + "\n" + + "blob_crc32\x18\v \x01(\rR\tblobCrc32\x120\n" + + "\x14referenced_data_file\x18\f \x01(\tR\x12referencedDataFile\"\xc5\x01\n" + + "\vVectorQuery\x126\n" + + "\x06column\x18\x01 \x01(\v2\x1e.parquet_pushdown_pb.ColumnRefR\x06column\x12\x16\n" + + "\x06vector\x18\x02 \x03(\x02R\x06vector\x129\n" + + "\x06metric\x18\x03 \x01(\x0e2!.parquet_pushdown_pb.VectorMetricR\x06metric\x12\x13\n" + + "\x05top_k\x18\x04 \x01(\x05R\x04topK\x12\x16\n" + + "\x06nprobe\x18\x05 \x01(\x05R\x06nprobe\":\n" + + "\tColumnRef\x12\x19\n" + + "\bfield_id\x18\x01 \x01(\x05R\afieldId\x12\x12\n" + + "\x04path\x18\x02 \x01(\tR\x04path\"\xe5\x02\n" + + "\x17ParquetPushdownResponse\x12?\n" + + "\vfile_ranges\x18\x01 \x03(\v2\x1e.parquet_pushdown_pb.FileRangeR\n" + + "fileRanges\x12?\n" + + "\n" + + "row_groups\x18\x02 \x03(\v2 .parquet_pushdown_pb.RowGroupRefR\trowGroups\x122\n" + + "\x05pages\x18\x03 \x03(\v2\x1c.parquet_pushdown_pb.PageRefR\x05pages\x12<\n" + + "\brow_refs\x18\x04 \x03(\v2!.parquet_pushdown_pb.ScoredRowRefR\arowRefs\x12\x1c\n" + + "\ttruncated\x18\x05 \x01(\bR\ttruncated\x128\n" + + "\x05stats\x18\x06 \x01(\v2\".parquet_pushdown_pb.PushdownStatsR\x05stats\"O\n" + + "\tFileRange\x12\x12\n" + + "\x04file\x18\x01 \x01(\tR\x04file\x12\x16\n" + + "\x06offset\x18\x02 \x01(\x03R\x06offset\x12\x16\n" + + "\x06length\x18\x03 \x01(\x03R\x06length\">\n" + + "\vRowGroupRef\x12\x12\n" + + "\x04file\x18\x01 \x01(\tR\x04file\x12\x1b\n" + + "\trow_group\x18\x02 \x01(\x05R\browGroup\"\xb6\x01\n" + + "\aPageRef\x12\x12\n" + + "\x04file\x18\x01 \x01(\tR\x04file\x12\x1b\n" + + "\trow_group\x18\x02 \x01(\x05R\browGroup\x126\n" + + "\x06column\x18\x03 \x01(\v2\x1e.parquet_pushdown_pb.ColumnRefR\x06column\x12\x12\n" + + "\x04page\x18\x04 \x01(\x05R\x04page\x12\x16\n" + + "\x06offset\x18\x05 \x01(\x03R\x06offset\x12\x16\n" + + "\x06length\x18\x06 \x01(\x03R\x06length\"^\n" + + "\x06RowRef\x12\x12\n" + + "\x04file\x18\x01 \x01(\tR\x04file\x12\x1b\n" + + "\trow_group\x18\x02 \x01(\x05R\browGroup\x12#\n" + + "\rfile_position\x18\x03 \x01(\x03R\ffilePosition\"S\n" + + "\fScoredRowRef\x12-\n" + + "\x03ref\x18\x01 \x01(\v2\x1b.parquet_pushdown_pb.RowRefR\x03ref\x12\x14\n" + + "\x05score\x18\x02 \x01(\x02R\x05score\"\x81\x03\n" + + "\rPushdownStats\x12\x1d\n" + + "\n" + + "trust_mode\x18\x01 \x01(\tR\ttrustMode\x12,\n" + + "\x12server_time_micros\x18\x02 \x01(\x03R\x10serverTimeMicros\x12*\n" + + "\x11footer_cache_hits\x18\x03 \x01(\x03R\x0ffooterCacheHits\x12.\n" + + "\x13footer_cache_misses\x18\x04 \x01(\x03R\x11footerCacheMisses\x12*\n" + + "\x11row_groups_pruned\x18\x05 \x01(\x03R\x0frowGroupsPruned\x12!\n" + + "\fpages_pruned\x18\x06 \x01(\x03R\vpagesPruned\x12,\n" + + "\x12bytes_planned_scan\x18\a \x01(\x03R\x10bytesPlannedScan\x12!\n" + + "\findexes_used\x18\b \x03(\tR\vindexesUsed\x12'\n" + + "\x0findexes_missing\x18\t \x03(\tR\x0eindexesMissing*[\n" + + "\rDeleteContent\x12\x1e\n" + + "\x1aDELETE_CONTENT_UNSPECIFIED\x10\x00\x12\x14\n" + + "\x10POSITION_DELETES\x10\x01\x12\x14\n" + + "\x10EQUALITY_DELETES\x10\x02*\x85\x01\n" + + "\n" + + "FileFormat\x12\x1b\n" + + "\x17FILE_FORMAT_UNSPECIFIED\x10\x00\x12\x17\n" + + "\x13FILE_FORMAT_PARQUET\x10\x01\x12\x14\n" + + "\x10FILE_FORMAT_AVRO\x10\x02\x12\x13\n" + + "\x0fFILE_FORMAT_ORC\x10\x03\x12\x16\n" + + "\x12FILE_FORMAT_PUFFIN\x10\x04*i\n" + + "\rPredicateKind\x12\x1e\n" + + "\x1aPREDICATE_KIND_UNSPECIFIED\x10\x00\x12\x1c\n" + + "\x18PREDICATE_KIND_SUBSTRAIT\x10\x01\x12\x1a\n" + + "\x16PREDICATE_KIND_ICEBERG\x10\x02*t\n" + + "\fVectorMetric\x12\x1d\n" + + "\x19VECTOR_METRIC_UNSPECIFIED\x10\x00\x12\x14\n" + + "\x10VECTOR_METRIC_L2\x10\x01\x12\x18\n" + + "\x14VECTOR_METRIC_COSINE\x10\x02\x12\x15\n" + + "\x11VECTOR_METRIC_DOT\x10\x032\xcc\x01\n" + + "\x16SeaweedParquetPushdown\x12K\n" + + "\x04Ping\x12 .parquet_pushdown_pb.PingRequest\x1a!.parquet_pushdown_pb.PingResponse\x12e\n" + + "\bPushdown\x12+.parquet_pushdown_pb.ParquetPushdownRequest\x1a,.parquet_pushdown_pb.ParquetPushdownResponseB parquet_pushdown_pb.DataFileDescriptor + 10, // 1: parquet_pushdown_pb.ParquetPushdownRequest.columns:type_name -> parquet_pushdown_pb.ColumnRef + 2, // 2: parquet_pushdown_pb.ParquetPushdownRequest.predicate_kind:type_name -> parquet_pushdown_pb.PredicateKind + 9, // 3: parquet_pushdown_pb.ParquetPushdownRequest.vector_query:type_name -> parquet_pushdown_pb.VectorQuery + 8, // 4: parquet_pushdown_pb.DataFileDescriptor.deletes:type_name -> parquet_pushdown_pb.DeleteFileRef + 0, // 5: parquet_pushdown_pb.DeleteFileRef.content:type_name -> parquet_pushdown_pb.DeleteContent + 1, // 6: parquet_pushdown_pb.DeleteFileRef.file_format:type_name -> parquet_pushdown_pb.FileFormat + 10, // 7: parquet_pushdown_pb.VectorQuery.column:type_name -> parquet_pushdown_pb.ColumnRef + 3, // 8: parquet_pushdown_pb.VectorQuery.metric:type_name -> parquet_pushdown_pb.VectorMetric + 12, // 9: parquet_pushdown_pb.ParquetPushdownResponse.file_ranges:type_name -> parquet_pushdown_pb.FileRange + 13, // 10: parquet_pushdown_pb.ParquetPushdownResponse.row_groups:type_name -> parquet_pushdown_pb.RowGroupRef + 14, // 11: parquet_pushdown_pb.ParquetPushdownResponse.pages:type_name -> parquet_pushdown_pb.PageRef + 16, // 12: parquet_pushdown_pb.ParquetPushdownResponse.row_refs:type_name -> parquet_pushdown_pb.ScoredRowRef + 17, // 13: parquet_pushdown_pb.ParquetPushdownResponse.stats:type_name -> parquet_pushdown_pb.PushdownStats + 10, // 14: parquet_pushdown_pb.PageRef.column:type_name -> parquet_pushdown_pb.ColumnRef + 15, // 15: parquet_pushdown_pb.ScoredRowRef.ref:type_name -> parquet_pushdown_pb.RowRef + 4, // 16: parquet_pushdown_pb.SeaweedParquetPushdown.Ping:input_type -> parquet_pushdown_pb.PingRequest + 6, // 17: parquet_pushdown_pb.SeaweedParquetPushdown.Pushdown:input_type -> parquet_pushdown_pb.ParquetPushdownRequest + 5, // 18: parquet_pushdown_pb.SeaweedParquetPushdown.Ping:output_type -> parquet_pushdown_pb.PingResponse + 11, // 19: parquet_pushdown_pb.SeaweedParquetPushdown.Pushdown:output_type -> parquet_pushdown_pb.ParquetPushdownResponse + 18, // [18:20] is the sub-list for method output_type + 16, // [16:18] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_parquet_pushdown_proto_init() } +func file_parquet_pushdown_proto_init() { + if File_parquet_pushdown_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_parquet_pushdown_proto_rawDesc), len(file_parquet_pushdown_proto_rawDesc)), + NumEnums: 4, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_parquet_pushdown_proto_goTypes, + DependencyIndexes: file_parquet_pushdown_proto_depIdxs, + EnumInfos: file_parquet_pushdown_proto_enumTypes, + MessageInfos: file_parquet_pushdown_proto_msgTypes, + }.Build() + File_parquet_pushdown_proto = out.File + file_parquet_pushdown_proto_goTypes = nil + file_parquet_pushdown_proto_depIdxs = nil +} diff --git a/weed/pb/parquet_pushdown_pb/parquet_pushdown_grpc.pb.go b/weed/pb/parquet_pushdown_pb/parquet_pushdown_grpc.pb.go new file mode 100644 index 000000000..68ae4295e --- /dev/null +++ b/weed/pb/parquet_pushdown_pb/parquet_pushdown_grpc.pb.go @@ -0,0 +1,180 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc v6.33.4 +// source: parquet_pushdown.proto + +package parquet_pushdown_pb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + SeaweedParquetPushdown_Ping_FullMethodName = "/parquet_pushdown_pb.SeaweedParquetPushdown/Ping" + SeaweedParquetPushdown_Pushdown_FullMethodName = "/parquet_pushdown_pb.SeaweedParquetPushdown/Pushdown" +) + +// SeaweedParquetPushdownClient is the client API for SeaweedParquetPushdown service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +// +// SeaweedParquetPushdown is the gRPC surface of the standalone +// `weed pushdown` daemon. See PARQUET_PUSHDOWN_DESIGN.md and +// PARQUET_PUSHDOWN_DEV_PLAN.md for the surrounding design. +type SeaweedParquetPushdownClient interface { + // Ping returns daemon liveness information. Cheap; intended for + // smoke tests and connector health checks. + Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) + // Pushdown takes a planner-resolved set of Iceberg data files and + // returns the byte ranges, row groups, pages, and (optionally) row + // refs that satisfy the request's predicate and vector clauses. + // M0 returns Unimplemented; later milestones fill in pruning logic. + Pushdown(ctx context.Context, in *ParquetPushdownRequest, opts ...grpc.CallOption) (*ParquetPushdownResponse, error) +} + +type seaweedParquetPushdownClient struct { + cc grpc.ClientConnInterface +} + +func NewSeaweedParquetPushdownClient(cc grpc.ClientConnInterface) SeaweedParquetPushdownClient { + return &seaweedParquetPushdownClient{cc} +} + +func (c *seaweedParquetPushdownClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PingResponse) + err := c.cc.Invoke(ctx, SeaweedParquetPushdown_Ping_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *seaweedParquetPushdownClient) Pushdown(ctx context.Context, in *ParquetPushdownRequest, opts ...grpc.CallOption) (*ParquetPushdownResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ParquetPushdownResponse) + err := c.cc.Invoke(ctx, SeaweedParquetPushdown_Pushdown_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SeaweedParquetPushdownServer is the server API for SeaweedParquetPushdown service. +// All implementations must embed UnimplementedSeaweedParquetPushdownServer +// for forward compatibility. +// +// SeaweedParquetPushdown is the gRPC surface of the standalone +// `weed pushdown` daemon. See PARQUET_PUSHDOWN_DESIGN.md and +// PARQUET_PUSHDOWN_DEV_PLAN.md for the surrounding design. +type SeaweedParquetPushdownServer interface { + // Ping returns daemon liveness information. Cheap; intended for + // smoke tests and connector health checks. + Ping(context.Context, *PingRequest) (*PingResponse, error) + // Pushdown takes a planner-resolved set of Iceberg data files and + // returns the byte ranges, row groups, pages, and (optionally) row + // refs that satisfy the request's predicate and vector clauses. + // M0 returns Unimplemented; later milestones fill in pruning logic. + Pushdown(context.Context, *ParquetPushdownRequest) (*ParquetPushdownResponse, error) + mustEmbedUnimplementedSeaweedParquetPushdownServer() +} + +// UnimplementedSeaweedParquetPushdownServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedSeaweedParquetPushdownServer struct{} + +func (UnimplementedSeaweedParquetPushdownServer) Ping(context.Context, *PingRequest) (*PingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} +func (UnimplementedSeaweedParquetPushdownServer) Pushdown(context.Context, *ParquetPushdownRequest) (*ParquetPushdownResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Pushdown not implemented") +} +func (UnimplementedSeaweedParquetPushdownServer) mustEmbedUnimplementedSeaweedParquetPushdownServer() { +} +func (UnimplementedSeaweedParquetPushdownServer) testEmbeddedByValue() {} + +// UnsafeSeaweedParquetPushdownServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SeaweedParquetPushdownServer will +// result in compilation errors. +type UnsafeSeaweedParquetPushdownServer interface { + mustEmbedUnimplementedSeaweedParquetPushdownServer() +} + +func RegisterSeaweedParquetPushdownServer(s grpc.ServiceRegistrar, srv SeaweedParquetPushdownServer) { + // If the following call pancis, it indicates UnimplementedSeaweedParquetPushdownServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&SeaweedParquetPushdown_ServiceDesc, srv) +} + +func _SeaweedParquetPushdown_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeaweedParquetPushdownServer).Ping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SeaweedParquetPushdown_Ping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeaweedParquetPushdownServer).Ping(ctx, req.(*PingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SeaweedParquetPushdown_Pushdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParquetPushdownRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SeaweedParquetPushdownServer).Pushdown(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SeaweedParquetPushdown_Pushdown_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SeaweedParquetPushdownServer).Pushdown(ctx, req.(*ParquetPushdownRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SeaweedParquetPushdown_ServiceDesc is the grpc.ServiceDesc for SeaweedParquetPushdown service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SeaweedParquetPushdown_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "parquet_pushdown_pb.SeaweedParquetPushdown", + HandlerType: (*SeaweedParquetPushdownServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Ping", + Handler: _SeaweedParquetPushdown_Ping_Handler, + }, + { + MethodName: "Pushdown", + Handler: _SeaweedParquetPushdown_Pushdown_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "parquet_pushdown.proto", +}