diff --git a/.github/workflows/rust-build-and-test.yml b/.github/workflows/rust-build-and-test.yml index d59fadce59..65baffacb6 100644 --- a/.github/workflows/rust-build-and-test.yml +++ b/.github/workflows/rust-build-and-test.yml @@ -62,11 +62,6 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Install protoc - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Rust Cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: @@ -80,3 +75,25 @@ jobs: env: RUST_LOG: DEBUG RUST_BACKTRACE: full + + proto-up-to-date: + timeout-minutes: 15 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install protoc + uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Rust Cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + with: + workspaces: fluss-rust + + - name: Regenerate protobuf code + run: ./crates/fluss/regen.sh + + - name: Verify the checked-in code is up to date + run: git diff --exit-code diff --git a/.github/workflows/rust-license-and-format.yml b/.github/workflows/rust-license-and-format.yml index 2c2d4f6b41..d8996d2770 100644 --- a/.github/workflows/rust-license-and-format.yml +++ b/.github/workflows/rust-license-and-format.yml @@ -75,11 +75,6 @@ jobs: - name: Check dependency licenses (Apache-compatible) run: cargo deny check licenses - - name: Install protoc - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Rust Cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: diff --git a/fluss-rust/Cargo.lock b/fluss-rust/Cargo.lock index 961b4f221b..7e716e90e5 100644 --- a/fluss-rust/Cargo.lock +++ b/fluss-rust/Cargo.lock @@ -1129,7 +1129,6 @@ dependencies = [ "parking_lot", "parse-display 0.10.0", "prost", - "prost-build", "rand 0.9.3", "scopeguard", "serde", @@ -1304,6 +1303,13 @@ dependencies = [ "slab", ] +[[package]] +name = "gen" +version = "0.1.0" +dependencies = [ + "prost-build", +] + [[package]] name = "generic-array" version = "0.14.7" diff --git a/fluss-rust/Cargo.toml b/fluss-rust/Cargo.toml index b7534d6206..3a82f8fca5 100644 --- a/fluss-rust/Cargo.toml +++ b/fluss-rust/Cargo.toml @@ -28,7 +28,7 @@ keywords = ["fluss", "streaming-storage", "datalake"] [workspace] resolver = "2" -members = ["crates/fluss", "crates/fluss-test-cluster", "crates/examples", "bindings/python", "bindings/cpp", "bindings/elixir/native/fluss_nif"] +members = ["crates/fluss", "crates/fluss/gen", "crates/fluss-test-cluster", "crates/examples", "bindings/python", "bindings/cpp", "bindings/elixir/native/fluss_nif"] [workspace.dependencies] fluss = { package = "fluss-rs", version = "1.0.0", path = "crates/fluss", features = ["storage-all"] } diff --git a/fluss-rust/DEVELOPMENT.md b/fluss-rust/DEVELOPMENT.md index c10f9d81e9..4a823c967e 100644 --- a/fluss-rust/DEVELOPMENT.md +++ b/fluss-rust/DEVELOPMENT.md @@ -4,16 +4,16 @@ Welcome to the development guide of `fluss-rust`! This project builds `fluss-rus ## Pre-requisites -- protobuf - rust You can install these using your favourite package / version manager. Example installation using mise: ```bash -mise install protobuf mise install rust ``` +`protobuf` (the `protoc` compiler) is only needed when regenerating the protobuf code after the canonical `FlussApi.proto` changes (see `crates/fluss/regen.sh`). Regular builds use the checked-in `crates/fluss/src/proto/fluss.rs`. + ## IDE Setup We recommend [RustRover](https://www.jetbrains.com/rust/) IDE to work with fluss-rust code base. diff --git a/fluss-rust/crates/fluss/Cargo.toml b/fluss-rust/crates/fluss/Cargo.toml index bf8ae57df7..1c00f7f0be 100644 --- a/fluss-rust/crates/fluss/Cargo.toml +++ b/fluss-rust/crates/fluss/Cargo.toml @@ -86,6 +86,3 @@ fluss-test-cluster = { path = "../fluss-test-cluster" } # workspace `full` feature set; enable it for tests so the # `last_poll_seconds_ago` ticker loop can be driven deterministically. tokio = { workspace = true, features = ["test-util"] } - -[build-dependencies] -prost-build = "0.14" diff --git a/fluss-rust/crates/fluss/build.rs b/fluss-rust/crates/fluss/build.rs deleted file mode 100644 index 5fd20dbf62..0000000000 --- a/fluss-rust/crates/fluss/build.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -use std::io::Result; -use std::path::Path; - -fn main() -> Result<()> { - let mut config = prost_build::Config::new(); - config.bytes([ - ".fluss.PbProduceLogReqForBucket.records", - ".fluss.PbPutKvReqForBucket.records", - ".fluss.PbLookupReqForBucket.keys", - ".fluss.PbPrefixLookupReqForBucket.keys", - ".fluss.ScanKvResponse.records", - ]); - // Published crates vendor the proto under proto/ (scripts/vendor-proto.sh); - // monorepo builds read the canonical proto directly from fluss-rpc. - let (proto, include_dir) = if Path::new("proto/FlussApi.proto").exists() { - ("proto/FlussApi.proto", "proto") - } else { - ( - "../../../fluss-rpc/src/main/proto/FlussApi.proto", - "../../../fluss-rpc/src/main/proto", - ) - }; - config.compile_protos(&[proto], &[include_dir])?; - Ok(()) -} diff --git a/fluss-rust/crates/fluss/gen/Cargo.toml b/fluss-rust/crates/fluss/gen/Cargo.toml new file mode 100644 index 0000000000..e617881389 --- /dev/null +++ b/fluss-rust/crates/fluss/gen/Cargo.toml @@ -0,0 +1,33 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +[package] +name = "gen" +description = "Code generation for fluss-rs" +version = "0.1.0" +edition = { workspace = true } +rust-version = { workspace = true } +authors = { workspace = true } +homepage = { workspace = true } +repository = { workspace = true } +license = { workspace = true } +publish = false + +[dependencies] +# Pin the prost-build version so regenerating does not churn the checked-in +# src/proto/fluss.rs. Bump deliberately, then rerun ../regen.sh. +prost-build = "0.14.3" diff --git a/fluss-rust/crates/fluss/gen/src/main.rs b/fluss-rust/crates/fluss/gen/src/main.rs new file mode 100644 index 0000000000..c982cd20dd --- /dev/null +++ b/fluss-rust/crates/fluss/gen/src/main.rs @@ -0,0 +1,77 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::error::Error; +use std::fs; +use std::path::Path; + +const HEADER: &str = "\ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// \"License\"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// This file was generated from the canonical FlussApi.proto by +// fluss-rust/crates/fluss/regen.sh, and should not be edited by hand. + +"; + +fn main() -> Result<(), Box> { + let fluss_dir = Path::new(env!("CARGO_MANIFEST_DIR")) + .parent() + .ok_or("the gen crate must live inside crates/fluss")?; + + // Published crates vendor the proto under proto/ (scripts/vendor-proto.sh); + // monorepo regeneration reads the canonical proto directly from fluss-rpc. + let vendored_dir = fluss_dir.join("proto"); + let include_dir = if vendored_dir.join("FlussApi.proto").exists() { + vendored_dir + } else { + fluss_dir.join("../../../fluss-rpc/src/main/proto") + }; + let proto = include_dir.join("FlussApi.proto"); + + let mut config = prost_build::Config::new(); + config.bytes([ + ".fluss.PbProduceLogReqForBucket.records", + ".fluss.PbPutKvReqForBucket.records", + ".fluss.PbLookupReqForBucket.keys", + ".fluss.PbPrefixLookupReqForBucket.keys", + ".fluss.ScanKvResponse.records", + ]); + let out_dir = fluss_dir.join("src/proto"); + fs::create_dir_all(&out_dir)?; + config.out_dir(&out_dir); + config.compile_protos(&[&proto], &[&include_dir])?; + + let generated_path = out_dir.join("fluss.rs"); + let generated = fs::read_to_string(&generated_path)?; + fs::write(&generated_path, format!("{HEADER}{generated}"))?; + Ok(()) +} diff --git a/fluss-rust/crates/fluss/regen.sh b/fluss-rust/crates/fluss/regen.sh new file mode 100755 index 0000000000..8027cde77f --- /dev/null +++ b/fluss-rust/crates/fluss/regen.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Regenerates src/proto/fluss.rs from the canonical FlussApi.proto +# (fluss-rpc/src/main/proto, or the vendored proto/ copy when present). +# Requires protoc on PATH (or the PROTOC env var pointing at a protoc binary). + +set -euo pipefail + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +cd "$SCRIPT_DIR" && cargo run --manifest-path gen/Cargo.toml diff --git a/fluss-rust/crates/fluss/src/lib.rs b/fluss-rust/crates/fluss/src/lib.rs index 1234d96ac1..ee4c77bf44 100644 --- a/fluss-rust/crates/fluss/src/lib.rs +++ b/fluss-rust/crates/fluss/src/lib.rs @@ -152,5 +152,5 @@ pub(crate) mod proto { // caller yet, and the generated doc comments aren't clippy-clean. #![allow(dead_code)] #![allow(clippy::doc_lazy_continuation)] - include!(concat!(env!("OUT_DIR"), "/fluss.rs")); + include!("proto/fluss.rs"); } diff --git a/fluss-rust/crates/fluss/src/proto/fluss.rs b/fluss-rust/crates/fluss/src/proto/fluss.rs new file mode 100644 index 0000000000..ce820d978e --- /dev/null +++ b/fluss-rust/crates/fluss/src/proto/fluss.rs @@ -0,0 +1,1931 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// This file was generated from the canonical FlussApi.proto by +// fluss-rust/crates/fluss/regen.sh, and should not be edited by hand. + +// This file is @generated by prost-build. +/// the message indicates a failed request of a server failure. +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ErrorResponse { + #[prost(int32, required, tag = "1")] + pub error_code: i32, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ApiVersionsRequest { + #[prost(string, required, tag = "1")] + pub client_software_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub client_software_version: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ApiVersionsResponse { + #[prost(message, repeated, tag = "1")] + pub api_versions: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "2")] + pub server_type: ::core::option::Option, +} +/// get schema request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetTableSchemaRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(int32, optional, tag = "2")] + pub schema_id: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetTableSchemaResponse { + #[prost(int32, required, tag = "1")] + pub schema_id: i32, + #[prost(bytes = "vec", required, tag = "2")] + pub schema_json: ::prost::alloc::vec::Vec, +} +/// create database request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateDatabaseRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(bool, required, tag = "2")] + pub ignore_if_exists: bool, + #[prost(bytes = "vec", optional, tag = "3")] + pub database_json: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateDatabaseResponse {} +/// alter database request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AlterDatabaseRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(bool, required, tag = "2")] + pub ignore_if_not_exists: bool, + #[prost(message, repeated, tag = "3")] + pub config_changes: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "4")] + pub comment: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AlterDatabaseResponse {} +/// get table request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetDatabaseInfoRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetDatabaseInfoResponse { + #[prost(bytes = "vec", required, tag = "3")] + pub database_json: ::prost::alloc::vec::Vec, + #[prost(int64, required, tag = "4")] + pub created_time: i64, + #[prost(int64, required, tag = "5")] + pub modified_time: i64, +} +/// drop database request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropDatabaseRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(bool, required, tag = "2")] + pub ignore_if_not_exists: bool, + #[prost(bool, required, tag = "3")] + pub cascade: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropDatabaseResponse {} +/// database exists request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DatabaseExistsRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DatabaseExistsResponse { + #[prost(bool, required, tag = "1")] + pub exists: bool, +} +/// list databases request and response +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListDatabasesRequest { + #[prost(bool, optional, tag = "1")] + pub include_summary: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListDatabasesResponse { + #[prost(string, repeated, tag = "1")] + pub database_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "2")] + pub database_summary: ::prost::alloc::vec::Vec, +} +/// create table request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateTableRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(bytes = "vec", required, tag = "2")] + pub table_json: ::prost::alloc::vec::Vec, + #[prost(bool, required, tag = "3")] + pub ignore_if_exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateTableResponse {} +/// alter table request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AlterTableRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(bool, required, tag = "2")] + pub ignore_if_not_exists: bool, + #[prost(message, repeated, tag = "3")] + pub config_changes: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub add_columns: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub drop_columns: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "6")] + pub rename_columns: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "7")] + pub modify_columns: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AlterTableResponse {} +/// get table request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetTableInfoRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetTableInfoResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int32, required, tag = "2")] + pub schema_id: i32, + #[prost(bytes = "vec", required, tag = "3")] + pub table_json: ::prost::alloc::vec::Vec, + #[prost(int64, required, tag = "4")] + pub created_time: i64, + #[prost(int64, required, tag = "5")] + pub modified_time: i64, + #[prost(string, optional, tag = "6")] + pub remote_data_dir: ::core::option::Option<::prost::alloc::string::String>, +} +/// list tables request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListTablesRequest { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListTablesResponse { + #[prost(string, repeated, tag = "1")] + pub table_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// drop table request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropTableRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(bool, required, tag = "2")] + pub ignore_if_not_exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropTableResponse {} +/// table exists request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct TableExistsRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct TableExistsResponse { + #[prost(bool, required, tag = "1")] + pub exists: bool, +} +/// metadata request and response, request send from client to each server. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MetadataRequest { + #[prost(message, repeated, tag = "1")] + pub table_path: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub partitions_path: ::prost::alloc::vec::Vec, + /// note: currently, we assume the partition ids must belong to the table_paths in the + /// metadata request + /// todo: we won't need the assumption after we introduce metadata cache in server + #[prost(int64, repeated, tag = "3")] + pub partitions_id: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MetadataResponse { + #[prost(message, optional, tag = "1")] + pub coordinator_server: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub tablet_servers: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub table_metadata: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub partition_metadata: ::prost::alloc::vec::Vec, +} +/// update metadata request and response, only send between server. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UpdateMetadataRequest { + #[prost(message, optional, tag = "1")] + pub coordinator_server: ::core::option::Option, + #[prost(message, repeated, tag = "2")] + pub tablet_servers: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub table_metadata: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub partition_metadata: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "5")] + pub coordinator_epoch: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct UpdateMetadataResponse {} +/// produce log request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProduceLogRequest { + #[prost(int32, required, tag = "1")] + pub acks: i32, + #[prost(int64, required, tag = "2")] + pub table_id: i64, + #[prost(int32, required, tag = "3")] + pub timeout_ms: i32, + #[prost(message, repeated, tag = "4")] + pub buckets_req: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ProduceLogResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +/// fetch log request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchLogRequest { + /// value -1 indicate the request from client. + #[prost(int32, required, tag = "1")] + pub follower_server_id: i32, + #[prost(int32, required, tag = "2")] + pub max_bytes: i32, + #[prost(message, repeated, tag = "3")] + pub tables_req: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "4")] + pub max_wait_ms: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub min_bytes: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub read_preference: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FetchLogResponse { + #[prost(message, repeated, tag = "1")] + pub tables_resp: ::prost::alloc::vec::Vec, +} +/// put kv request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PutKvRequest { + #[prost(int32, required, tag = "1")] + pub acks: i32, + #[prost(int64, required, tag = "2")] + pub table_id: i64, + #[prost(int32, required, tag = "3")] + pub timeout_ms: i32, + /// the indexes for the columns to write, + /// if empty, means write all columns + #[prost(int32, repeated, tag = "4")] + pub target_columns: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub buckets_req: ::prost::alloc::vec::Vec, + /// Aggregation mode for this request (see AGG_MODE_* constants above) + /// 0 = AGGREGATE (default), 1 = OVERWRITE, 2 = LOCAL_AGGREGATE (not yet supported) + #[prost(int32, optional, tag = "6")] + pub agg_mode: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PutKvResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +/// lookup request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LookupRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_req: ::prost::alloc::vec::Vec, + #[prost(bool, optional, tag = "3")] + pub insert_if_not_exists: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub acks: ::core::option::Option, + #[prost(int32, optional, tag = "5")] + pub timeout_ms: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LookupResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +/// Prefix Lookup request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PrefixLookupRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_req: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PrefixLookupResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +/// limit scan request and response +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct LimitScanRequest { + #[prost(int64, required, tag = "2")] + pub table_id: i64, + #[prost(int64, optional, tag = "3")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "4")] + pub bucket_id: i32, + #[prost(int32, required, tag = "5")] + pub limit: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct LimitScanResponse { + #[prost(int32, optional, tag = "1")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + /// flag to indicate the table type + #[prost(bool, optional, tag = "3")] + pub is_log_table: ::core::option::Option, + /// LogRecordBatch if is_log_table is true, otherwise KvRecordBatch + #[prost(bytes = "vec", optional, tag = "4")] + pub records: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// Full KV scan request and response. +/// A new scan is initiated with bucket_scan_req; subsequent batches use scanner_id. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbScanReqForBucket { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, + /// If set, stops returning rows after this many records. + #[prost(int64, optional, tag = "4")] + pub limit: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ScanKvRequest { + /// Mutually exclusive: either scanner_id (continuation) or bucket_scan_req (new scan). + #[prost(bytes = "vec", optional, tag = "1")] + pub scanner_id: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(message, optional, tag = "2")] + pub bucket_scan_req: ::core::option::Option, + /// Monotonically increasing sequence number for in-order delivery validation. + #[prost(int32, optional, tag = "3")] + pub call_seq_id: ::core::option::Option, + /// Maximum number of bytes of record data to return in this batch. + #[prost(int32, optional, tag = "4")] + pub batch_size_bytes: ::core::option::Option, + /// If true, the server closes the scanner session immediately. + #[prost(bool, optional, tag = "5")] + pub close_scanner: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ScanKvResponse { + #[prost(int32, optional, tag = "1")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + /// Opaque server-assigned session identifier; echoed on every response. + #[prost(bytes = "vec", optional, tag = "3")] + pub scanner_id: ::core::option::Option<::prost::alloc::vec::Vec>, + /// False when the scan is complete and the scanner session has been closed. + #[prost(bool, optional, tag = "4")] + pub has_more_results: ::core::option::Option, + /// Serialised DefaultValueRecordBatch; absent when the batch is empty. + #[prost(bytes = "bytes", optional, tag = "5")] + pub records: ::core::option::Option<::prost::bytes::Bytes>, + /// Log high-watermark at the time the RocksDB snapshot was opened. + /// Only set on the first response (new scan initiation). + #[prost(int64, optional, tag = "6")] + pub log_offset: ::core::option::Option, +} +/// Get table statistics request and response. +/// Sent to TabletServer to get per-bucket statistics. +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTableStatsRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_req: ::prost::alloc::vec::Vec, + /// Column indexes for column-level stats (e.g., ndv, sum). + /// If empty, column stats are not collected. + /// Reserved for future use. + #[prost(int32, repeated, tag = "3")] + pub target_columns: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTableStatsResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +/// notify bucket leader and isr request +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotifyLeaderAndIsrRequest { + #[prost(int32, required, tag = "1")] + pub coordinator_epoch: i32, + #[prost(message, repeated, tag = "2")] + pub notify_buckets_leader_req: ::prost::alloc::vec::Vec< + PbNotifyLeaderAndIsrReqForBucket, + >, +} +/// response for notify bucket leader and isr request +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotifyLeaderAndIsrResponse { + #[prost(message, repeated, tag = "1")] + pub notify_buckets_leader_resp: ::prost::alloc::vec::Vec< + PbNotifyLeaderAndIsrRespForBucket, + >, +} +/// stop bucket replica request +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StopReplicaRequest { + #[prost(int32, required, tag = "1")] + pub coordinator_epoch: i32, + #[prost(message, repeated, tag = "2")] + pub stop_replicas_req: ::prost::alloc::vec::Vec, +} +/// response for stop bucket replica request +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct StopReplicaResponse { + #[prost(message, repeated, tag = "1")] + pub stop_replicas_resp: ::prost::alloc::vec::Vec, +} +/// adjust isr request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AdjustIsrRequest { + #[prost(int32, required, tag = "1")] + pub server_id: i32, + #[prost(message, repeated, tag = "2")] + pub tables_req: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AdjustIsrResponse { + #[prost(message, repeated, tag = "1")] + pub tables_resp: ::prost::alloc::vec::Vec, +} +/// list offsets request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListOffsetsRequest { + /// value -1 indicate the request from client. + #[prost(int32, required, tag = "1")] + pub follower_server_id: i32, + /// value can be 0,1,2 (see ListOffsetsParam for more details) + #[prost(int32, required, tag = "2")] + pub offset_type: i32, + #[prost(int64, required, tag = "3")] + pub table_id: i64, + #[prost(int64, optional, tag = "4")] + pub partition_id: ::core::option::Option, + /// it is recommended to use packed for repeated numerics to get more efficient encoding + #[prost(int32, repeated, tag = "5")] + pub bucket_id: ::prost::alloc::vec::Vec, + #[prost(int64, optional, tag = "6")] + pub start_timestamp: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListOffsetsResponse { + #[prost(message, repeated, tag = "1")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +/// commit kv snapshot request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CommitKvSnapshotRequest { + #[prost(bytes = "vec", required, tag = "1")] + pub completed_snapshot: ::prost::alloc::vec::Vec, + #[prost(int32, required, tag = "2")] + pub coordinator_epoch: i32, + #[prost(int32, required, tag = "3")] + pub bucket_leader_epoch: i32, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CommitKvSnapshotResponse {} +/// notify the log offset about kv snapshot +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct NotifyKvSnapshotOffsetRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, + #[prost(int32, required, tag = "4")] + pub coordinator_epoch: i32, + #[prost(int64, required, tag = "5")] + pub min_retain_offset: i64, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct NotifyKvSnapshotOffsetResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetLatestKvSnapshotsRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(string, optional, tag = "2")] + pub partition_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLatestKvSnapshotsResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + /// null if it is a non-partitioned table, otherwise, it must be not null + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub latest_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetKvSnapshotMetadataRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, + #[prost(int64, required, tag = "4")] + pub snapshot_id: i64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetKvSnapshotMetadataResponse { + #[prost(int64, required, tag = "1")] + pub log_offset: i64, + #[prost(message, repeated, tag = "2")] + pub snapshot_files: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AcquireKvSnapshotLeaseRequest { + #[prost(string, required, tag = "1")] + pub lease_id: ::prost::alloc::string::String, + #[prost(int64, required, tag = "2")] + pub lease_duration_ms: i64, + #[prost(message, repeated, tag = "3")] + pub snapshots_to_lease: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AcquireKvSnapshotLeaseResponse { + #[prost(message, repeated, tag = "1")] + pub unavailable_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ReleaseKvSnapshotLeaseRequest { + #[prost(string, required, tag = "1")] + pub lease_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub buckets_to_release: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ReleaseKvSnapshotLeaseResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropKvSnapshotLeaseRequest { + #[prost(string, required, tag = "1")] + pub lease_id: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropKvSnapshotLeaseResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetLakeSnapshotRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + /// If not set, returns the latest snapshot + #[prost(int64, optional, tag = "2")] + pub snapshot_id: ::core::option::Option, + /// If true, returns the latest readable snapshot + #[prost(bool, optional, tag = "3")] + pub readable: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetLakeSnapshotResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, required, tag = "2")] + pub snapshot_id: i64, + #[prost(message, repeated, tag = "3")] + pub bucket_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetFileSystemSecurityTokenRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetFileSystemSecurityTokenResponse { + #[prost(string, required, tag = "1")] + pub schema: ::prost::alloc::string::String, + #[prost(bytes = "vec", required, tag = "2")] + pub token: ::prost::alloc::vec::Vec, + #[prost(int64, optional, tag = "3")] + pub expiration_time: ::core::option::Option, + #[prost(message, repeated, tag = "4")] + pub addition_info: ::prost::alloc::vec::Vec, +} +/// init writer request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct InitWriterRequest { + #[prost(message, repeated, tag = "1")] + pub table_path: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct InitWriterResponse { + #[prost(int64, required, tag = "1")] + pub writer_id: i64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListPartitionInfosRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(message, optional, tag = "2")] + pub partial_partition_spec: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListPartitionInfosResponse { + #[prost(message, repeated, tag = "1")] + pub partitions_info: ::prost::alloc::vec::Vec, +} +/// list remote log manifest entries (one per bucket of a table or partition) +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListRemoteLogManifestsRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + /// required if table is partitioned + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRemoteLogManifestsResponse { + #[prost(message, repeated, tag = "1")] + pub manifests: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRemoteLogManifestEntry { + #[prost(message, required, tag = "1")] + pub table_bucket: PbTableBucket, + #[prost(string, required, tag = "2")] + pub remote_log_manifest_path: ::prost::alloc::string::String, + #[prost(int64, required, tag = "3")] + pub remote_log_end_offset: i64, +} +/// list active KV snapshot dirs (retained_N + still-in-use) for a unit +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListKvSnapshotsRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListKvSnapshotsResponse { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + /// null if it is a non-partitioned table, otherwise, it must be not null + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + /// Active snapshots = retained_N ∪ still-in-use; multiple entries per bucket allowed. + #[prost(message, repeated, tag = "3")] + pub active_snapshots: ::prost::alloc::vec::Vec, +} +/// create partition request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreatePartitionRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(message, required, tag = "2")] + pub partition_spec: PbPartitionSpec, + #[prost(bool, required, tag = "3")] + pub ignore_if_not_exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreatePartitionResponse {} +/// drop partition request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DropPartitionRequest { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(message, required, tag = "2")] + pub partition_spec: PbPartitionSpec, + #[prost(bool, required, tag = "3")] + pub ignore_if_not_exists: bool, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DropPartitionResponse {} +/// commit remote log manifest request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CommitRemoteLogManifestRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, + #[prost(string, required, tag = "4")] + pub remote_log_manifest_path: ::prost::alloc::string::String, + #[prost(int64, required, tag = "5")] + pub remote_log_start_offset: i64, + #[prost(int64, required, tag = "6")] + pub remote_log_end_offset: i64, + #[prost(int32, required, tag = "7")] + pub coordinator_epoch: i32, + #[prost(int32, required, tag = "8")] + pub bucket_leader_epoch: i32, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CommitRemoteLogManifestResponse { + #[prost(bool, required, tag = "1")] + pub commit_success: bool, +} +/// notify remote log offsets request and response +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct NotifyRemoteLogOffsetsRequest { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, + #[prost(int32, required, tag = "4")] + pub coordinator_epoch: i32, + #[prost(int64, required, tag = "5")] + pub remote_start_offset: i64, + #[prost(int64, required, tag = "6")] + pub remote_end_offset: i64, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct NotifyRemoteLogOffsetsResponse {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PrepareLakeTableSnapshotRequest { + #[prost(message, repeated, tag = "1")] + pub bucket_offsets: ::prost::alloc::vec::Vec, + /// If true, ignore previous table offsets and do not merge with existing lake table offsets. + /// If false (default), the system will merge the provided bucket offsets with the previous + /// lake table offsets to ensure continuity. This is useful when you want to replace all offsets + /// instead of merging with existing ones. + #[prost(bool, optional, tag = "2")] + pub ignore_previous_table_offsets: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PrepareLakeTableSnapshotResponse { + #[prost(message, repeated, tag = "1")] + pub prepare_lake_table_resp: ::prost::alloc::vec::Vec< + PbPrepareLakeTableRespForTable, + >, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CommitLakeTableSnapshotRequest { + /// Deprecated: PbLakeTableSnapshotInfo is no longer used for committing lake table snapshots. + /// Currently, it is only used to allow the coordinator to notify tablet servers about the current + /// synchronized log end offsets, which are then reported to metrics. In the future, we plan to + /// have tiering directly report to metrics, and this field will be fully removed. + /// Still reserve it for protocol compatibility. + #[prost(message, repeated, tag = "1")] + pub tables_req: ::prost::alloc::vec::Vec, + /// The metadata for lake table snapshots to be committed. Each entry contains the table ID, + /// snapshot ID, and the file paths where the snapshot data (containing bucket log end offset + /// information) is stored. The tiered_snapshot_file_path points to the file storing tiered log + /// end offsets, while readable_snapshot_file_path (if present) points to the file storing readable + /// log end offsets. + #[prost(message, repeated, tag = "2")] + pub lake_table_snapshot_metadata: ::prost::alloc::vec::Vec< + PbLakeTableSnapshotMetadata, + >, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CommitLakeTableSnapshotResponse { + #[prost(message, repeated, tag = "1")] + pub table_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbCommitLakeTableSnapshotRespForTable { + #[prost(int32, optional, tag = "1")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, required, tag = "3")] + pub table_id: i64, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NotifyLakeTableOffsetRequest { + #[prost(int32, required, tag = "1")] + pub coordinator_epoch: i32, + #[prost(message, repeated, tag = "2")] + pub notify_buckets_req: ::prost::alloc::vec::Vec< + PbNotifyLakeTableOffsetReqForBucket, + >, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbNotifyLakeTableOffsetReqForBucket { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, + #[prost(int64, required, tag = "4")] + pub snapshot_id: i64, + #[prost(int64, optional, tag = "5")] + pub log_start_offset: ::core::option::Option, + #[prost(int64, optional, tag = "6")] + pub log_end_offset: ::core::option::Option, + #[prost(int64, optional, tag = "7")] + pub max_timestamp: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct NotifyLakeTableOffsetResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AuthenticateRequest { + #[prost(string, required, tag = "1")] + pub protocol: ::prost::alloc::string::String, + #[prost(bytes = "vec", required, tag = "2")] + pub token: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AuthenticateResponse { + #[prost(bytes = "vec", optional, tag = "1")] + pub challenge: ::core::option::Option<::prost::alloc::vec::Vec>, +} +/// acl related requests and responses +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListAclsRequest { + #[prost(message, required, tag = "1")] + pub acl_filter: PbAclFilter, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListAclsResponse { + #[prost(message, repeated, tag = "1")] + pub acl: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateAclsRequest { + #[prost(message, repeated, tag = "1")] + pub acl: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateAclsResponse { + #[prost(message, repeated, tag = "1")] + pub acl_res: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DropAclsRequest { + #[prost(message, repeated, tag = "1")] + pub acl_filter: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DropAclsResponse { + #[prost(message, repeated, tag = "1")] + pub filter_results: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LakeTieringHeartbeatRequest { + #[prost(message, repeated, tag = "1")] + pub tiering_tables: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "2")] + pub finished_tables: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "3")] + pub failed_tables: ::prost::alloc::vec::Vec, + /// whether to request a table + #[prost(bool, optional, tag = "4")] + pub request_table: ::core::option::Option, + /// Table IDs that were force finished due to reaching the maximum tiering duration. + /// When a table's tiering operation exceeds the max duration (data lake freshness), + /// it will be force finished to prevent it from blocking other tables' tiering operations. + /// These table IDs must also appear in finished_tables. The coordinator uses this field to + /// distinguish between normally finished tables and force finished tables. + #[prost(int64, repeated, packed = "false", tag = "5")] + pub force_finished_tables: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LakeTieringHeartbeatResponse { + /// coordinator epoch + #[prost(int32, required, tag = "1")] + pub coordinator_epoch: i32, + /// the returned table to tier, empty when no table is needed by the lake tiering service + #[prost(message, optional, tag = "2")] + pub tiering_table: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub tiering_table_resp: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub finished_table_resp: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub failed_table_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ControlledShutdownRequest { + #[prost(int32, required, tag = "1")] + pub tablet_server_id: i32, + #[prost(int32, required, tag = "2")] + pub tablet_server_epoch: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ControlledShutdownResponse { + #[prost(message, repeated, tag = "1")] + pub remaining_leader_buckets: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DescribeClusterConfigsRequest {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DescribeClusterConfigsResponse { + #[prost(message, repeated, tag = "1")] + pub configs: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AlterClusterConfigsRequest { + #[prost(message, repeated, tag = "1")] + pub alter_configs: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AlterClusterConfigsResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AddServerTagRequest { + #[prost(int32, repeated, tag = "1")] + pub server_ids: ::prost::alloc::vec::Vec, + #[prost(int32, required, tag = "2")] + pub server_tag: i32, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct AddServerTagResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RemoveServerTagRequest { + #[prost(int32, repeated, tag = "1")] + pub server_ids: ::prost::alloc::vec::Vec, + #[prost(int32, required, tag = "2")] + pub server_tag: i32, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RemoveServerTagResponse {} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RebalanceRequest { + #[prost(int32, repeated, tag = "1")] + pub goals: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RebalanceResponse { + #[prost(string, required, tag = "1")] + pub rebalance_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct ListRebalanceProgressRequest { + #[prost(string, optional, tag = "1")] + pub rebalance_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ListRebalanceProgressResponse { + #[prost(string, optional, tag = "1")] + pub rebalance_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "2")] + pub rebalance_status: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub table_progress: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CancelRebalanceRequest { + #[prost(string, optional, tag = "1")] + pub rebalance_id: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CancelRebalanceResponse {} +/// Register producer offsets request and response +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RegisterProducerOffsetsRequest { + #[prost(string, required, tag = "1")] + pub producer_id: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "2")] + pub table_offsets: ::prost::alloc::vec::Vec, + #[prost(int64, optional, tag = "3")] + pub ttl_ms: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct RegisterProducerOffsetsResponse { + /// Result of registration: 0 = CREATED (new snapshot), 1 = ALREADY_EXISTS (snapshot existed) + #[prost(int32, optional, tag = "1")] + pub result: ::core::option::Option, +} +/// Get producer offsets request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetProducerOffsetsRequest { + #[prost(string, required, tag = "1")] + pub producer_id: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetProducerOffsetsResponse { + #[prost(string, optional, tag = "1")] + pub producer_id: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "2")] + pub expiration_time: ::core::option::Option, + #[prost(message, repeated, tag = "3")] + pub table_offsets: ::prost::alloc::vec::Vec, +} +/// Delete producer offsets request and response +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeleteProducerOffsetsRequest { + #[prost(string, required, tag = "1")] + pub producer_id: ::prost::alloc::string::String, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct DeleteProducerOffsetsResponse {} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetClusterHealthRequest {} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct GetClusterHealthResponse { + #[prost(int32, required, tag = "1")] + pub num_replicas: i32, + #[prost(int32, required, tag = "2")] + pub in_sync_replicas: i32, + #[prost(int32, required, tag = "3")] + pub num_leader_replicas: i32, + #[prost(int32, required, tag = "4")] + pub active_leader_replicas: i32, + /// PbClusterHealthStatus: GREEN=0, YELLOW=1, RED=2, UNKNOWN=3 + #[prost(int32, required, tag = "5")] + pub status: i32, +} +/// --------------- Inner classes ---------------- +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbApiVersion { + #[prost(int32, required, tag = "1")] + pub api_key: i32, + #[prost(int32, required, tag = "2")] + pub min_version: i32, + #[prost(int32, required, tag = "3")] + pub max_version: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbTablePath { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub table_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbPhysicalTablePath { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub table_name: ::prost::alloc::string::String, + #[prost(string, optional, tag = "3")] + pub partition_name: ::core::option::Option<::prost::alloc::string::String>, +} +/// For MetadataResponse, host and port are still used for all versions. +/// For UpdateMetadataRequest, +/// * versions <= 0.6: host and port are used. +/// * versions >= 0.7: listeners is used to replace host and port. +/// For MetadataResponse and UpdateMetadataRequest: Fluss versions >= 0.7: we add rack for each tabletServer +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbServerNode { + #[prost(int32, required, tag = "1")] + pub node_id: i32, + #[prost(string, required, tag = "2")] + pub host: ::prost::alloc::string::String, + #[prost(int32, required, tag = "3")] + pub port: i32, + #[prost(string, optional, tag = "4")] + pub listeners: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub rack: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbTableMetadata { + #[prost(message, required, tag = "1")] + pub table_path: PbTablePath, + #[prost(int64, required, tag = "2")] + pub table_id: i64, + #[prost(int32, required, tag = "3")] + pub schema_id: i32, + /// TODO Starting from version 0.9, fluss-client no longer get table info from metadata response. However, for backward + /// compatibility, we will still retain the field in the request. Once metadataV2 is introduced, table info will be + /// officially omitted from the new metadata response. + #[prost(bytes = "vec", required, tag = "4")] + pub table_json: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "5")] + pub bucket_metadata: ::prost::alloc::vec::Vec, + #[prost(int64, required, tag = "6")] + pub created_time: i64, + #[prost(int64, required, tag = "7")] + pub modified_time: i64, + #[prost(string, optional, tag = "8")] + pub remote_data_dir: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPartitionMetadata { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + /// the partition name and id for the partition + #[prost(string, required, tag = "2")] + pub partition_name: ::prost::alloc::string::String, + #[prost(int64, required, tag = "3")] + pub partition_id: i64, + #[prost(message, repeated, tag = "4")] + pub bucket_metadata: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbBucketMetadata { + #[prost(int32, required, tag = "1")] + pub bucket_id: i32, + /// optional as some time the leader may not elected yet + #[prost(int32, optional, tag = "2")] + pub leader_id: ::core::option::Option, + #[prost(int32, repeated, tag = "3")] + pub replica_id: ::prost::alloc::vec::Vec, + /// TODO: Add isr here. + #[prost(int32, optional, tag = "4")] + pub leader_epoch: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbProduceLogReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(bytes = "bytes", required, tag = "3")] + pub records: ::prost::bytes::Bytes, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbProduceLogRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "5")] + pub base_offset: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbFetchLogReqForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(bool, required, tag = "2")] + pub projection_pushdown_enabled: bool, + #[prost(int32, repeated, tag = "3")] + pub projected_fields: ::prost::alloc::vec::Vec, + #[prost(message, repeated, tag = "4")] + pub buckets_req: ::prost::alloc::vec::Vec, + /// filter_predicate and filter_schema_id MUST be set together. + /// filter_predicate is the serialized predicate; filter_schema_id identifies + /// the schema against which the predicate was compiled. + #[prost(message, optional, tag = "5")] + pub filter_predicate: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub filter_schema_id: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbFetchLogReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + /// TODO leader epoch + #[prost(int64, required, tag = "3")] + pub fetch_offset: i64, + #[prost(int32, required, tag = "4")] + pub max_fetch_bytes: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbFetchLogRespForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbFetchLogRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "5")] + pub high_watermark: ::core::option::Option, + /// TODO now we don't introduce log start offset, but remain it in protobuf + #[prost(int64, optional, tag = "6")] + pub log_start_offset: ::core::option::Option, + #[prost(message, optional, tag = "7")] + pub remote_log_fetch_info: ::core::option::Option, + #[prost(bytes = "vec", optional, tag = "8")] + pub records: ::core::option::Option<::prost::alloc::vec::Vec>, + /// The next fetch offset when all batches in this bucket are filtered out by server-side + /// filter. When set (>= 0), the records field MUST be empty — the two fields are mutually + /// exclusive. The client should use this offset as the starting offset for the next fetch. + #[prost(int64, optional, tag = "9")] + pub filtered_end_offset: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbPutKvReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(bytes = "bytes", required, tag = "3")] + pub records: ::prost::bytes::Bytes, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPutKvRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + /// the log end offset (LEO) of the changelog after this write + /// this is the offset of the next record to be written, used for exactly-once semantics + #[prost(int64, optional, tag = "5")] + pub log_end_offset: ::core::option::Option, + /// backpressure signal from RocksDB write stall detection: + /// 0 = normal (no pressure), (0,1) = DELAYED zone (normalized L0 ratio) + /// introduced in v1.0 + #[prost(float, optional, tag = "6")] + pub pressure: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbLookupReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(bytes = "bytes", repeated, tag = "3")] + pub keys: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, + /// The original partition name for historical lookup. It is unset for normal lookup. + #[prost(string, optional, tag = "4")] + pub original_partition_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbLookupRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "5")] + pub values: ::prost::alloc::vec::Vec, + /// The original partition name for historical lookup. It is unset for normal lookup. + #[prost(string, optional, tag = "6")] + pub original_partition_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbValue { + /// optional, if empty, means no value + #[prost(bytes = "vec", optional, tag = "1")] + pub values: ::core::option::Option<::prost::alloc::vec::Vec>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbValueList { + #[prost(bytes = "vec", repeated, tag = "1")] + pub values: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbPrefixLookupReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(bytes = "bytes", repeated, tag = "3")] + pub keys: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPrefixLookupRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "5")] + pub value_lists: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbTableBucket { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, optional, tag = "2")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "3")] + pub bucket_id: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbAdjustIsrReqForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_req: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAdjustIsrReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, required, tag = "3")] + pub leader_epoch: i32, + #[prost(int32, repeated, tag = "4")] + pub new_isr: ::prost::alloc::vec::Vec, + #[prost(int32, required, tag = "5")] + pub coordinator_epoch: i32, + #[prost(int32, required, tag = "6")] + pub bucket_epoch: i32, + #[prost(int32, repeated, tag = "7")] + pub standby_replicas: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbAdjustIsrRespForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_resp: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAdjustIsrRespForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, optional, tag = "5")] + pub leader_id: ::core::option::Option, + #[prost(int32, optional, tag = "6")] + pub leader_epoch: ::core::option::Option, + #[prost(int32, repeated, tag = "7")] + pub isr: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "8")] + pub bucket_epoch: ::core::option::Option, + #[prost(int32, optional, tag = "9")] + pub coordinator_epoch: ::core::option::Option, + #[prost(int32, repeated, tag = "10")] + pub standby_replicas: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbListOffsetsRespForBucket { + #[prost(int32, required, tag = "1")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "4")] + pub offset: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbNotifyLeaderAndIsrReqForBucket { + /// we need table path for tablet server to create data dir for the bucket, + /// although tablet server don't need it after it has created data dir. + /// For simplicity, we always pass table path. + #[prost(message, required, tag = "1")] + pub physical_table_path: PbPhysicalTablePath, + #[prost(message, required, tag = "2")] + pub table_bucket: PbTableBucket, + #[prost(int32, required, tag = "3")] + pub leader: i32, + #[prost(int32, required, tag = "4")] + pub leader_epoch: i32, + #[prost(int32, repeated, tag = "5")] + pub replicas: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, tag = "6")] + pub isr: ::prost::alloc::vec::Vec, + #[prost(int32, required, tag = "7")] + pub bucket_epoch: i32, + #[prost(int32, repeated, tag = "8")] + pub standby_replicas: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbNotifyLeaderAndIsrRespForBucket { + #[prost(message, required, tag = "1")] + pub table_bucket: PbTableBucket, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbStopReplicaReqForBucket { + #[prost(message, required, tag = "1")] + pub table_bucket: PbTableBucket, + #[prost(int32, required, tag = "2")] + pub leader_epoch: i32, + /// delete means remove local replica data (i.e., data stored on the current node). + #[prost(bool, required, tag = "3")] + pub delete: bool, + /// deleteRemote means remove remote replica data (e.g., data in object storage) and was introduced in v0.9. + /// For backward compatibility, if a request does not include the deleteRemote flag, the system treats delete as + /// deleteRemote (i.e., it falls back to remote deletion). This ensures older CoordinatorServer continues to function + /// correctly with newer TabletServers. + #[prost(bool, optional, tag = "4")] + pub delete_remote: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbStopReplicaRespForBucket { + #[prost(message, required, tag = "1")] + pub table_bucket: PbTableBucket, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbKvSnapshot { + #[prost(int32, required, tag = "1")] + pub bucket_id: i32, + /// null if there is no snapshot for this bucket + #[prost(int64, optional, tag = "2")] + pub snapshot_id: ::core::option::Option, + /// null if there is no snapshot for this bucket, then read from EARLIEST + #[prost(int64, optional, tag = "3")] + pub log_offset: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbLakeSnapshotForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int64, optional, tag = "3")] + pub log_offset: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub partition_name: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRemotePathAndLocalFile { + #[prost(string, required, tag = "1")] + pub remote_path: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub local_file_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbKeyValue { + #[prost(string, required, tag = "1")] + pub key: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub value: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbRemoteLogFetchInfo { + #[prost(string, required, tag = "1")] + pub remote_log_tablet_dir: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub partition_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "3")] + pub remote_log_segments: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "4")] + pub first_start_pos: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRemoteLogSegment { + #[prost(string, required, tag = "1")] + pub remote_log_segment_id: ::prost::alloc::string::String, + #[prost(int64, required, tag = "2")] + pub remote_log_start_offset: i64, + #[prost(int64, required, tag = "3")] + pub remote_log_end_offset: i64, + #[prost(int32, required, tag = "4")] + pub segment_size_in_bytes: i32, + #[prost(int64, optional, tag = "5")] + pub max_timestamp: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPartitionInfo { + #[prost(int64, required, tag = "1")] + pub partition_id: i64, + #[prost(message, required, tag = "2")] + pub partition_spec: PbPartitionSpec, + #[prost(string, optional, tag = "3")] + pub remote_data_dir: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPartitionSpec { + #[prost(message, repeated, tag = "1")] + pub partition_key_values: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbCreateAclRespInfo { + #[prost(message, required, tag = "1")] + pub acl: PbAclInfo, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAclInfo { + #[prost(string, required, tag = "1")] + pub resource_name: ::prost::alloc::string::String, + #[prost(int32, required, tag = "2")] + pub resource_type: i32, + #[prost(string, required, tag = "3")] + pub principal_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "4")] + pub principal_type: ::prost::alloc::string::String, + #[prost(string, required, tag = "5")] + pub host: ::prost::alloc::string::String, + #[prost(int32, required, tag = "6")] + pub operation_type: i32, + #[prost(int32, required, tag = "7")] + pub permission_type: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAclFilter { + #[prost(string, optional, tag = "1")] + pub resource_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, required, tag = "2")] + pub resource_type: i32, + #[prost(string, optional, tag = "3")] + pub principal_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "4")] + pub principal_type: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub host: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int32, required, tag = "6")] + pub operation_type: i32, + #[prost(int32, required, tag = "7")] + pub permission_type: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbDropAclsFilterResult { + #[prost(message, repeated, tag = "1")] + pub matching_acls: ::prost::alloc::vec::Vec, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbDropAclsMatchingAcl { + #[prost(message, required, tag = "1")] + pub acl: PbAclInfo, + #[prost(int32, optional, tag = "2")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "3")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbLakeTieringTableInfo { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, required, tag = "2")] + pub table_path: PbTablePath, + #[prost(int64, required, tag = "3")] + pub tiering_epoch: i64, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbHeartbeatReqForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + /// the coordinator epoch when the table is assigned to be tiering service + #[prost(int32, required, tag = "2")] + pub coordinator_epoch: i32, + /// the tiering epoch when the table is assigned to be tiering service + #[prost(int64, required, tag = "3")] + pub tiering_epoch: i64, + /// stats for the last tiering round; only set for finished_tables in LakeTieringHeartbeatRequest + #[prost(message, optional, tag = "4")] + pub lake_tiering_stats: ::core::option::Option, +} +/// Stats reported by the tiering service when a table finishes a tiering round. +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbLakeTieringStats { + /// cumulative total file size (bytes) of the lake table after tiering + #[prost(int64, optional, tag = "1")] + pub file_size: ::core::option::Option, + /// cumulative total record count of the lake table after tiering + #[prost(int64, optional, tag = "2")] + pub record_count: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbHeartbeatRespForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, optional, tag = "2")] + pub error: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbAlterConfig { + #[prost(string, required, tag = "1")] + pub config_key: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub config_value: ::core::option::Option<::prost::alloc::string::String>, + /// SET=0, DELETE=1, APPEND=2, SUBTRACT=3 + #[prost(int32, required, tag = "3")] + pub op_type: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbAddColumn { + #[prost(string, required, tag = "1")] + pub column_name: ::prost::alloc::string::String, + #[prost(bytes = "vec", required, tag = "2")] + pub data_type_json: ::prost::alloc::vec::Vec, + #[prost(string, optional, tag = "3")] + pub comment: ::core::option::Option<::prost::alloc::string::String>, + /// LAST=0,FIRST=1,AFTER=3 + #[prost(int32, required, tag = "4")] + pub column_position_type: i32, + #[prost(string, optional, tag = "5")] + pub agg_function_type: ::core::option::Option<::prost::alloc::string::String>, + #[prost(message, repeated, tag = "6")] + pub agg_function_params: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbDropColumn { + #[prost(string, required, tag = "1")] + pub column_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRenameColumn { + #[prost(string, required, tag = "1")] + pub old_column_name: ::prost::alloc::string::String, + #[prost(string, required, tag = "2")] + pub new_column_name: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbModifyColumn { + #[prost(string, required, tag = "1")] + pub column_name: ::prost::alloc::string::String, + #[prost(bytes = "vec", optional, tag = "2")] + pub data_type_json: ::core::option::Option<::prost::alloc::vec::Vec>, + #[prost(string, optional, tag = "3")] + pub comment: ::core::option::Option<::prost::alloc::string::String>, + /// LAST=0,FIRST=1,AFTER=3 + #[prost(int32, optional, tag = "4")] + pub column_position_type: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbDescribeConfig { + #[prost(string, required, tag = "1")] + pub config_key: ::prost::alloc::string::String, + #[prost(string, optional, tag = "2")] + pub config_value: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, required, tag = "3")] + pub config_source: ::prost::alloc::string::String, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbRebalancePlanForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_plan: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbRebalanceProgressForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub buckets_progress: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRebalanceProgressForBucket { + #[prost(message, required, tag = "1")] + pub rebalance_plan: PbRebalancePlanForBucket, + #[prost(int32, required, tag = "2")] + pub rebalance_status: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbRebalancePlanForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int32, optional, tag = "3")] + pub original_leader: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub new_leader: ::core::option::Option, + #[prost(int32, repeated, tag = "5")] + pub original_replicas: ::prost::alloc::vec::Vec, + #[prost(int32, repeated, tag = "6")] + pub new_replicas: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbLakeTableSnapshotMetadata { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(int64, required, tag = "2")] + pub snapshot_id: i64, + #[prost(string, required, tag = "3")] + pub tiered_bucket_offsets_file_path: ::prost::alloc::string::String, + #[prost(string, optional, tag = "4")] + pub readable_bucket_offsets_file_path: ::core::option::Option< + ::prost::alloc::string::String, + >, + /// Snapshot retention policy: The earliest snapshot ID to retain. + /// 1. If set, the system will keep all snapshots in the range \[earliest_snapshot_id_to_keep, current_snapshot_id\]. + /// 2. If not set, the system defaults to a "Single Snapshot Retention" policy, keeping only the snapshot specified in this request. + #[prost(int64, optional, tag = "5")] + pub earliest_snapshot_id_to_keep: ::core::option::Option, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbLakeTableSnapshotInfo { + #[prost(int64, optional, tag = "1")] + pub table_id: ::core::option::Option, + #[prost(int64, required, tag = "2")] + pub snapshot_id: i64, + #[prost(message, repeated, tag = "3")] + pub buckets_req: ::prost::alloc::vec::Vec, + /// add table path to reduce get table_path by table id + #[prost(message, optional, tag = "4")] + pub table_path: ::core::option::Option, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbLakeTableOffsetForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + /// Deprecated: log_start_offset is no longer used. Field number 3 is reserved for protocol compatibility. + /// optional int64 log_start_offset = 3; + #[prost(int64, optional, tag = "4")] + pub log_end_offset: ::core::option::Option, + /// Deprecated: partition_name is no longer used. Field number 5 is reserved for protocol compatibility. + /// optional string partition_name = 5; + #[prost(int64, optional, tag = "6")] + pub max_timestamp: ::core::option::Option, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbPrepareLakeTableRespForTable { + #[prost(int32, optional, tag = "1")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "3")] + pub table_id: ::core::option::Option, + #[prost(string, optional, tag = "4")] + pub lake_table_offsets_path: ::core::option::Option<::prost::alloc::string::String>, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbTableOffsets { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, required, tag = "2")] + pub table_path: PbTablePath, + #[prost(message, repeated, tag = "3")] + pub bucket_offsets: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbBucketOffset { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int64, optional, tag = "4")] + pub log_end_offset: ::core::option::Option, +} +/// Helper message for table offsets in producer offsets (without table_path) +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbProducerTableOffsets { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub bucket_offsets: ::prost::alloc::vec::Vec, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbDatabaseSummary { + #[prost(string, required, tag = "1")] + pub database_name: ::prost::alloc::string::String, + #[prost(int64, required, tag = "2")] + pub created_time: i64, + #[prost(int32, required, tag = "3")] + pub table_count: i32, +} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbKvSnapshotLeaseForTable { + #[prost(int64, required, tag = "1")] + pub table_id: i64, + #[prost(message, repeated, tag = "2")] + pub bucket_snapshots: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbKvSnapshotLeaseForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, + #[prost(int64, required, tag = "3")] + pub snapshot_id: i64, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbTableStatsReqForBucket { + #[prost(int64, optional, tag = "1")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "2")] + pub bucket_id: i32, +} +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] +pub struct PbTableStatsRespForBucket { + #[prost(int32, optional, tag = "1")] + pub error_code: ::core::option::Option, + #[prost(string, optional, tag = "2")] + pub error_message: ::core::option::Option<::prost::alloc::string::String>, + #[prost(int64, optional, tag = "3")] + pub partition_id: ::core::option::Option, + #[prost(int32, required, tag = "4")] + pub bucket_id: i32, + /// --- Table-level stats --- + /// The number of rows in this bucket. + /// For KV tables: the number of unique keys (live rows). + /// For Log tables: total number of log records (highWatermark - logStartOffset). + /// Absent if row count is not available (e.g., WAL changelog mode or legacy tables). + #[prost(int64, optional, tag = "5")] + pub row_count: ::core::option::Option, +} +/// Represents a predicate that can be serialized and transmitted across +/// languages +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbPredicate { + /// See PbPredicateType constants: LEAF = 0, COMPOUND = 1 + #[prost(int32, required, tag = "1")] + pub r#type: i32, + #[prost(message, optional, tag = "2")] + pub leaf: ::core::option::Option, + #[prost(message, optional, tag = "3")] + pub compound: ::core::option::Option, +} +/// Represents a leaf predicate that compares a field with literals +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbLeafPredicate { + /// The function to apply (see PbLeafFunction constants: EQUAL=0 ... NOT_IN=12) + #[prost(int32, required, tag = "1")] + pub function: i32, + /// The schema field id of the referenced top-level field + #[prost(int32, required, tag = "2")] + pub field_id: i32, + /// The literals to compare with + #[prost(message, repeated, tag = "3")] + pub literals: ::prost::alloc::vec::Vec, +} +/// Represents a compound predicate that combines multiple predicates +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbCompoundPredicate { + /// The function to apply (see PbCompoundFunction constants: AND=0, OR=1) + #[prost(int32, required, tag = "1")] + pub function: i32, + /// The child predicates + #[prost(message, repeated, tag = "2")] + pub children: ::prost::alloc::vec::Vec, +} +/// Represents a literal value +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PbLiteralValue { + /// See PbDataTypeRoot constants: indicates which value field is populated + #[prost(int32, required, tag = "1")] + pub literal_type: i32, + #[prost(bool, required, tag = "2")] + pub is_null: bool, + #[prost(bool, optional, tag = "3")] + pub boolean_value: ::core::option::Option, + #[prost(int32, optional, tag = "4")] + pub int_value: ::core::option::Option, + #[prost(int64, optional, tag = "5")] + pub bigint_value: ::core::option::Option, + #[prost(float, optional, tag = "6")] + pub float_value: ::core::option::Option, + #[prost(double, optional, tag = "7")] + pub double_value: ::core::option::Option, + #[prost(string, optional, tag = "8")] + pub string_value: ::core::option::Option<::prost::alloc::string::String>, + #[prost(bytes = "vec", optional, tag = "9")] + pub binary_value: ::core::option::Option<::prost::alloc::vec::Vec>, + /// Serialized decimal (compact mode) + #[prost(int64, optional, tag = "10")] + pub decimal_value: ::core::option::Option, + /// Epoch millis + #[prost(int64, optional, tag = "11")] + pub timestamp_millis_value: ::core::option::Option, + /// Nano of millis + #[prost(int32, optional, tag = "12")] + pub timestamp_nano_of_millis_value: ::core::option::Option, + /// Serialized decimal (non-compact mode) + #[prost(bytes = "vec", optional, tag = "13")] + pub decimal_bytes: ::core::option::Option<::prost::alloc::vec::Vec>, +}