You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by dh...@apache.org on 2023/06/30 14:28:53 UTC
[arrow-datafusion] 02/02: Add fetch to sortpreservingmergeexec
This is an automated email from the ASF dual-hosted git repository.
dheres pushed a commit to branch add_fetch_to_sort_preserving_merge_exec
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
commit 2e0ca35ef8e933de9c33c100f81fdfd1c56c1f2c
Author: Daniƫl Heres <da...@coralogix.com>
AuthorDate: Fri Jun 30 16:28:37 2023 +0200
Add fetch to sortpreservingmergeexec
---
datafusion/proto/proto/proto_descriptor.bin | Bin 86986 -> 0 bytes
datafusion/proto/src/datafusion.rs | 2864 ----
datafusion/proto/src/datafusion.serde.rs | 22857 --------------------------
3 files changed, 25721 deletions(-)
diff --git a/datafusion/proto/proto/proto_descriptor.bin b/datafusion/proto/proto/proto_descriptor.bin
deleted file mode 100644
index 448c1eda25..0000000000
Binary files a/datafusion/proto/proto/proto_descriptor.bin and /dev/null differ
diff --git a/datafusion/proto/src/datafusion.rs b/datafusion/proto/src/datafusion.rs
deleted file mode 100644
index ae5dfe14b5..0000000000
--- a/datafusion/proto/src/datafusion.rs
+++ /dev/null
@@ -1,2864 +0,0 @@
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ColumnRelation {
- #[prost(string, tag = "1")]
- pub relation: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Column {
- #[prost(string, tag = "1")]
- pub name: ::prost::alloc::string::String,
- #[prost(message, optional, tag = "2")]
- pub relation: ::core::option::Option<ColumnRelation>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct DfField {
- #[prost(message, optional, tag = "1")]
- pub field: ::core::option::Option<Field>,
- #[prost(message, optional, tag = "2")]
- pub qualifier: ::core::option::Option<ColumnRelation>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct DfSchema {
- #[prost(message, repeated, tag = "1")]
- pub columns: ::prost::alloc::vec::Vec<DfField>,
- #[prost(map = "string, string", tag = "2")]
- pub metadata: ::std::collections::HashMap<
- ::prost::alloc::string::String,
- ::prost::alloc::string::String,
- >,
-}
-/// logical plan
-/// LogicalPlan is a nested type
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct LogicalPlanNode {
- #[prost(
- oneof = "logical_plan_node::LogicalPlanType",
- tags = "1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27"
- )]
- pub logical_plan_type: ::core::option::Option<logical_plan_node::LogicalPlanType>,
-}
-/// Nested message and enum types in `LogicalPlanNode`.
-pub mod logical_plan_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum LogicalPlanType {
- #[prost(message, tag = "1")]
- ListingScan(super::ListingTableScanNode),
- #[prost(message, tag = "3")]
- Projection(::prost::alloc::boxed::Box<super::ProjectionNode>),
- #[prost(message, tag = "4")]
- Selection(::prost::alloc::boxed::Box<super::SelectionNode>),
- #[prost(message, tag = "5")]
- Limit(::prost::alloc::boxed::Box<super::LimitNode>),
- #[prost(message, tag = "6")]
- Aggregate(::prost::alloc::boxed::Box<super::AggregateNode>),
- #[prost(message, tag = "7")]
- Join(::prost::alloc::boxed::Box<super::JoinNode>),
- #[prost(message, tag = "8")]
- Sort(::prost::alloc::boxed::Box<super::SortNode>),
- #[prost(message, tag = "9")]
- Repartition(::prost::alloc::boxed::Box<super::RepartitionNode>),
- #[prost(message, tag = "10")]
- EmptyRelation(super::EmptyRelationNode),
- #[prost(message, tag = "11")]
- CreateExternalTable(super::CreateExternalTableNode),
- #[prost(message, tag = "12")]
- Explain(::prost::alloc::boxed::Box<super::ExplainNode>),
- #[prost(message, tag = "13")]
- Window(::prost::alloc::boxed::Box<super::WindowNode>),
- #[prost(message, tag = "14")]
- Analyze(::prost::alloc::boxed::Box<super::AnalyzeNode>),
- #[prost(message, tag = "15")]
- CrossJoin(::prost::alloc::boxed::Box<super::CrossJoinNode>),
- #[prost(message, tag = "16")]
- Values(super::ValuesNode),
- #[prost(message, tag = "17")]
- Extension(super::LogicalExtensionNode),
- #[prost(message, tag = "18")]
- CreateCatalogSchema(super::CreateCatalogSchemaNode),
- #[prost(message, tag = "19")]
- Union(super::UnionNode),
- #[prost(message, tag = "20")]
- CreateCatalog(super::CreateCatalogNode),
- #[prost(message, tag = "21")]
- SubqueryAlias(::prost::alloc::boxed::Box<super::SubqueryAliasNode>),
- #[prost(message, tag = "22")]
- CreateView(::prost::alloc::boxed::Box<super::CreateViewNode>),
- #[prost(message, tag = "23")]
- Distinct(::prost::alloc::boxed::Box<super::DistinctNode>),
- #[prost(message, tag = "24")]
- ViewScan(::prost::alloc::boxed::Box<super::ViewTableScanNode>),
- #[prost(message, tag = "25")]
- CustomScan(super::CustomTableScanNode),
- #[prost(message, tag = "26")]
- Prepare(::prost::alloc::boxed::Box<super::PrepareNode>),
- #[prost(message, tag = "27")]
- DropView(super::DropViewNode),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct LogicalExtensionNode {
- #[prost(bytes = "vec", tag = "1")]
- pub node: ::prost::alloc::vec::Vec<u8>,
- #[prost(message, repeated, tag = "2")]
- pub inputs: ::prost::alloc::vec::Vec<LogicalPlanNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ProjectionColumns {
- #[prost(string, repeated, tag = "1")]
- pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CsvFormat {
- #[prost(bool, tag = "1")]
- pub has_header: bool,
- #[prost(string, tag = "2")]
- pub delimiter: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ParquetFormat {}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AvroFormat {}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct LogicalExprNodeCollection {
- #[prost(message, repeated, tag = "1")]
- pub logical_expr_nodes: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ListingTableScanNode {
- #[prost(message, optional, tag = "14")]
- pub table_name: ::core::option::Option<OwnedTableReference>,
- #[prost(string, repeated, tag = "2")]
- pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
- #[prost(string, tag = "3")]
- pub file_extension: ::prost::alloc::string::String,
- #[prost(message, optional, tag = "4")]
- pub projection: ::core::option::Option<ProjectionColumns>,
- #[prost(message, optional, tag = "5")]
- pub schema: ::core::option::Option<Schema>,
- #[prost(message, repeated, tag = "6")]
- pub filters: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(string, repeated, tag = "7")]
- pub table_partition_cols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
- #[prost(bool, tag = "8")]
- pub collect_stat: bool,
- #[prost(uint32, tag = "9")]
- pub target_partitions: u32,
- #[prost(message, repeated, tag = "13")]
- pub file_sort_order: ::prost::alloc::vec::Vec<LogicalExprNodeCollection>,
- #[prost(oneof = "listing_table_scan_node::FileFormatType", tags = "10, 11, 12")]
- pub file_format_type: ::core::option::Option<
- listing_table_scan_node::FileFormatType,
- >,
-}
-/// Nested message and enum types in `ListingTableScanNode`.
-pub mod listing_table_scan_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum FileFormatType {
- #[prost(message, tag = "10")]
- Csv(super::CsvFormat),
- #[prost(message, tag = "11")]
- Parquet(super::ParquetFormat),
- #[prost(message, tag = "12")]
- Avro(super::AvroFormat),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ViewTableScanNode {
- #[prost(message, optional, tag = "6")]
- pub table_name: ::core::option::Option<OwnedTableReference>,
- #[prost(message, optional, boxed, tag = "2")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, optional, tag = "3")]
- pub schema: ::core::option::Option<Schema>,
- #[prost(message, optional, tag = "4")]
- pub projection: ::core::option::Option<ProjectionColumns>,
- #[prost(string, tag = "5")]
- pub definition: ::prost::alloc::string::String,
-}
-/// Logical Plan to Scan a CustomTableProvider registered at runtime
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CustomTableScanNode {
- #[prost(message, optional, tag = "6")]
- pub table_name: ::core::option::Option<OwnedTableReference>,
- #[prost(message, optional, tag = "2")]
- pub projection: ::core::option::Option<ProjectionColumns>,
- #[prost(message, optional, tag = "3")]
- pub schema: ::core::option::Option<Schema>,
- #[prost(message, repeated, tag = "4")]
- pub filters: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(bytes = "vec", tag = "5")]
- pub custom_table_data: ::prost::alloc::vec::Vec<u8>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ProjectionNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, repeated, tag = "2")]
- pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(oneof = "projection_node::OptionalAlias", tags = "3")]
- pub optional_alias: ::core::option::Option<projection_node::OptionalAlias>,
-}
-/// Nested message and enum types in `ProjectionNode`.
-pub mod projection_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum OptionalAlias {
- #[prost(string, tag = "3")]
- Alias(::prost::alloc::string::String),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct SelectionNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, optional, tag = "2")]
- pub expr: ::core::option::Option<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct SortNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, repeated, tag = "2")]
- pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
- /// Maximum number of highest/lowest rows to fetch; negative means no limit
- #[prost(int64, tag = "3")]
- pub fetch: i64,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct RepartitionNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(oneof = "repartition_node::PartitionMethod", tags = "2, 3")]
- pub partition_method: ::core::option::Option<repartition_node::PartitionMethod>,
-}
-/// Nested message and enum types in `RepartitionNode`.
-pub mod repartition_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum PartitionMethod {
- #[prost(uint64, tag = "2")]
- RoundRobin(u64),
- #[prost(message, tag = "3")]
- Hash(super::HashRepartition),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct HashRepartition {
- #[prost(message, repeated, tag = "1")]
- pub hash_expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(uint64, tag = "2")]
- pub partition_count: u64,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct EmptyRelationNode {
- #[prost(bool, tag = "1")]
- pub produce_one_row: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CreateExternalTableNode {
- #[prost(message, optional, tag = "12")]
- pub name: ::core::option::Option<OwnedTableReference>,
- #[prost(string, tag = "2")]
- pub location: ::prost::alloc::string::String,
- #[prost(string, tag = "3")]
- pub file_type: ::prost::alloc::string::String,
- #[prost(bool, tag = "4")]
- pub has_header: bool,
- #[prost(message, optional, tag = "5")]
- pub schema: ::core::option::Option<DfSchema>,
- #[prost(string, repeated, tag = "6")]
- pub table_partition_cols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
- #[prost(bool, tag = "7")]
- pub if_not_exists: bool,
- #[prost(string, tag = "8")]
- pub delimiter: ::prost::alloc::string::String,
- #[prost(string, tag = "9")]
- pub definition: ::prost::alloc::string::String,
- #[prost(string, tag = "10")]
- pub file_compression_type: ::prost::alloc::string::String,
- #[prost(message, repeated, tag = "13")]
- pub order_exprs: ::prost::alloc::vec::Vec<LogicalExprNodeCollection>,
- #[prost(bool, tag = "14")]
- pub unbounded: bool,
- #[prost(map = "string, string", tag = "11")]
- pub options: ::std::collections::HashMap<
- ::prost::alloc::string::String,
- ::prost::alloc::string::String,
- >,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PrepareNode {
- #[prost(string, tag = "1")]
- pub name: ::prost::alloc::string::String,
- #[prost(message, repeated, tag = "2")]
- pub data_types: ::prost::alloc::vec::Vec<ArrowType>,
- #[prost(message, optional, boxed, tag = "3")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CreateCatalogSchemaNode {
- #[prost(string, tag = "1")]
- pub schema_name: ::prost::alloc::string::String,
- #[prost(bool, tag = "2")]
- pub if_not_exists: bool,
- #[prost(message, optional, tag = "3")]
- pub schema: ::core::option::Option<DfSchema>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CreateCatalogNode {
- #[prost(string, tag = "1")]
- pub catalog_name: ::prost::alloc::string::String,
- #[prost(bool, tag = "2")]
- pub if_not_exists: bool,
- #[prost(message, optional, tag = "3")]
- pub schema: ::core::option::Option<DfSchema>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct DropViewNode {
- #[prost(message, optional, tag = "1")]
- pub name: ::core::option::Option<OwnedTableReference>,
- #[prost(bool, tag = "2")]
- pub if_exists: bool,
- #[prost(message, optional, tag = "3")]
- pub schema: ::core::option::Option<DfSchema>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CreateViewNode {
- #[prost(message, optional, tag = "5")]
- pub name: ::core::option::Option<OwnedTableReference>,
- #[prost(message, optional, boxed, tag = "2")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(bool, tag = "3")]
- pub or_replace: bool,
- #[prost(string, tag = "4")]
- pub definition: ::prost::alloc::string::String,
-}
-/// a node containing data for defining values list. unlike in SQL where it's two dimensional, here
-/// the list is flattened, and with the field n_cols it can be parsed and partitioned into rows
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ValuesNode {
- #[prost(uint64, tag = "1")]
- pub n_cols: u64,
- #[prost(message, repeated, tag = "2")]
- pub values_list: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AnalyzeNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(bool, tag = "2")]
- pub verbose: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ExplainNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(bool, tag = "2")]
- pub verbose: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AggregateNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, repeated, tag = "2")]
- pub group_expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(message, repeated, tag = "3")]
- pub aggr_expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct WindowNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, repeated, tag = "2")]
- pub window_expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct JoinNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub left: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, optional, boxed, tag = "2")]
- pub right: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(enumeration = "JoinType", tag = "3")]
- pub join_type: i32,
- #[prost(enumeration = "JoinConstraint", tag = "4")]
- pub join_constraint: i32,
- #[prost(message, repeated, tag = "5")]
- pub left_join_key: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(message, repeated, tag = "6")]
- pub right_join_key: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(bool, tag = "7")]
- pub null_equals_null: bool,
- #[prost(message, optional, tag = "8")]
- pub filter: ::core::option::Option<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct DistinctNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct UnionNode {
- #[prost(message, repeated, tag = "1")]
- pub inputs: ::prost::alloc::vec::Vec<LogicalPlanNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CrossJoinNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub left: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, optional, boxed, tag = "2")]
- pub right: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct LimitNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- /// The number of rows to skip before fetch; non-positive means don't skip any
- #[prost(int64, tag = "2")]
- pub skip: i64,
- /// Maximum number of rows to fetch; negative means no limit
- #[prost(int64, tag = "3")]
- pub fetch: i64,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct SelectionExecNode {
- #[prost(message, optional, tag = "1")]
- pub expr: ::core::option::Option<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct SubqueryAliasNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<LogicalPlanNode>>,
- #[prost(message, optional, tag = "3")]
- pub alias: ::core::option::Option<OwnedTableReference>,
-}
-/// logical expressions
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct LogicalExprNode {
- #[prost(
- oneof = "logical_expr_node::ExprType",
- tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34"
- )]
- pub expr_type: ::core::option::Option<logical_expr_node::ExprType>,
-}
-/// Nested message and enum types in `LogicalExprNode`.
-pub mod logical_expr_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum ExprType {
- /// column references
- #[prost(message, tag = "1")]
- Column(super::Column),
- /// alias
- #[prost(message, tag = "2")]
- Alias(::prost::alloc::boxed::Box<super::AliasNode>),
- #[prost(message, tag = "3")]
- Literal(super::ScalarValue),
- /// binary expressions
- #[prost(message, tag = "4")]
- BinaryExpr(super::BinaryExprNode),
- /// aggregate expressions
- #[prost(message, tag = "5")]
- AggregateExpr(::prost::alloc::boxed::Box<super::AggregateExprNode>),
- /// null checks
- #[prost(message, tag = "6")]
- IsNullExpr(::prost::alloc::boxed::Box<super::IsNull>),
- #[prost(message, tag = "7")]
- IsNotNullExpr(::prost::alloc::boxed::Box<super::IsNotNull>),
- #[prost(message, tag = "8")]
- NotExpr(::prost::alloc::boxed::Box<super::Not>),
- #[prost(message, tag = "9")]
- Between(::prost::alloc::boxed::Box<super::BetweenNode>),
- #[prost(message, tag = "10")]
- Case(::prost::alloc::boxed::Box<super::CaseNode>),
- #[prost(message, tag = "11")]
- Cast(::prost::alloc::boxed::Box<super::CastNode>),
- #[prost(message, tag = "12")]
- Sort(::prost::alloc::boxed::Box<super::SortExprNode>),
- #[prost(message, tag = "13")]
- Negative(::prost::alloc::boxed::Box<super::NegativeNode>),
- #[prost(message, tag = "14")]
- InList(::prost::alloc::boxed::Box<super::InListNode>),
- #[prost(bool, tag = "15")]
- Wildcard(bool),
- #[prost(message, tag = "16")]
- ScalarFunction(super::ScalarFunctionNode),
- #[prost(message, tag = "17")]
- TryCast(::prost::alloc::boxed::Box<super::TryCastNode>),
- /// window expressions
- #[prost(message, tag = "18")]
- WindowExpr(::prost::alloc::boxed::Box<super::WindowExprNode>),
- /// AggregateUDF expressions
- #[prost(message, tag = "19")]
- AggregateUdfExpr(::prost::alloc::boxed::Box<super::AggregateUdfExprNode>),
- /// Scalar UDF expressions
- #[prost(message, tag = "20")]
- ScalarUdfExpr(super::ScalarUdfExprNode),
- #[prost(message, tag = "21")]
- GetIndexedField(::prost::alloc::boxed::Box<super::GetIndexedField>),
- #[prost(message, tag = "22")]
- GroupingSet(super::GroupingSetNode),
- #[prost(message, tag = "23")]
- Cube(super::CubeNode),
- #[prost(message, tag = "24")]
- Rollup(super::RollupNode),
- #[prost(message, tag = "25")]
- IsTrue(::prost::alloc::boxed::Box<super::IsTrue>),
- #[prost(message, tag = "26")]
- IsFalse(::prost::alloc::boxed::Box<super::IsFalse>),
- #[prost(message, tag = "27")]
- IsUnknown(::prost::alloc::boxed::Box<super::IsUnknown>),
- #[prost(message, tag = "28")]
- IsNotTrue(::prost::alloc::boxed::Box<super::IsNotTrue>),
- #[prost(message, tag = "29")]
- IsNotFalse(::prost::alloc::boxed::Box<super::IsNotFalse>),
- #[prost(message, tag = "30")]
- IsNotUnknown(::prost::alloc::boxed::Box<super::IsNotUnknown>),
- #[prost(message, tag = "31")]
- Like(::prost::alloc::boxed::Box<super::LikeNode>),
- #[prost(message, tag = "32")]
- Ilike(::prost::alloc::boxed::Box<super::ILikeNode>),
- #[prost(message, tag = "33")]
- SimilarTo(::prost::alloc::boxed::Box<super::SimilarToNode>),
- #[prost(message, tag = "34")]
- Placeholder(super::PlaceholderNode),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PlaceholderNode {
- #[prost(string, tag = "1")]
- pub id: ::prost::alloc::string::String,
- #[prost(message, optional, tag = "2")]
- pub data_type: ::core::option::Option<ArrowType>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct LogicalExprList {
- #[prost(message, repeated, tag = "1")]
- pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct GroupingSetNode {
- #[prost(message, repeated, tag = "1")]
- pub expr: ::prost::alloc::vec::Vec<LogicalExprList>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CubeNode {
- #[prost(message, repeated, tag = "1")]
- pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct RollupNode {
- #[prost(message, repeated, tag = "1")]
- pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct GetIndexedField {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, optional, tag = "2")]
- pub key: ::core::option::Option<ScalarValue>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IsNull {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IsNotNull {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IsTrue {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IsFalse {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IsUnknown {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IsNotTrue {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IsNotFalse {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IsNotUnknown {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Not {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AliasNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(string, tag = "2")]
- pub alias: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct BinaryExprNode {
- /// Represents the operands from the left inner most expression
- /// to the right outer most expression where each of them are chained
- /// with the operator 'op'.
- #[prost(message, repeated, tag = "1")]
- pub operands: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(string, tag = "3")]
- pub op: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct NegativeNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct InListNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, repeated, tag = "2")]
- pub list: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(bool, tag = "3")]
- pub negated: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarFunctionNode {
- #[prost(enumeration = "ScalarFunction", tag = "1")]
- pub fun: i32,
- #[prost(message, repeated, tag = "2")]
- pub args: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AggregateExprNode {
- #[prost(enumeration = "AggregateFunction", tag = "1")]
- pub aggr_function: i32,
- #[prost(message, repeated, tag = "2")]
- pub expr: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(bool, tag = "3")]
- pub distinct: bool,
- #[prost(message, optional, boxed, tag = "4")]
- pub filter: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, repeated, tag = "5")]
- pub order_by: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AggregateUdfExprNode {
- #[prost(string, tag = "1")]
- pub fun_name: ::prost::alloc::string::String,
- #[prost(message, repeated, tag = "2")]
- pub args: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(message, optional, boxed, tag = "3")]
- pub filter: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, repeated, tag = "4")]
- pub order_by: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarUdfExprNode {
- #[prost(string, tag = "1")]
- pub fun_name: ::prost::alloc::string::String,
- #[prost(message, repeated, tag = "2")]
- pub args: ::prost::alloc::vec::Vec<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct WindowExprNode {
- #[prost(message, optional, boxed, tag = "4")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, repeated, tag = "5")]
- pub partition_by: ::prost::alloc::vec::Vec<LogicalExprNode>,
- #[prost(message, repeated, tag = "6")]
- pub order_by: ::prost::alloc::vec::Vec<LogicalExprNode>,
- /// repeated LogicalExprNode filter = 7;
- #[prost(message, optional, tag = "8")]
- pub window_frame: ::core::option::Option<WindowFrame>,
- #[prost(oneof = "window_expr_node::WindowFunction", tags = "1, 2")]
- pub window_function: ::core::option::Option<window_expr_node::WindowFunction>,
-}
-/// Nested message and enum types in `WindowExprNode`.
-pub mod window_expr_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum WindowFunction {
- #[prost(enumeration = "super::AggregateFunction", tag = "1")]
- AggrFunction(i32),
- /// udaf = 3
- #[prost(enumeration = "super::BuiltInWindowFunction", tag = "2")]
- BuiltInFunction(i32),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct BetweenNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(bool, tag = "2")]
- pub negated: bool,
- #[prost(message, optional, boxed, tag = "3")]
- pub low: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, optional, boxed, tag = "4")]
- pub high: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct LikeNode {
- #[prost(bool, tag = "1")]
- pub negated: bool,
- #[prost(message, optional, boxed, tag = "2")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, optional, boxed, tag = "3")]
- pub pattern: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(string, tag = "4")]
- pub escape_char: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ILikeNode {
- #[prost(bool, tag = "1")]
- pub negated: bool,
- #[prost(message, optional, boxed, tag = "2")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, optional, boxed, tag = "3")]
- pub pattern: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(string, tag = "4")]
- pub escape_char: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct SimilarToNode {
- #[prost(bool, tag = "1")]
- pub negated: bool,
- #[prost(message, optional, boxed, tag = "2")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, optional, boxed, tag = "3")]
- pub pattern: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(string, tag = "4")]
- pub escape_char: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CaseNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, repeated, tag = "2")]
- pub when_then_expr: ::prost::alloc::vec::Vec<WhenThen>,
- #[prost(message, optional, boxed, tag = "3")]
- pub else_expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct WhenThen {
- #[prost(message, optional, tag = "1")]
- pub when_expr: ::core::option::Option<LogicalExprNode>,
- #[prost(message, optional, tag = "2")]
- pub then_expr: ::core::option::Option<LogicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CastNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, optional, tag = "2")]
- pub arrow_type: ::core::option::Option<ArrowType>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct TryCastNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(message, optional, tag = "2")]
- pub arrow_type: ::core::option::Option<ArrowType>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct SortExprNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<LogicalExprNode>>,
- #[prost(bool, tag = "2")]
- pub asc: bool,
- #[prost(bool, tag = "3")]
- pub nulls_first: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct WindowFrame {
- #[prost(enumeration = "WindowFrameUnits", tag = "1")]
- pub window_frame_units: i32,
- #[prost(message, optional, tag = "2")]
- pub start_bound: ::core::option::Option<WindowFrameBound>,
- /// "optional" keyword is stable in protoc 3.15 but prost is still on 3.14 (see <https://github.com/tokio-rs/prost/issues/430> and <https://github.com/tokio-rs/prost/pull/455>)
- /// this syntax is ugly but is binary compatible with the "optional" keyword (see <https://stackoverflow.com/questions/42622015/how-to-define-an-optional-field-in-protobuf-3>)
- #[prost(oneof = "window_frame::EndBound", tags = "3")]
- pub end_bound: ::core::option::Option<window_frame::EndBound>,
-}
-/// Nested message and enum types in `WindowFrame`.
-pub mod window_frame {
- /// "optional" keyword is stable in protoc 3.15 but prost is still on 3.14 (see <https://github.com/tokio-rs/prost/issues/430> and <https://github.com/tokio-rs/prost/pull/455>)
- /// this syntax is ugly but is binary compatible with the "optional" keyword (see <https://stackoverflow.com/questions/42622015/how-to-define-an-optional-field-in-protobuf-3>)
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum EndBound {
- #[prost(message, tag = "3")]
- Bound(super::WindowFrameBound),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct WindowFrameBound {
- #[prost(enumeration = "WindowFrameBoundType", tag = "1")]
- pub window_frame_bound_type: i32,
- #[prost(message, optional, tag = "2")]
- pub bound_value: ::core::option::Option<ScalarValue>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Schema {
- #[prost(message, repeated, tag = "1")]
- pub columns: ::prost::alloc::vec::Vec<Field>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Field {
- /// name of the field
- #[prost(string, tag = "1")]
- pub name: ::prost::alloc::string::String,
- #[prost(message, optional, boxed, tag = "2")]
- pub arrow_type: ::core::option::Option<::prost::alloc::boxed::Box<ArrowType>>,
- #[prost(bool, tag = "3")]
- pub nullable: bool,
- /// for complex data types like structs, unions
- #[prost(message, repeated, tag = "4")]
- pub children: ::prost::alloc::vec::Vec<Field>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct FixedSizeBinary {
- #[prost(int32, tag = "1")]
- pub length: i32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Timestamp {
- #[prost(enumeration = "TimeUnit", tag = "1")]
- pub time_unit: i32,
- #[prost(string, tag = "2")]
- pub timezone: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Decimal {
- #[prost(uint32, tag = "3")]
- pub precision: u32,
- #[prost(int32, tag = "4")]
- pub scale: i32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct List {
- #[prost(message, optional, boxed, tag = "1")]
- pub field_type: ::core::option::Option<::prost::alloc::boxed::Box<Field>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct FixedSizeList {
- #[prost(message, optional, boxed, tag = "1")]
- pub field_type: ::core::option::Option<::prost::alloc::boxed::Box<Field>>,
- #[prost(int32, tag = "2")]
- pub list_size: i32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Dictionary {
- #[prost(message, optional, boxed, tag = "1")]
- pub key: ::core::option::Option<::prost::alloc::boxed::Box<ArrowType>>,
- #[prost(message, optional, boxed, tag = "2")]
- pub value: ::core::option::Option<::prost::alloc::boxed::Box<ArrowType>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Struct {
- #[prost(message, repeated, tag = "1")]
- pub sub_field_types: ::prost::alloc::vec::Vec<Field>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Map {
- #[prost(message, optional, boxed, tag = "1")]
- pub field_type: ::core::option::Option<::prost::alloc::boxed::Box<Field>>,
- #[prost(bool, tag = "2")]
- pub keys_sorted: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Union {
- #[prost(message, repeated, tag = "1")]
- pub union_types: ::prost::alloc::vec::Vec<Field>,
- #[prost(enumeration = "UnionMode", tag = "2")]
- pub union_mode: i32,
- #[prost(int32, repeated, tag = "3")]
- pub type_ids: ::prost::alloc::vec::Vec<i32>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarListValue {
- /// encode null explicitly to distinguish a list with a null value
- /// from a list with no values)
- #[prost(bool, tag = "3")]
- pub is_null: bool,
- #[prost(message, optional, tag = "1")]
- pub field: ::core::option::Option<Field>,
- #[prost(message, repeated, tag = "2")]
- pub values: ::prost::alloc::vec::Vec<ScalarValue>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarTime32Value {
- #[prost(oneof = "scalar_time32_value::Value", tags = "1, 2")]
- pub value: ::core::option::Option<scalar_time32_value::Value>,
-}
-/// Nested message and enum types in `ScalarTime32Value`.
-pub mod scalar_time32_value {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum Value {
- #[prost(int32, tag = "1")]
- Time32SecondValue(i32),
- #[prost(int32, tag = "2")]
- Time32MillisecondValue(i32),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarTime64Value {
- #[prost(oneof = "scalar_time64_value::Value", tags = "1, 2")]
- pub value: ::core::option::Option<scalar_time64_value::Value>,
-}
-/// Nested message and enum types in `ScalarTime64Value`.
-pub mod scalar_time64_value {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum Value {
- #[prost(int64, tag = "1")]
- Time64MicrosecondValue(i64),
- #[prost(int64, tag = "2")]
- Time64NanosecondValue(i64),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarTimestampValue {
- #[prost(string, tag = "5")]
- pub timezone: ::prost::alloc::string::String,
- #[prost(oneof = "scalar_timestamp_value::Value", tags = "1, 2, 3, 4")]
- pub value: ::core::option::Option<scalar_timestamp_value::Value>,
-}
-/// Nested message and enum types in `ScalarTimestampValue`.
-pub mod scalar_timestamp_value {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum Value {
- #[prost(int64, tag = "1")]
- TimeMicrosecondValue(i64),
- #[prost(int64, tag = "2")]
- TimeNanosecondValue(i64),
- #[prost(int64, tag = "3")]
- TimeSecondValue(i64),
- #[prost(int64, tag = "4")]
- TimeMillisecondValue(i64),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarDictionaryValue {
- #[prost(message, optional, tag = "1")]
- pub index_type: ::core::option::Option<ArrowType>,
- #[prost(message, optional, boxed, tag = "2")]
- pub value: ::core::option::Option<::prost::alloc::boxed::Box<ScalarValue>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct IntervalMonthDayNanoValue {
- #[prost(int32, tag = "1")]
- pub months: i32,
- #[prost(int32, tag = "2")]
- pub days: i32,
- #[prost(int64, tag = "3")]
- pub nanos: i64,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct StructValue {
- /// Note that a null struct value must have one or more fields, so we
- /// encode a null StructValue as one witth an empty field_values
- /// list.
- #[prost(message, repeated, tag = "2")]
- pub field_values: ::prost::alloc::vec::Vec<ScalarValue>,
- #[prost(message, repeated, tag = "3")]
- pub fields: ::prost::alloc::vec::Vec<Field>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarFixedSizeBinary {
- #[prost(bytes = "vec", tag = "1")]
- pub values: ::prost::alloc::vec::Vec<u8>,
- #[prost(int32, tag = "2")]
- pub length: i32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScalarValue {
- #[prost(
- oneof = "scalar_value::Value",
- tags = "33, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34"
- )]
- pub value: ::core::option::Option<scalar_value::Value>,
-}
-/// Nested message and enum types in `ScalarValue`.
-pub mod scalar_value {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum Value {
- /// was PrimitiveScalarType null_value = 19;
- /// Null value of any type
- #[prost(message, tag = "33")]
- NullValue(super::ArrowType),
- #[prost(bool, tag = "1")]
- BoolValue(bool),
- #[prost(string, tag = "2")]
- Utf8Value(::prost::alloc::string::String),
- #[prost(string, tag = "3")]
- LargeUtf8Value(::prost::alloc::string::String),
- #[prost(int32, tag = "4")]
- Int8Value(i32),
- #[prost(int32, tag = "5")]
- Int16Value(i32),
- #[prost(int32, tag = "6")]
- Int32Value(i32),
- #[prost(int64, tag = "7")]
- Int64Value(i64),
- #[prost(uint32, tag = "8")]
- Uint8Value(u32),
- #[prost(uint32, tag = "9")]
- Uint16Value(u32),
- #[prost(uint32, tag = "10")]
- Uint32Value(u32),
- #[prost(uint64, tag = "11")]
- Uint64Value(u64),
- #[prost(float, tag = "12")]
- Float32Value(f32),
- #[prost(double, tag = "13")]
- Float64Value(f64),
- /// Literal Date32 value always has a unit of day
- #[prost(int32, tag = "14")]
- Date32Value(i32),
- #[prost(message, tag = "15")]
- Time32Value(super::ScalarTime32Value),
- /// WAS: ScalarType null_list_value = 18;
- #[prost(message, tag = "17")]
- ListValue(super::ScalarListValue),
- #[prost(message, tag = "20")]
- Decimal128Value(super::Decimal128),
- #[prost(int64, tag = "21")]
- Date64Value(i64),
- #[prost(int32, tag = "24")]
- IntervalYearmonthValue(i32),
- #[prost(int64, tag = "25")]
- IntervalDaytimeValue(i64),
- #[prost(message, tag = "26")]
- TimestampValue(super::ScalarTimestampValue),
- #[prost(message, tag = "27")]
- DictionaryValue(::prost::alloc::boxed::Box<super::ScalarDictionaryValue>),
- #[prost(bytes, tag = "28")]
- BinaryValue(::prost::alloc::vec::Vec<u8>),
- #[prost(bytes, tag = "29")]
- LargeBinaryValue(::prost::alloc::vec::Vec<u8>),
- #[prost(message, tag = "30")]
- Time64Value(super::ScalarTime64Value),
- #[prost(message, tag = "31")]
- IntervalMonthDayNano(super::IntervalMonthDayNanoValue),
- #[prost(message, tag = "32")]
- StructValue(super::StructValue),
- #[prost(message, tag = "34")]
- FixedSizeBinaryValue(super::ScalarFixedSizeBinary),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Decimal128 {
- #[prost(bytes = "vec", tag = "1")]
- pub value: ::prost::alloc::vec::Vec<u8>,
- #[prost(int64, tag = "2")]
- pub p: i64,
- #[prost(int64, tag = "3")]
- pub s: i64,
-}
-/// Serialized data type
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ArrowType {
- #[prost(
- oneof = "arrow_type::ArrowTypeEnum",
- tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 32, 15, 16, 31, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 33"
- )]
- pub arrow_type_enum: ::core::option::Option<arrow_type::ArrowTypeEnum>,
-}
-/// Nested message and enum types in `ArrowType`.
-pub mod arrow_type {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum ArrowTypeEnum {
- /// arrow::Type::NA
- #[prost(message, tag = "1")]
- None(super::EmptyMessage),
- /// arrow::Type::BOOL
- #[prost(message, tag = "2")]
- Bool(super::EmptyMessage),
- /// arrow::Type::UINT8
- #[prost(message, tag = "3")]
- Uint8(super::EmptyMessage),
- /// arrow::Type::INT8
- #[prost(message, tag = "4")]
- Int8(super::EmptyMessage),
- /// represents arrow::Type fields in src/arrow/type.h
- #[prost(message, tag = "5")]
- Uint16(super::EmptyMessage),
- #[prost(message, tag = "6")]
- Int16(super::EmptyMessage),
- #[prost(message, tag = "7")]
- Uint32(super::EmptyMessage),
- #[prost(message, tag = "8")]
- Int32(super::EmptyMessage),
- #[prost(message, tag = "9")]
- Uint64(super::EmptyMessage),
- #[prost(message, tag = "10")]
- Int64(super::EmptyMessage),
- #[prost(message, tag = "11")]
- Float16(super::EmptyMessage),
- #[prost(message, tag = "12")]
- Float32(super::EmptyMessage),
- #[prost(message, tag = "13")]
- Float64(super::EmptyMessage),
- #[prost(message, tag = "14")]
- Utf8(super::EmptyMessage),
- #[prost(message, tag = "32")]
- LargeUtf8(super::EmptyMessage),
- #[prost(message, tag = "15")]
- Binary(super::EmptyMessage),
- #[prost(int32, tag = "16")]
- FixedSizeBinary(i32),
- #[prost(message, tag = "31")]
- LargeBinary(super::EmptyMessage),
- #[prost(message, tag = "17")]
- Date32(super::EmptyMessage),
- #[prost(message, tag = "18")]
- Date64(super::EmptyMessage),
- #[prost(enumeration = "super::TimeUnit", tag = "19")]
- Duration(i32),
- #[prost(message, tag = "20")]
- Timestamp(super::Timestamp),
- #[prost(enumeration = "super::TimeUnit", tag = "21")]
- Time32(i32),
- #[prost(enumeration = "super::TimeUnit", tag = "22")]
- Time64(i32),
- #[prost(enumeration = "super::IntervalUnit", tag = "23")]
- Interval(i32),
- #[prost(message, tag = "24")]
- Decimal(super::Decimal),
- #[prost(message, tag = "25")]
- List(::prost::alloc::boxed::Box<super::List>),
- #[prost(message, tag = "26")]
- LargeList(::prost::alloc::boxed::Box<super::List>),
- #[prost(message, tag = "27")]
- FixedSizeList(::prost::alloc::boxed::Box<super::FixedSizeList>),
- #[prost(message, tag = "28")]
- Struct(super::Struct),
- #[prost(message, tag = "29")]
- Union(super::Union),
- #[prost(message, tag = "30")]
- Dictionary(::prost::alloc::boxed::Box<super::Dictionary>),
- #[prost(message, tag = "33")]
- Map(::prost::alloc::boxed::Box<super::Map>),
- }
-}
-/// Useful for representing an empty enum variant in rust
-/// E.G. enum example{One, Two(i32)}
-/// maps to
-/// message example{
-/// oneof{
-/// EmptyMessage One = 1;
-/// i32 Two = 2;
-/// }
-/// }
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct EmptyMessage {}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AnalyzedLogicalPlanType {
- #[prost(string, tag = "1")]
- pub analyzer_name: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct OptimizedLogicalPlanType {
- #[prost(string, tag = "1")]
- pub optimizer_name: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct OptimizedPhysicalPlanType {
- #[prost(string, tag = "1")]
- pub optimizer_name: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PlanType {
- #[prost(oneof = "plan_type::PlanTypeEnum", tags = "1, 7, 8, 2, 3, 4, 5, 6")]
- pub plan_type_enum: ::core::option::Option<plan_type::PlanTypeEnum>,
-}
-/// Nested message and enum types in `PlanType`.
-pub mod plan_type {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum PlanTypeEnum {
- #[prost(message, tag = "1")]
- InitialLogicalPlan(super::EmptyMessage),
- #[prost(message, tag = "7")]
- AnalyzedLogicalPlan(super::AnalyzedLogicalPlanType),
- #[prost(message, tag = "8")]
- FinalAnalyzedLogicalPlan(super::EmptyMessage),
- #[prost(message, tag = "2")]
- OptimizedLogicalPlan(super::OptimizedLogicalPlanType),
- #[prost(message, tag = "3")]
- FinalLogicalPlan(super::EmptyMessage),
- #[prost(message, tag = "4")]
- InitialPhysicalPlan(super::EmptyMessage),
- #[prost(message, tag = "5")]
- OptimizedPhysicalPlan(super::OptimizedPhysicalPlanType),
- #[prost(message, tag = "6")]
- FinalPhysicalPlan(super::EmptyMessage),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct StringifiedPlan {
- #[prost(message, optional, tag = "1")]
- pub plan_type: ::core::option::Option<PlanType>,
- #[prost(string, tag = "2")]
- pub plan: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct BareTableReference {
- #[prost(string, tag = "1")]
- pub table: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PartialTableReference {
- #[prost(string, tag = "1")]
- pub schema: ::prost::alloc::string::String,
- #[prost(string, tag = "2")]
- pub table: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct FullTableReference {
- #[prost(string, tag = "1")]
- pub catalog: ::prost::alloc::string::String,
- #[prost(string, tag = "2")]
- pub schema: ::prost::alloc::string::String,
- #[prost(string, tag = "3")]
- pub table: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct OwnedTableReference {
- #[prost(oneof = "owned_table_reference::TableReferenceEnum", tags = "1, 2, 3")]
- pub table_reference_enum: ::core::option::Option<
- owned_table_reference::TableReferenceEnum,
- >,
-}
-/// Nested message and enum types in `OwnedTableReference`.
-pub mod owned_table_reference {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum TableReferenceEnum {
- #[prost(message, tag = "1")]
- Bare(super::BareTableReference),
- #[prost(message, tag = "2")]
- Partial(super::PartialTableReference),
- #[prost(message, tag = "3")]
- Full(super::FullTableReference),
- }
-}
-/// PhysicalPlanNode is a nested type
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalPlanNode {
- #[prost(
- oneof = "physical_plan_node::PhysicalPlanType",
- tags = "1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21"
- )]
- pub physical_plan_type: ::core::option::Option<physical_plan_node::PhysicalPlanType>,
-}
-/// Nested message and enum types in `PhysicalPlanNode`.
-pub mod physical_plan_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum PhysicalPlanType {
- #[prost(message, tag = "1")]
- ParquetScan(super::ParquetScanExecNode),
- #[prost(message, tag = "2")]
- CsvScan(super::CsvScanExecNode),
- #[prost(message, tag = "3")]
- Empty(super::EmptyExecNode),
- #[prost(message, tag = "4")]
- Projection(::prost::alloc::boxed::Box<super::ProjectionExecNode>),
- #[prost(message, tag = "6")]
- GlobalLimit(::prost::alloc::boxed::Box<super::GlobalLimitExecNode>),
- #[prost(message, tag = "7")]
- LocalLimit(::prost::alloc::boxed::Box<super::LocalLimitExecNode>),
- #[prost(message, tag = "8")]
- Aggregate(::prost::alloc::boxed::Box<super::AggregateExecNode>),
- #[prost(message, tag = "9")]
- HashJoin(::prost::alloc::boxed::Box<super::HashJoinExecNode>),
- #[prost(message, tag = "10")]
- Sort(::prost::alloc::boxed::Box<super::SortExecNode>),
- #[prost(message, tag = "11")]
- CoalesceBatches(::prost::alloc::boxed::Box<super::CoalesceBatchesExecNode>),
- #[prost(message, tag = "12")]
- Filter(::prost::alloc::boxed::Box<super::FilterExecNode>),
- #[prost(message, tag = "13")]
- Merge(::prost::alloc::boxed::Box<super::CoalescePartitionsExecNode>),
- #[prost(message, tag = "14")]
- Repartition(::prost::alloc::boxed::Box<super::RepartitionExecNode>),
- #[prost(message, tag = "15")]
- Window(::prost::alloc::boxed::Box<super::WindowAggExecNode>),
- #[prost(message, tag = "16")]
- CrossJoin(::prost::alloc::boxed::Box<super::CrossJoinExecNode>),
- #[prost(message, tag = "17")]
- AvroScan(super::AvroScanExecNode),
- #[prost(message, tag = "18")]
- Extension(super::PhysicalExtensionNode),
- #[prost(message, tag = "19")]
- Union(super::UnionExecNode),
- #[prost(message, tag = "20")]
- Explain(super::ExplainExecNode),
- #[prost(message, tag = "21")]
- SortPreservingMerge(
- ::prost::alloc::boxed::Box<super::SortPreservingMergeExecNode>,
- ),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalExtensionNode {
- #[prost(bytes = "vec", tag = "1")]
- pub node: ::prost::alloc::vec::Vec<u8>,
- #[prost(message, repeated, tag = "2")]
- pub inputs: ::prost::alloc::vec::Vec<PhysicalPlanNode>,
-}
-/// physical expressions
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalExprNode {
- #[prost(
- oneof = "physical_expr_node::ExprType",
- tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19"
- )]
- pub expr_type: ::core::option::Option<physical_expr_node::ExprType>,
-}
-/// Nested message and enum types in `PhysicalExprNode`.
-pub mod physical_expr_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum ExprType {
- /// column references
- #[prost(message, tag = "1")]
- Column(super::PhysicalColumn),
- #[prost(message, tag = "2")]
- Literal(super::ScalarValue),
- /// binary expressions
- #[prost(message, tag = "3")]
- BinaryExpr(::prost::alloc::boxed::Box<super::PhysicalBinaryExprNode>),
- /// aggregate expressions
- #[prost(message, tag = "4")]
- AggregateExpr(super::PhysicalAggregateExprNode),
- /// null checks
- #[prost(message, tag = "5")]
- IsNullExpr(::prost::alloc::boxed::Box<super::PhysicalIsNull>),
- #[prost(message, tag = "6")]
- IsNotNullExpr(::prost::alloc::boxed::Box<super::PhysicalIsNotNull>),
- #[prost(message, tag = "7")]
- NotExpr(::prost::alloc::boxed::Box<super::PhysicalNot>),
- #[prost(message, tag = "8")]
- Case(::prost::alloc::boxed::Box<super::PhysicalCaseNode>),
- #[prost(message, tag = "9")]
- Cast(::prost::alloc::boxed::Box<super::PhysicalCastNode>),
- #[prost(message, tag = "10")]
- Sort(::prost::alloc::boxed::Box<super::PhysicalSortExprNode>),
- #[prost(message, tag = "11")]
- Negative(::prost::alloc::boxed::Box<super::PhysicalNegativeNode>),
- #[prost(message, tag = "12")]
- InList(::prost::alloc::boxed::Box<super::PhysicalInListNode>),
- #[prost(message, tag = "13")]
- ScalarFunction(super::PhysicalScalarFunctionNode),
- #[prost(message, tag = "14")]
- TryCast(::prost::alloc::boxed::Box<super::PhysicalTryCastNode>),
- /// window expressions
- #[prost(message, tag = "15")]
- WindowExpr(::prost::alloc::boxed::Box<super::PhysicalWindowExprNode>),
- #[prost(message, tag = "16")]
- ScalarUdf(super::PhysicalScalarUdfNode),
- #[prost(message, tag = "17")]
- DateTimeIntervalExpr(
- ::prost::alloc::boxed::Box<super::PhysicalDateTimeIntervalExprNode>,
- ),
- #[prost(message, tag = "18")]
- LikeExpr(::prost::alloc::boxed::Box<super::PhysicalLikeExprNode>),
- #[prost(message, tag = "19")]
- GetIndexedFieldExpr(
- ::prost::alloc::boxed::Box<super::PhysicalGetIndexedFieldExprNode>,
- ),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalScalarUdfNode {
- #[prost(string, tag = "1")]
- pub name: ::prost::alloc::string::String,
- #[prost(message, repeated, tag = "2")]
- pub args: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(message, optional, tag = "4")]
- pub return_type: ::core::option::Option<ArrowType>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalAggregateExprNode {
- #[prost(message, repeated, tag = "2")]
- pub expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(message, repeated, tag = "5")]
- pub ordering_req: ::prost::alloc::vec::Vec<PhysicalSortExprNode>,
- #[prost(bool, tag = "3")]
- pub distinct: bool,
- #[prost(oneof = "physical_aggregate_expr_node::AggregateFunction", tags = "1, 4")]
- pub aggregate_function: ::core::option::Option<
- physical_aggregate_expr_node::AggregateFunction,
- >,
-}
-/// Nested message and enum types in `PhysicalAggregateExprNode`.
-pub mod physical_aggregate_expr_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum AggregateFunction {
- #[prost(enumeration = "super::AggregateFunction", tag = "1")]
- AggrFunction(i32),
- #[prost(string, tag = "4")]
- UserDefinedAggrFunction(::prost::alloc::string::String),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalWindowExprNode {
- #[prost(message, optional, boxed, tag = "4")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(oneof = "physical_window_expr_node::WindowFunction", tags = "1, 2")]
- pub window_function: ::core::option::Option<
- physical_window_expr_node::WindowFunction,
- >,
-}
-/// Nested message and enum types in `PhysicalWindowExprNode`.
-pub mod physical_window_expr_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum WindowFunction {
- #[prost(enumeration = "super::AggregateFunction", tag = "1")]
- AggrFunction(i32),
- /// udaf = 3
- #[prost(enumeration = "super::BuiltInWindowFunction", tag = "2")]
- BuiltInFunction(i32),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalIsNull {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalIsNotNull {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalNot {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalAliasNode {
- #[prost(message, optional, tag = "1")]
- pub expr: ::core::option::Option<PhysicalExprNode>,
- #[prost(string, tag = "2")]
- pub alias: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalBinaryExprNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub l: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(message, optional, boxed, tag = "2")]
- pub r: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(string, tag = "3")]
- pub op: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalDateTimeIntervalExprNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub l: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(message, optional, boxed, tag = "2")]
- pub r: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(string, tag = "3")]
- pub op: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalLikeExprNode {
- #[prost(bool, tag = "1")]
- pub negated: bool,
- #[prost(bool, tag = "2")]
- pub case_insensitive: bool,
- #[prost(message, optional, boxed, tag = "3")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(message, optional, boxed, tag = "4")]
- pub pattern: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalSortExprNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(bool, tag = "2")]
- pub asc: bool,
- #[prost(bool, tag = "3")]
- pub nulls_first: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalWhenThen {
- #[prost(message, optional, tag = "1")]
- pub when_expr: ::core::option::Option<PhysicalExprNode>,
- #[prost(message, optional, tag = "2")]
- pub then_expr: ::core::option::Option<PhysicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalInListNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(message, repeated, tag = "2")]
- pub list: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(bool, tag = "3")]
- pub negated: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalCaseNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(message, repeated, tag = "2")]
- pub when_then_expr: ::prost::alloc::vec::Vec<PhysicalWhenThen>,
- #[prost(message, optional, boxed, tag = "3")]
- pub else_expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalScalarFunctionNode {
- #[prost(string, tag = "1")]
- pub name: ::prost::alloc::string::String,
- #[prost(enumeration = "ScalarFunction", tag = "2")]
- pub fun: i32,
- #[prost(message, repeated, tag = "3")]
- pub args: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(message, optional, tag = "4")]
- pub return_type: ::core::option::Option<ArrowType>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalTryCastNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(message, optional, tag = "2")]
- pub arrow_type: ::core::option::Option<ArrowType>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalCastNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(message, optional, tag = "2")]
- pub arrow_type: ::core::option::Option<ArrowType>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalNegativeNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub expr: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct FilterExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(message, optional, tag = "2")]
- pub expr: ::core::option::Option<PhysicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct FileGroup {
- #[prost(message, repeated, tag = "1")]
- pub files: ::prost::alloc::vec::Vec<PartitionedFile>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ScanLimit {
- /// wrap into a message to make it optional
- #[prost(uint32, tag = "1")]
- pub limit: u32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalSortExprNodeCollection {
- #[prost(message, repeated, tag = "1")]
- pub physical_sort_expr_nodes: ::prost::alloc::vec::Vec<PhysicalSortExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct FileScanExecConf {
- #[prost(message, repeated, tag = "1")]
- pub file_groups: ::prost::alloc::vec::Vec<FileGroup>,
- #[prost(message, optional, tag = "2")]
- pub schema: ::core::option::Option<Schema>,
- #[prost(uint32, repeated, tag = "4")]
- pub projection: ::prost::alloc::vec::Vec<u32>,
- #[prost(message, optional, tag = "5")]
- pub limit: ::core::option::Option<ScanLimit>,
- #[prost(message, optional, tag = "6")]
- pub statistics: ::core::option::Option<Statistics>,
- #[prost(string, repeated, tag = "7")]
- pub table_partition_cols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
- #[prost(string, tag = "8")]
- pub object_store_url: ::prost::alloc::string::String,
- #[prost(message, repeated, tag = "9")]
- pub output_ordering: ::prost::alloc::vec::Vec<PhysicalSortExprNodeCollection>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ParquetScanExecNode {
- #[prost(message, optional, tag = "1")]
- pub base_conf: ::core::option::Option<FileScanExecConf>,
- #[prost(message, optional, tag = "3")]
- pub predicate: ::core::option::Option<PhysicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CsvScanExecNode {
- #[prost(message, optional, tag = "1")]
- pub base_conf: ::core::option::Option<FileScanExecConf>,
- #[prost(bool, tag = "2")]
- pub has_header: bool,
- #[prost(string, tag = "3")]
- pub delimiter: ::prost::alloc::string::String,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AvroScanExecNode {
- #[prost(message, optional, tag = "1")]
- pub base_conf: ::core::option::Option<FileScanExecConf>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct HashJoinExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub left: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(message, optional, boxed, tag = "2")]
- pub right: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(message, repeated, tag = "3")]
- pub on: ::prost::alloc::vec::Vec<JoinOn>,
- #[prost(enumeration = "JoinType", tag = "4")]
- pub join_type: i32,
- #[prost(enumeration = "PartitionMode", tag = "6")]
- pub partition_mode: i32,
- #[prost(bool, tag = "7")]
- pub null_equals_null: bool,
- #[prost(message, optional, tag = "8")]
- pub filter: ::core::option::Option<JoinFilter>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct UnionExecNode {
- #[prost(message, repeated, tag = "1")]
- pub inputs: ::prost::alloc::vec::Vec<PhysicalPlanNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ExplainExecNode {
- #[prost(message, optional, tag = "1")]
- pub schema: ::core::option::Option<Schema>,
- #[prost(message, repeated, tag = "2")]
- pub stringified_plans: ::prost::alloc::vec::Vec<StringifiedPlan>,
- #[prost(bool, tag = "3")]
- pub verbose: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CrossJoinExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub left: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(message, optional, boxed, tag = "2")]
- pub right: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalColumn {
- #[prost(string, tag = "1")]
- pub name: ::prost::alloc::string::String,
- #[prost(uint32, tag = "2")]
- pub index: u32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct JoinOn {
- #[prost(message, optional, tag = "1")]
- pub left: ::core::option::Option<PhysicalColumn>,
- #[prost(message, optional, tag = "2")]
- pub right: ::core::option::Option<PhysicalColumn>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct EmptyExecNode {
- #[prost(bool, tag = "1")]
- pub produce_one_row: bool,
- #[prost(message, optional, tag = "2")]
- pub schema: ::core::option::Option<Schema>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ProjectionExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(message, repeated, tag = "2")]
- pub expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(string, repeated, tag = "3")]
- pub expr_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct WindowAggExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(message, repeated, tag = "2")]
- pub window_expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(string, repeated, tag = "3")]
- pub window_expr_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
- #[prost(message, optional, tag = "4")]
- pub input_schema: ::core::option::Option<Schema>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct MaybeFilter {
- #[prost(message, optional, tag = "1")]
- pub expr: ::core::option::Option<PhysicalExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct MaybePhysicalSortExprs {
- #[prost(message, repeated, tag = "1")]
- pub sort_expr: ::prost::alloc::vec::Vec<PhysicalSortExprNode>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct AggregateExecNode {
- #[prost(message, repeated, tag = "1")]
- pub group_expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(message, repeated, tag = "2")]
- pub aggr_expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(enumeration = "AggregateMode", tag = "3")]
- pub mode: i32,
- #[prost(message, optional, boxed, tag = "4")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(string, repeated, tag = "5")]
- pub group_expr_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
- #[prost(string, repeated, tag = "6")]
- pub aggr_expr_name: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
- /// we need the input schema to the partial aggregate to pass to the final aggregate
- #[prost(message, optional, tag = "7")]
- pub input_schema: ::core::option::Option<Schema>,
- #[prost(message, repeated, tag = "8")]
- pub null_expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(bool, repeated, tag = "9")]
- pub groups: ::prost::alloc::vec::Vec<bool>,
- #[prost(message, repeated, tag = "10")]
- pub filter_expr: ::prost::alloc::vec::Vec<MaybeFilter>,
- #[prost(message, repeated, tag = "11")]
- pub order_by_expr: ::prost::alloc::vec::Vec<MaybePhysicalSortExprs>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct GlobalLimitExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- /// The number of rows to skip before fetch
- #[prost(uint32, tag = "2")]
- pub skip: u32,
- /// Maximum number of rows to fetch; negative means no limit
- #[prost(int64, tag = "3")]
- pub fetch: i64,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct LocalLimitExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(uint32, tag = "2")]
- pub fetch: u32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct SortExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(message, repeated, tag = "2")]
- pub expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- /// Maximum number of highest/lowest rows to fetch; negative means no limit
- #[prost(int64, tag = "3")]
- pub fetch: i64,
- #[prost(bool, tag = "4")]
- pub preserve_partitioning: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct SortPreservingMergeExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(message, repeated, tag = "2")]
- pub expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- /// Maximum number of highest/lowest rows to fetch; negative means no limit
- #[prost(int64, tag = "3")]
- pub fetch: i64,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CoalesceBatchesExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(uint32, tag = "2")]
- pub target_batch_size: u32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct CoalescePartitionsExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalHashRepartition {
- #[prost(message, repeated, tag = "1")]
- pub hash_expr: ::prost::alloc::vec::Vec<PhysicalExprNode>,
- #[prost(uint64, tag = "2")]
- pub partition_count: u64,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct RepartitionExecNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub input: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalPlanNode>>,
- #[prost(oneof = "repartition_exec_node::PartitionMethod", tags = "2, 3, 4")]
- pub partition_method: ::core::option::Option<repartition_exec_node::PartitionMethod>,
-}
-/// Nested message and enum types in `RepartitionExecNode`.
-pub mod repartition_exec_node {
- #[allow(clippy::derive_partial_eq_without_eq)]
- #[derive(Clone, PartialEq, ::prost::Oneof)]
- pub enum PartitionMethod {
- #[prost(uint64, tag = "2")]
- RoundRobin(u64),
- #[prost(message, tag = "3")]
- Hash(super::PhysicalHashRepartition),
- #[prost(uint64, tag = "4")]
- Unknown(u64),
- }
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct JoinFilter {
- #[prost(message, optional, tag = "1")]
- pub expression: ::core::option::Option<PhysicalExprNode>,
- #[prost(message, repeated, tag = "2")]
- pub column_indices: ::prost::alloc::vec::Vec<ColumnIndex>,
- #[prost(message, optional, tag = "3")]
- pub schema: ::core::option::Option<Schema>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ColumnIndex {
- #[prost(uint32, tag = "1")]
- pub index: u32,
- #[prost(enumeration = "JoinSide", tag = "2")]
- pub side: i32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PartitionedFile {
- #[prost(string, tag = "1")]
- pub path: ::prost::alloc::string::String,
- #[prost(uint64, tag = "2")]
- pub size: u64,
- #[prost(uint64, tag = "3")]
- pub last_modified_ns: u64,
- #[prost(message, repeated, tag = "4")]
- pub partition_values: ::prost::alloc::vec::Vec<ScalarValue>,
- #[prost(message, optional, tag = "5")]
- pub range: ::core::option::Option<FileRange>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct FileRange {
- #[prost(int64, tag = "1")]
- pub start: i64,
- #[prost(int64, tag = "2")]
- pub end: i64,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PartitionStats {
- #[prost(int64, tag = "1")]
- pub num_rows: i64,
- #[prost(int64, tag = "2")]
- pub num_batches: i64,
- #[prost(int64, tag = "3")]
- pub num_bytes: i64,
- #[prost(message, repeated, tag = "4")]
- pub column_stats: ::prost::alloc::vec::Vec<ColumnStats>,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct Statistics {
- #[prost(int64, tag = "1")]
- pub num_rows: i64,
- #[prost(int64, tag = "2")]
- pub total_byte_size: i64,
- #[prost(message, repeated, tag = "3")]
- pub column_stats: ::prost::alloc::vec::Vec<ColumnStats>,
- #[prost(bool, tag = "4")]
- pub is_exact: bool,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct ColumnStats {
- #[prost(message, optional, tag = "1")]
- pub min_value: ::core::option::Option<ScalarValue>,
- #[prost(message, optional, tag = "2")]
- pub max_value: ::core::option::Option<ScalarValue>,
- #[prost(uint32, tag = "3")]
- pub null_count: u32,
- #[prost(uint32, tag = "4")]
- pub distinct_count: u32,
-}
-#[allow(clippy::derive_partial_eq_without_eq)]
-#[derive(Clone, PartialEq, ::prost::Message)]
-pub struct PhysicalGetIndexedFieldExprNode {
- #[prost(message, optional, boxed, tag = "1")]
- pub arg: ::core::option::Option<::prost::alloc::boxed::Box<PhysicalExprNode>>,
- #[prost(message, optional, tag = "2")]
- pub key: ::core::option::Option<ScalarValue>,
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum JoinType {
- Inner = 0,
- Left = 1,
- Right = 2,
- Full = 3,
- Leftsemi = 4,
- Leftanti = 5,
- Rightsemi = 6,
- Rightanti = 7,
-}
-impl JoinType {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- JoinType::Inner => "INNER",
- JoinType::Left => "LEFT",
- JoinType::Right => "RIGHT",
- JoinType::Full => "FULL",
- JoinType::Leftsemi => "LEFTSEMI",
- JoinType::Leftanti => "LEFTANTI",
- JoinType::Rightsemi => "RIGHTSEMI",
- JoinType::Rightanti => "RIGHTANTI",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "INNER" => Some(Self::Inner),
- "LEFT" => Some(Self::Left),
- "RIGHT" => Some(Self::Right),
- "FULL" => Some(Self::Full),
- "LEFTSEMI" => Some(Self::Leftsemi),
- "LEFTANTI" => Some(Self::Leftanti),
- "RIGHTSEMI" => Some(Self::Rightsemi),
- "RIGHTANTI" => Some(Self::Rightanti),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum JoinConstraint {
- On = 0,
- Using = 1,
-}
-impl JoinConstraint {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- JoinConstraint::On => "ON",
- JoinConstraint::Using => "USING",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "ON" => Some(Self::On),
- "USING" => Some(Self::Using),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum ScalarFunction {
- Abs = 0,
- Acos = 1,
- Asin = 2,
- Atan = 3,
- Ascii = 4,
- Ceil = 5,
- Cos = 6,
- Digest = 7,
- Exp = 8,
- Floor = 9,
- Ln = 10,
- Log = 11,
- Log10 = 12,
- Log2 = 13,
- Round = 14,
- Signum = 15,
- Sin = 16,
- Sqrt = 17,
- Tan = 18,
- Trunc = 19,
- Array = 20,
- RegexpMatch = 21,
- BitLength = 22,
- Btrim = 23,
- CharacterLength = 24,
- Chr = 25,
- Concat = 26,
- ConcatWithSeparator = 27,
- DatePart = 28,
- DateTrunc = 29,
- InitCap = 30,
- Left = 31,
- Lpad = 32,
- Lower = 33,
- Ltrim = 34,
- Md5 = 35,
- NullIf = 36,
- OctetLength = 37,
- Random = 38,
- RegexpReplace = 39,
- Repeat = 40,
- Replace = 41,
- Reverse = 42,
- Right = 43,
- Rpad = 44,
- Rtrim = 45,
- Sha224 = 46,
- Sha256 = 47,
- Sha384 = 48,
- Sha512 = 49,
- SplitPart = 50,
- StartsWith = 51,
- Strpos = 52,
- Substr = 53,
- ToHex = 54,
- ToTimestamp = 55,
- ToTimestampMillis = 56,
- ToTimestampMicros = 57,
- ToTimestampSeconds = 58,
- Now = 59,
- Translate = 60,
- Trim = 61,
- Upper = 62,
- Coalesce = 63,
- Power = 64,
- StructFun = 65,
- FromUnixtime = 66,
- Atan2 = 67,
- DateBin = 68,
- ArrowTypeof = 69,
- CurrentDate = 70,
- CurrentTime = 71,
- Uuid = 72,
- Cbrt = 73,
- Acosh = 74,
- Asinh = 75,
- Atanh = 76,
- Sinh = 77,
- Cosh = 78,
- Tanh = 79,
- Pi = 80,
- Degrees = 81,
- Radians = 82,
- Factorial = 83,
- Lcm = 84,
- Gcd = 85,
- ArrayAppend = 86,
- ArrayConcat = 87,
- ArrayDims = 88,
- ArrayFill = 89,
- ArrayLength = 90,
- ArrayNdims = 91,
- ArrayPosition = 92,
- ArrayPositions = 93,
- ArrayPrepend = 94,
- ArrayRemove = 95,
- ArrayReplace = 96,
- ArrayToString = 97,
- Cardinality = 98,
- TrimArray = 99,
- ArrayContains = 100,
-}
-impl ScalarFunction {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- ScalarFunction::Abs => "Abs",
- ScalarFunction::Acos => "Acos",
- ScalarFunction::Asin => "Asin",
- ScalarFunction::Atan => "Atan",
- ScalarFunction::Ascii => "Ascii",
- ScalarFunction::Ceil => "Ceil",
- ScalarFunction::Cos => "Cos",
- ScalarFunction::Digest => "Digest",
- ScalarFunction::Exp => "Exp",
- ScalarFunction::Floor => "Floor",
- ScalarFunction::Ln => "Ln",
- ScalarFunction::Log => "Log",
- ScalarFunction::Log10 => "Log10",
- ScalarFunction::Log2 => "Log2",
- ScalarFunction::Round => "Round",
- ScalarFunction::Signum => "Signum",
- ScalarFunction::Sin => "Sin",
- ScalarFunction::Sqrt => "Sqrt",
- ScalarFunction::Tan => "Tan",
- ScalarFunction::Trunc => "Trunc",
- ScalarFunction::Array => "Array",
- ScalarFunction::RegexpMatch => "RegexpMatch",
- ScalarFunction::BitLength => "BitLength",
- ScalarFunction::Btrim => "Btrim",
- ScalarFunction::CharacterLength => "CharacterLength",
- ScalarFunction::Chr => "Chr",
- ScalarFunction::Concat => "Concat",
- ScalarFunction::ConcatWithSeparator => "ConcatWithSeparator",
- ScalarFunction::DatePart => "DatePart",
- ScalarFunction::DateTrunc => "DateTrunc",
- ScalarFunction::InitCap => "InitCap",
- ScalarFunction::Left => "Left",
- ScalarFunction::Lpad => "Lpad",
- ScalarFunction::Lower => "Lower",
- ScalarFunction::Ltrim => "Ltrim",
- ScalarFunction::Md5 => "MD5",
- ScalarFunction::NullIf => "NullIf",
- ScalarFunction::OctetLength => "OctetLength",
- ScalarFunction::Random => "Random",
- ScalarFunction::RegexpReplace => "RegexpReplace",
- ScalarFunction::Repeat => "Repeat",
- ScalarFunction::Replace => "Replace",
- ScalarFunction::Reverse => "Reverse",
- ScalarFunction::Right => "Right",
- ScalarFunction::Rpad => "Rpad",
- ScalarFunction::Rtrim => "Rtrim",
- ScalarFunction::Sha224 => "SHA224",
- ScalarFunction::Sha256 => "SHA256",
- ScalarFunction::Sha384 => "SHA384",
- ScalarFunction::Sha512 => "SHA512",
- ScalarFunction::SplitPart => "SplitPart",
- ScalarFunction::StartsWith => "StartsWith",
- ScalarFunction::Strpos => "Strpos",
- ScalarFunction::Substr => "Substr",
- ScalarFunction::ToHex => "ToHex",
- ScalarFunction::ToTimestamp => "ToTimestamp",
- ScalarFunction::ToTimestampMillis => "ToTimestampMillis",
- ScalarFunction::ToTimestampMicros => "ToTimestampMicros",
- ScalarFunction::ToTimestampSeconds => "ToTimestampSeconds",
- ScalarFunction::Now => "Now",
- ScalarFunction::Translate => "Translate",
- ScalarFunction::Trim => "Trim",
- ScalarFunction::Upper => "Upper",
- ScalarFunction::Coalesce => "Coalesce",
- ScalarFunction::Power => "Power",
- ScalarFunction::StructFun => "StructFun",
- ScalarFunction::FromUnixtime => "FromUnixtime",
- ScalarFunction::Atan2 => "Atan2",
- ScalarFunction::DateBin => "DateBin",
- ScalarFunction::ArrowTypeof => "ArrowTypeof",
- ScalarFunction::CurrentDate => "CurrentDate",
- ScalarFunction::CurrentTime => "CurrentTime",
- ScalarFunction::Uuid => "Uuid",
- ScalarFunction::Cbrt => "Cbrt",
- ScalarFunction::Acosh => "Acosh",
- ScalarFunction::Asinh => "Asinh",
- ScalarFunction::Atanh => "Atanh",
- ScalarFunction::Sinh => "Sinh",
- ScalarFunction::Cosh => "Cosh",
- ScalarFunction::Tanh => "Tanh",
- ScalarFunction::Pi => "Pi",
- ScalarFunction::Degrees => "Degrees",
- ScalarFunction::Radians => "Radians",
- ScalarFunction::Factorial => "Factorial",
- ScalarFunction::Lcm => "Lcm",
- ScalarFunction::Gcd => "Gcd",
- ScalarFunction::ArrayAppend => "ArrayAppend",
- ScalarFunction::ArrayConcat => "ArrayConcat",
- ScalarFunction::ArrayDims => "ArrayDims",
- ScalarFunction::ArrayFill => "ArrayFill",
- ScalarFunction::ArrayLength => "ArrayLength",
- ScalarFunction::ArrayNdims => "ArrayNdims",
- ScalarFunction::ArrayPosition => "ArrayPosition",
- ScalarFunction::ArrayPositions => "ArrayPositions",
- ScalarFunction::ArrayPrepend => "ArrayPrepend",
- ScalarFunction::ArrayRemove => "ArrayRemove",
- ScalarFunction::ArrayReplace => "ArrayReplace",
- ScalarFunction::ArrayToString => "ArrayToString",
- ScalarFunction::Cardinality => "Cardinality",
- ScalarFunction::TrimArray => "TrimArray",
- ScalarFunction::ArrayContains => "ArrayContains",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "Abs" => Some(Self::Abs),
- "Acos" => Some(Self::Acos),
- "Asin" => Some(Self::Asin),
- "Atan" => Some(Self::Atan),
- "Ascii" => Some(Self::Ascii),
- "Ceil" => Some(Self::Ceil),
- "Cos" => Some(Self::Cos),
- "Digest" => Some(Self::Digest),
- "Exp" => Some(Self::Exp),
- "Floor" => Some(Self::Floor),
- "Ln" => Some(Self::Ln),
- "Log" => Some(Self::Log),
- "Log10" => Some(Self::Log10),
- "Log2" => Some(Self::Log2),
- "Round" => Some(Self::Round),
- "Signum" => Some(Self::Signum),
- "Sin" => Some(Self::Sin),
- "Sqrt" => Some(Self::Sqrt),
- "Tan" => Some(Self::Tan),
- "Trunc" => Some(Self::Trunc),
- "Array" => Some(Self::Array),
- "RegexpMatch" => Some(Self::RegexpMatch),
- "BitLength" => Some(Self::BitLength),
- "Btrim" => Some(Self::Btrim),
- "CharacterLength" => Some(Self::CharacterLength),
- "Chr" => Some(Self::Chr),
- "Concat" => Some(Self::Concat),
- "ConcatWithSeparator" => Some(Self::ConcatWithSeparator),
- "DatePart" => Some(Self::DatePart),
- "DateTrunc" => Some(Self::DateTrunc),
- "InitCap" => Some(Self::InitCap),
- "Left" => Some(Self::Left),
- "Lpad" => Some(Self::Lpad),
- "Lower" => Some(Self::Lower),
- "Ltrim" => Some(Self::Ltrim),
- "MD5" => Some(Self::Md5),
- "NullIf" => Some(Self::NullIf),
- "OctetLength" => Some(Self::OctetLength),
- "Random" => Some(Self::Random),
- "RegexpReplace" => Some(Self::RegexpReplace),
- "Repeat" => Some(Self::Repeat),
- "Replace" => Some(Self::Replace),
- "Reverse" => Some(Self::Reverse),
- "Right" => Some(Self::Right),
- "Rpad" => Some(Self::Rpad),
- "Rtrim" => Some(Self::Rtrim),
- "SHA224" => Some(Self::Sha224),
- "SHA256" => Some(Self::Sha256),
- "SHA384" => Some(Self::Sha384),
- "SHA512" => Some(Self::Sha512),
- "SplitPart" => Some(Self::SplitPart),
- "StartsWith" => Some(Self::StartsWith),
- "Strpos" => Some(Self::Strpos),
- "Substr" => Some(Self::Substr),
- "ToHex" => Some(Self::ToHex),
- "ToTimestamp" => Some(Self::ToTimestamp),
- "ToTimestampMillis" => Some(Self::ToTimestampMillis),
- "ToTimestampMicros" => Some(Self::ToTimestampMicros),
- "ToTimestampSeconds" => Some(Self::ToTimestampSeconds),
- "Now" => Some(Self::Now),
- "Translate" => Some(Self::Translate),
- "Trim" => Some(Self::Trim),
- "Upper" => Some(Self::Upper),
- "Coalesce" => Some(Self::Coalesce),
- "Power" => Some(Self::Power),
- "StructFun" => Some(Self::StructFun),
- "FromUnixtime" => Some(Self::FromUnixtime),
- "Atan2" => Some(Self::Atan2),
- "DateBin" => Some(Self::DateBin),
- "ArrowTypeof" => Some(Self::ArrowTypeof),
- "CurrentDate" => Some(Self::CurrentDate),
- "CurrentTime" => Some(Self::CurrentTime),
- "Uuid" => Some(Self::Uuid),
- "Cbrt" => Some(Self::Cbrt),
- "Acosh" => Some(Self::Acosh),
- "Asinh" => Some(Self::Asinh),
- "Atanh" => Some(Self::Atanh),
- "Sinh" => Some(Self::Sinh),
- "Cosh" => Some(Self::Cosh),
- "Tanh" => Some(Self::Tanh),
- "Pi" => Some(Self::Pi),
- "Degrees" => Some(Self::Degrees),
- "Radians" => Some(Self::Radians),
- "Factorial" => Some(Self::Factorial),
- "Lcm" => Some(Self::Lcm),
- "Gcd" => Some(Self::Gcd),
- "ArrayAppend" => Some(Self::ArrayAppend),
- "ArrayConcat" => Some(Self::ArrayConcat),
- "ArrayDims" => Some(Self::ArrayDims),
- "ArrayFill" => Some(Self::ArrayFill),
- "ArrayLength" => Some(Self::ArrayLength),
- "ArrayNdims" => Some(Self::ArrayNdims),
- "ArrayPosition" => Some(Self::ArrayPosition),
- "ArrayPositions" => Some(Self::ArrayPositions),
- "ArrayPrepend" => Some(Self::ArrayPrepend),
- "ArrayRemove" => Some(Self::ArrayRemove),
- "ArrayReplace" => Some(Self::ArrayReplace),
- "ArrayToString" => Some(Self::ArrayToString),
- "Cardinality" => Some(Self::Cardinality),
- "TrimArray" => Some(Self::TrimArray),
- "ArrayContains" => Some(Self::ArrayContains),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum AggregateFunction {
- Min = 0,
- Max = 1,
- Sum = 2,
- Avg = 3,
- Count = 4,
- ApproxDistinct = 5,
- ArrayAgg = 6,
- Variance = 7,
- VariancePop = 8,
- Covariance = 9,
- CovariancePop = 10,
- Stddev = 11,
- StddevPop = 12,
- Correlation = 13,
- ApproxPercentileCont = 14,
- ApproxMedian = 15,
- ApproxPercentileContWithWeight = 16,
- Grouping = 17,
- Median = 18,
- BitAnd = 19,
- BitOr = 20,
- BitXor = 21,
- BoolAnd = 22,
- BoolOr = 23,
- /// When a function with the same name exists among built-in window functions,
- /// we append "_AGG" to obey name scoping rules.
- FirstValueAgg = 24,
- LastValueAgg = 25,
-}
-impl AggregateFunction {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- AggregateFunction::Min => "MIN",
- AggregateFunction::Max => "MAX",
- AggregateFunction::Sum => "SUM",
- AggregateFunction::Avg => "AVG",
- AggregateFunction::Count => "COUNT",
- AggregateFunction::ApproxDistinct => "APPROX_DISTINCT",
- AggregateFunction::ArrayAgg => "ARRAY_AGG",
- AggregateFunction::Variance => "VARIANCE",
- AggregateFunction::VariancePop => "VARIANCE_POP",
- AggregateFunction::Covariance => "COVARIANCE",
- AggregateFunction::CovariancePop => "COVARIANCE_POP",
- AggregateFunction::Stddev => "STDDEV",
- AggregateFunction::StddevPop => "STDDEV_POP",
- AggregateFunction::Correlation => "CORRELATION",
- AggregateFunction::ApproxPercentileCont => "APPROX_PERCENTILE_CONT",
- AggregateFunction::ApproxMedian => "APPROX_MEDIAN",
- AggregateFunction::ApproxPercentileContWithWeight => {
- "APPROX_PERCENTILE_CONT_WITH_WEIGHT"
- }
- AggregateFunction::Grouping => "GROUPING",
- AggregateFunction::Median => "MEDIAN",
- AggregateFunction::BitAnd => "BIT_AND",
- AggregateFunction::BitOr => "BIT_OR",
- AggregateFunction::BitXor => "BIT_XOR",
- AggregateFunction::BoolAnd => "BOOL_AND",
- AggregateFunction::BoolOr => "BOOL_OR",
- AggregateFunction::FirstValueAgg => "FIRST_VALUE_AGG",
- AggregateFunction::LastValueAgg => "LAST_VALUE_AGG",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "MIN" => Some(Self::Min),
- "MAX" => Some(Self::Max),
- "SUM" => Some(Self::Sum),
- "AVG" => Some(Self::Avg),
- "COUNT" => Some(Self::Count),
- "APPROX_DISTINCT" => Some(Self::ApproxDistinct),
- "ARRAY_AGG" => Some(Self::ArrayAgg),
- "VARIANCE" => Some(Self::Variance),
- "VARIANCE_POP" => Some(Self::VariancePop),
- "COVARIANCE" => Some(Self::Covariance),
- "COVARIANCE_POP" => Some(Self::CovariancePop),
- "STDDEV" => Some(Self::Stddev),
- "STDDEV_POP" => Some(Self::StddevPop),
- "CORRELATION" => Some(Self::Correlation),
- "APPROX_PERCENTILE_CONT" => Some(Self::ApproxPercentileCont),
- "APPROX_MEDIAN" => Some(Self::ApproxMedian),
- "APPROX_PERCENTILE_CONT_WITH_WEIGHT" => {
- Some(Self::ApproxPercentileContWithWeight)
- }
- "GROUPING" => Some(Self::Grouping),
- "MEDIAN" => Some(Self::Median),
- "BIT_AND" => Some(Self::BitAnd),
- "BIT_OR" => Some(Self::BitOr),
- "BIT_XOR" => Some(Self::BitXor),
- "BOOL_AND" => Some(Self::BoolAnd),
- "BOOL_OR" => Some(Self::BoolOr),
- "FIRST_VALUE_AGG" => Some(Self::FirstValueAgg),
- "LAST_VALUE_AGG" => Some(Self::LastValueAgg),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum BuiltInWindowFunction {
- RowNumber = 0,
- Rank = 1,
- DenseRank = 2,
- PercentRank = 3,
- CumeDist = 4,
- Ntile = 5,
- Lag = 6,
- Lead = 7,
- FirstValue = 8,
- LastValue = 9,
- NthValue = 10,
-}
-impl BuiltInWindowFunction {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- BuiltInWindowFunction::RowNumber => "ROW_NUMBER",
- BuiltInWindowFunction::Rank => "RANK",
- BuiltInWindowFunction::DenseRank => "DENSE_RANK",
- BuiltInWindowFunction::PercentRank => "PERCENT_RANK",
- BuiltInWindowFunction::CumeDist => "CUME_DIST",
- BuiltInWindowFunction::Ntile => "NTILE",
- BuiltInWindowFunction::Lag => "LAG",
- BuiltInWindowFunction::Lead => "LEAD",
- BuiltInWindowFunction::FirstValue => "FIRST_VALUE",
- BuiltInWindowFunction::LastValue => "LAST_VALUE",
- BuiltInWindowFunction::NthValue => "NTH_VALUE",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "ROW_NUMBER" => Some(Self::RowNumber),
- "RANK" => Some(Self::Rank),
- "DENSE_RANK" => Some(Self::DenseRank),
- "PERCENT_RANK" => Some(Self::PercentRank),
- "CUME_DIST" => Some(Self::CumeDist),
- "NTILE" => Some(Self::Ntile),
- "LAG" => Some(Self::Lag),
- "LEAD" => Some(Self::Lead),
- "FIRST_VALUE" => Some(Self::FirstValue),
- "LAST_VALUE" => Some(Self::LastValue),
- "NTH_VALUE" => Some(Self::NthValue),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum WindowFrameUnits {
- Rows = 0,
- Range = 1,
- Groups = 2,
-}
-impl WindowFrameUnits {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- WindowFrameUnits::Rows => "ROWS",
- WindowFrameUnits::Range => "RANGE",
- WindowFrameUnits::Groups => "GROUPS",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "ROWS" => Some(Self::Rows),
- "RANGE" => Some(Self::Range),
- "GROUPS" => Some(Self::Groups),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum WindowFrameBoundType {
- CurrentRow = 0,
- Preceding = 1,
- Following = 2,
-}
-impl WindowFrameBoundType {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- WindowFrameBoundType::CurrentRow => "CURRENT_ROW",
- WindowFrameBoundType::Preceding => "PRECEDING",
- WindowFrameBoundType::Following => "FOLLOWING",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "CURRENT_ROW" => Some(Self::CurrentRow),
- "PRECEDING" => Some(Self::Preceding),
- "FOLLOWING" => Some(Self::Following),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum DateUnit {
- Day = 0,
- DateMillisecond = 1,
-}
-impl DateUnit {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- DateUnit::Day => "Day",
- DateUnit::DateMillisecond => "DateMillisecond",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "Day" => Some(Self::Day),
- "DateMillisecond" => Some(Self::DateMillisecond),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum TimeUnit {
- Second = 0,
- Millisecond = 1,
- Microsecond = 2,
- Nanosecond = 3,
-}
-impl TimeUnit {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- TimeUnit::Second => "Second",
- TimeUnit::Millisecond => "Millisecond",
- TimeUnit::Microsecond => "Microsecond",
- TimeUnit::Nanosecond => "Nanosecond",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "Second" => Some(Self::Second),
- "Millisecond" => Some(Self::Millisecond),
- "Microsecond" => Some(Self::Microsecond),
- "Nanosecond" => Some(Self::Nanosecond),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum IntervalUnit {
- YearMonth = 0,
- DayTime = 1,
- MonthDayNano = 2,
-}
-impl IntervalUnit {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- IntervalUnit::YearMonth => "YearMonth",
- IntervalUnit::DayTime => "DayTime",
- IntervalUnit::MonthDayNano => "MonthDayNano",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "YearMonth" => Some(Self::YearMonth),
- "DayTime" => Some(Self::DayTime),
- "MonthDayNano" => Some(Self::MonthDayNano),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum UnionMode {
- Sparse = 0,
- Dense = 1,
-}
-impl UnionMode {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- UnionMode::Sparse => "sparse",
- UnionMode::Dense => "dense",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "sparse" => Some(Self::Sparse),
- "dense" => Some(Self::Dense),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum PartitionMode {
- CollectLeft = 0,
- Partitioned = 1,
- Auto = 2,
-}
-impl PartitionMode {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- PartitionMode::CollectLeft => "COLLECT_LEFT",
- PartitionMode::Partitioned => "PARTITIONED",
- PartitionMode::Auto => "AUTO",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "COLLECT_LEFT" => Some(Self::CollectLeft),
- "PARTITIONED" => Some(Self::Partitioned),
- "AUTO" => Some(Self::Auto),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum AggregateMode {
- Partial = 0,
- Final = 1,
- FinalPartitioned = 2,
- Single = 3,
-}
-impl AggregateMode {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- AggregateMode::Partial => "PARTIAL",
- AggregateMode::Final => "FINAL",
- AggregateMode::FinalPartitioned => "FINAL_PARTITIONED",
- AggregateMode::Single => "SINGLE",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "PARTIAL" => Some(Self::Partial),
- "FINAL" => Some(Self::Final),
- "FINAL_PARTITIONED" => Some(Self::FinalPartitioned),
- "SINGLE" => Some(Self::Single),
- _ => None,
- }
- }
-}
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
-#[repr(i32)]
-pub enum JoinSide {
- LeftSide = 0,
- RightSide = 1,
-}
-impl JoinSide {
- /// String value of the enum field names used in the ProtoBuf definition.
- ///
- /// The values are not transformed in any way and thus are considered stable
- /// (if the ProtoBuf definition does not change) and safe for programmatic use.
- pub fn as_str_name(&self) -> &'static str {
- match self {
- JoinSide::LeftSide => "LEFT_SIDE",
- JoinSide::RightSide => "RIGHT_SIDE",
- }
- }
- /// Creates an enum from field names used in the ProtoBuf definition.
- pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
- match value {
- "LEFT_SIDE" => Some(Self::LeftSide),
- "RIGHT_SIDE" => Some(Self::RightSide),
- _ => None,
- }
- }
-}
diff --git a/datafusion/proto/src/datafusion.serde.rs b/datafusion/proto/src/datafusion.serde.rs
deleted file mode 100644
index ab8ddf4f29..0000000000
--- a/datafusion/proto/src/datafusion.serde.rs
+++ /dev/null
@@ -1,22857 +0,0 @@
-impl serde::Serialize for AggregateExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.group_expr.is_empty() {
- len += 1;
- }
- if !self.aggr_expr.is_empty() {
- len += 1;
- }
- if self.mode != 0 {
- len += 1;
- }
- if self.input.is_some() {
- len += 1;
- }
- if !self.group_expr_name.is_empty() {
- len += 1;
- }
- if !self.aggr_expr_name.is_empty() {
- len += 1;
- }
- if self.input_schema.is_some() {
- len += 1;
- }
- if !self.null_expr.is_empty() {
- len += 1;
- }
- if !self.groups.is_empty() {
- len += 1;
- }
- if !self.filter_expr.is_empty() {
- len += 1;
- }
- if !self.order_by_expr.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.AggregateExecNode", len)?;
- if !self.group_expr.is_empty() {
- struct_ser.serialize_field("groupExpr", &self.group_expr)?;
- }
- if !self.aggr_expr.is_empty() {
- struct_ser.serialize_field("aggrExpr", &self.aggr_expr)?;
- }
- if self.mode != 0 {
- let v = AggregateMode::from_i32(self.mode)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.mode)))?;
- struct_ser.serialize_field("mode", &v)?;
- }
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- if !self.group_expr_name.is_empty() {
- struct_ser.serialize_field("groupExprName", &self.group_expr_name)?;
- }
- if !self.aggr_expr_name.is_empty() {
- struct_ser.serialize_field("aggrExprName", &self.aggr_expr_name)?;
- }
- if let Some(v) = self.input_schema.as_ref() {
- struct_ser.serialize_field("inputSchema", v)?;
- }
- if !self.null_expr.is_empty() {
- struct_ser.serialize_field("nullExpr", &self.null_expr)?;
- }
- if !self.groups.is_empty() {
- struct_ser.serialize_field("groups", &self.groups)?;
- }
- if !self.filter_expr.is_empty() {
- struct_ser.serialize_field("filterExpr", &self.filter_expr)?;
- }
- if !self.order_by_expr.is_empty() {
- struct_ser.serialize_field("orderByExpr", &self.order_by_expr)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AggregateExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "group_expr",
- "groupExpr",
- "aggr_expr",
- "aggrExpr",
- "mode",
- "input",
- "group_expr_name",
- "groupExprName",
- "aggr_expr_name",
- "aggrExprName",
- "input_schema",
- "inputSchema",
- "null_expr",
- "nullExpr",
- "groups",
- "filter_expr",
- "filterExpr",
- "order_by_expr",
- "orderByExpr",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- GroupExpr,
- AggrExpr,
- Mode,
- Input,
- GroupExprName,
- AggrExprName,
- InputSchema,
- NullExpr,
- Groups,
- FilterExpr,
- OrderByExpr,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "groupExpr" | "group_expr" => Ok(GeneratedField::GroupExpr),
- "aggrExpr" | "aggr_expr" => Ok(GeneratedField::AggrExpr),
- "mode" => Ok(GeneratedField::Mode),
- "input" => Ok(GeneratedField::Input),
- "groupExprName" | "group_expr_name" => Ok(GeneratedField::GroupExprName),
- "aggrExprName" | "aggr_expr_name" => Ok(GeneratedField::AggrExprName),
- "inputSchema" | "input_schema" => Ok(GeneratedField::InputSchema),
- "nullExpr" | "null_expr" => Ok(GeneratedField::NullExpr),
- "groups" => Ok(GeneratedField::Groups),
- "filterExpr" | "filter_expr" => Ok(GeneratedField::FilterExpr),
- "orderByExpr" | "order_by_expr" => Ok(GeneratedField::OrderByExpr),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AggregateExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AggregateExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AggregateExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut group_expr__ = None;
- let mut aggr_expr__ = None;
- let mut mode__ = None;
- let mut input__ = None;
- let mut group_expr_name__ = None;
- let mut aggr_expr_name__ = None;
- let mut input_schema__ = None;
- let mut null_expr__ = None;
- let mut groups__ = None;
- let mut filter_expr__ = None;
- let mut order_by_expr__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::GroupExpr => {
- if group_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("groupExpr"));
- }
- group_expr__ = Some(map.next_value()?);
- }
- GeneratedField::AggrExpr => {
- if aggr_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("aggrExpr"));
- }
- aggr_expr__ = Some(map.next_value()?);
- }
- GeneratedField::Mode => {
- if mode__.is_some() {
- return Err(serde::de::Error::duplicate_field("mode"));
- }
- mode__ = Some(map.next_value::<AggregateMode>()? as i32);
- }
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- GeneratedField::GroupExprName => {
- if group_expr_name__.is_some() {
- return Err(serde::de::Error::duplicate_field("groupExprName"));
- }
- group_expr_name__ = Some(map.next_value()?);
- }
- GeneratedField::AggrExprName => {
- if aggr_expr_name__.is_some() {
- return Err(serde::de::Error::duplicate_field("aggrExprName"));
- }
- aggr_expr_name__ = Some(map.next_value()?);
- }
- GeneratedField::InputSchema => {
- if input_schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("inputSchema"));
- }
- input_schema__ = map.next_value()?;
- }
- GeneratedField::NullExpr => {
- if null_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("nullExpr"));
- }
- null_expr__ = Some(map.next_value()?);
- }
- GeneratedField::Groups => {
- if groups__.is_some() {
- return Err(serde::de::Error::duplicate_field("groups"));
- }
- groups__ = Some(map.next_value()?);
- }
- GeneratedField::FilterExpr => {
- if filter_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("filterExpr"));
- }
- filter_expr__ = Some(map.next_value()?);
- }
- GeneratedField::OrderByExpr => {
- if order_by_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("orderByExpr"));
- }
- order_by_expr__ = Some(map.next_value()?);
- }
- }
- }
- Ok(AggregateExecNode {
- group_expr: group_expr__.unwrap_or_default(),
- aggr_expr: aggr_expr__.unwrap_or_default(),
- mode: mode__.unwrap_or_default(),
- input: input__,
- group_expr_name: group_expr_name__.unwrap_or_default(),
- aggr_expr_name: aggr_expr_name__.unwrap_or_default(),
- input_schema: input_schema__,
- null_expr: null_expr__.unwrap_or_default(),
- groups: groups__.unwrap_or_default(),
- filter_expr: filter_expr__.unwrap_or_default(),
- order_by_expr: order_by_expr__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AggregateExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for AggregateExprNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.aggr_function != 0 {
- len += 1;
- }
- if !self.expr.is_empty() {
- len += 1;
- }
- if self.distinct {
- len += 1;
- }
- if self.filter.is_some() {
- len += 1;
- }
- if !self.order_by.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.AggregateExprNode", len)?;
- if self.aggr_function != 0 {
- let v = AggregateFunction::from_i32(self.aggr_function)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.aggr_function)))?;
- struct_ser.serialize_field("aggrFunction", &v)?;
- }
- if !self.expr.is_empty() {
- struct_ser.serialize_field("expr", &self.expr)?;
- }
- if self.distinct {
- struct_ser.serialize_field("distinct", &self.distinct)?;
- }
- if let Some(v) = self.filter.as_ref() {
- struct_ser.serialize_field("filter", v)?;
- }
- if !self.order_by.is_empty() {
- struct_ser.serialize_field("orderBy", &self.order_by)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AggregateExprNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "aggr_function",
- "aggrFunction",
- "expr",
- "distinct",
- "filter",
- "order_by",
- "orderBy",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- AggrFunction,
- Expr,
- Distinct,
- Filter,
- OrderBy,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "aggrFunction" | "aggr_function" => Ok(GeneratedField::AggrFunction),
- "expr" => Ok(GeneratedField::Expr),
- "distinct" => Ok(GeneratedField::Distinct),
- "filter" => Ok(GeneratedField::Filter),
- "orderBy" | "order_by" => Ok(GeneratedField::OrderBy),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AggregateExprNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AggregateExprNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AggregateExprNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut aggr_function__ = None;
- let mut expr__ = None;
- let mut distinct__ = None;
- let mut filter__ = None;
- let mut order_by__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::AggrFunction => {
- if aggr_function__.is_some() {
- return Err(serde::de::Error::duplicate_field("aggrFunction"));
- }
- aggr_function__ = Some(map.next_value::<AggregateFunction>()? as i32);
- }
- GeneratedField::Expr => {
- if expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("expr"));
- }
- expr__ = Some(map.next_value()?);
- }
- GeneratedField::Distinct => {
- if distinct__.is_some() {
- return Err(serde::de::Error::duplicate_field("distinct"));
- }
- distinct__ = Some(map.next_value()?);
- }
- GeneratedField::Filter => {
- if filter__.is_some() {
- return Err(serde::de::Error::duplicate_field("filter"));
- }
- filter__ = map.next_value()?;
- }
- GeneratedField::OrderBy => {
- if order_by__.is_some() {
- return Err(serde::de::Error::duplicate_field("orderBy"));
- }
- order_by__ = Some(map.next_value()?);
- }
- }
- }
- Ok(AggregateExprNode {
- aggr_function: aggr_function__.unwrap_or_default(),
- expr: expr__.unwrap_or_default(),
- distinct: distinct__.unwrap_or_default(),
- filter: filter__,
- order_by: order_by__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AggregateExprNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for AggregateFunction {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- let variant = match self {
- Self::Min => "MIN",
- Self::Max => "MAX",
- Self::Sum => "SUM",
- Self::Avg => "AVG",
- Self::Count => "COUNT",
- Self::ApproxDistinct => "APPROX_DISTINCT",
- Self::ArrayAgg => "ARRAY_AGG",
- Self::Variance => "VARIANCE",
- Self::VariancePop => "VARIANCE_POP",
- Self::Covariance => "COVARIANCE",
- Self::CovariancePop => "COVARIANCE_POP",
- Self::Stddev => "STDDEV",
- Self::StddevPop => "STDDEV_POP",
- Self::Correlation => "CORRELATION",
- Self::ApproxPercentileCont => "APPROX_PERCENTILE_CONT",
- Self::ApproxMedian => "APPROX_MEDIAN",
- Self::ApproxPercentileContWithWeight => "APPROX_PERCENTILE_CONT_WITH_WEIGHT",
- Self::Grouping => "GROUPING",
- Self::Median => "MEDIAN",
- Self::BitAnd => "BIT_AND",
- Self::BitOr => "BIT_OR",
- Self::BitXor => "BIT_XOR",
- Self::BoolAnd => "BOOL_AND",
- Self::BoolOr => "BOOL_OR",
- Self::FirstValueAgg => "FIRST_VALUE_AGG",
- Self::LastValueAgg => "LAST_VALUE_AGG",
- };
- serializer.serialize_str(variant)
- }
-}
-impl<'de> serde::Deserialize<'de> for AggregateFunction {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "MIN",
- "MAX",
- "SUM",
- "AVG",
- "COUNT",
- "APPROX_DISTINCT",
- "ARRAY_AGG",
- "VARIANCE",
- "VARIANCE_POP",
- "COVARIANCE",
- "COVARIANCE_POP",
- "STDDEV",
- "STDDEV_POP",
- "CORRELATION",
- "APPROX_PERCENTILE_CONT",
- "APPROX_MEDIAN",
- "APPROX_PERCENTILE_CONT_WITH_WEIGHT",
- "GROUPING",
- "MEDIAN",
- "BIT_AND",
- "BIT_OR",
- "BIT_XOR",
- "BOOL_AND",
- "BOOL_OR",
- "FIRST_VALUE_AGG",
- "LAST_VALUE_AGG",
- ];
-
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AggregateFunction;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- use std::convert::TryFrom;
- i32::try_from(v)
- .ok()
- .and_then(AggregateFunction::from_i32)
- .ok_or_else(|| {
- serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
- })
- }
-
- fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- use std::convert::TryFrom;
- i32::try_from(v)
- .ok()
- .and_then(AggregateFunction::from_i32)
- .ok_or_else(|| {
- serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
- })
- }
-
- fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- match value {
- "MIN" => Ok(AggregateFunction::Min),
- "MAX" => Ok(AggregateFunction::Max),
- "SUM" => Ok(AggregateFunction::Sum),
- "AVG" => Ok(AggregateFunction::Avg),
- "COUNT" => Ok(AggregateFunction::Count),
- "APPROX_DISTINCT" => Ok(AggregateFunction::ApproxDistinct),
- "ARRAY_AGG" => Ok(AggregateFunction::ArrayAgg),
- "VARIANCE" => Ok(AggregateFunction::Variance),
- "VARIANCE_POP" => Ok(AggregateFunction::VariancePop),
- "COVARIANCE" => Ok(AggregateFunction::Covariance),
- "COVARIANCE_POP" => Ok(AggregateFunction::CovariancePop),
- "STDDEV" => Ok(AggregateFunction::Stddev),
- "STDDEV_POP" => Ok(AggregateFunction::StddevPop),
- "CORRELATION" => Ok(AggregateFunction::Correlation),
- "APPROX_PERCENTILE_CONT" => Ok(AggregateFunction::ApproxPercentileCont),
- "APPROX_MEDIAN" => Ok(AggregateFunction::ApproxMedian),
- "APPROX_PERCENTILE_CONT_WITH_WEIGHT" => Ok(AggregateFunction::ApproxPercentileContWithWeight),
- "GROUPING" => Ok(AggregateFunction::Grouping),
- "MEDIAN" => Ok(AggregateFunction::Median),
- "BIT_AND" => Ok(AggregateFunction::BitAnd),
- "BIT_OR" => Ok(AggregateFunction::BitOr),
- "BIT_XOR" => Ok(AggregateFunction::BitXor),
- "BOOL_AND" => Ok(AggregateFunction::BoolAnd),
- "BOOL_OR" => Ok(AggregateFunction::BoolOr),
- "FIRST_VALUE_AGG" => Ok(AggregateFunction::FirstValueAgg),
- "LAST_VALUE_AGG" => Ok(AggregateFunction::LastValueAgg),
- _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_any(GeneratedVisitor)
- }
-}
-impl serde::Serialize for AggregateMode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- let variant = match self {
- Self::Partial => "PARTIAL",
- Self::Final => "FINAL",
- Self::FinalPartitioned => "FINAL_PARTITIONED",
- Self::Single => "SINGLE",
- };
- serializer.serialize_str(variant)
- }
-}
-impl<'de> serde::Deserialize<'de> for AggregateMode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "PARTIAL",
- "FINAL",
- "FINAL_PARTITIONED",
- "SINGLE",
- ];
-
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AggregateMode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- use std::convert::TryFrom;
- i32::try_from(v)
- .ok()
- .and_then(AggregateMode::from_i32)
- .ok_or_else(|| {
- serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
- })
- }
-
- fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- use std::convert::TryFrom;
- i32::try_from(v)
- .ok()
- .and_then(AggregateMode::from_i32)
- .ok_or_else(|| {
- serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
- })
- }
-
- fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- match value {
- "PARTIAL" => Ok(AggregateMode::Partial),
- "FINAL" => Ok(AggregateMode::Final),
- "FINAL_PARTITIONED" => Ok(AggregateMode::FinalPartitioned),
- "SINGLE" => Ok(AggregateMode::Single),
- _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_any(GeneratedVisitor)
- }
-}
-impl serde::Serialize for AggregateNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.input.is_some() {
- len += 1;
- }
- if !self.group_expr.is_empty() {
- len += 1;
- }
- if !self.aggr_expr.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.AggregateNode", len)?;
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- if !self.group_expr.is_empty() {
- struct_ser.serialize_field("groupExpr", &self.group_expr)?;
- }
- if !self.aggr_expr.is_empty() {
- struct_ser.serialize_field("aggrExpr", &self.aggr_expr)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AggregateNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "input",
- "group_expr",
- "groupExpr",
- "aggr_expr",
- "aggrExpr",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Input,
- GroupExpr,
- AggrExpr,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "input" => Ok(GeneratedField::Input),
- "groupExpr" | "group_expr" => Ok(GeneratedField::GroupExpr),
- "aggrExpr" | "aggr_expr" => Ok(GeneratedField::AggrExpr),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AggregateNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AggregateNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AggregateNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut input__ = None;
- let mut group_expr__ = None;
- let mut aggr_expr__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- GeneratedField::GroupExpr => {
- if group_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("groupExpr"));
- }
- group_expr__ = Some(map.next_value()?);
- }
- GeneratedField::AggrExpr => {
- if aggr_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("aggrExpr"));
- }
- aggr_expr__ = Some(map.next_value()?);
- }
- }
- }
- Ok(AggregateNode {
- input: input__,
- group_expr: group_expr__.unwrap_or_default(),
- aggr_expr: aggr_expr__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AggregateNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for AggregateUdfExprNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.fun_name.is_empty() {
- len += 1;
- }
- if !self.args.is_empty() {
- len += 1;
- }
- if self.filter.is_some() {
- len += 1;
- }
- if !self.order_by.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.AggregateUDFExprNode", len)?;
- if !self.fun_name.is_empty() {
- struct_ser.serialize_field("funName", &self.fun_name)?;
- }
- if !self.args.is_empty() {
- struct_ser.serialize_field("args", &self.args)?;
- }
- if let Some(v) = self.filter.as_ref() {
- struct_ser.serialize_field("filter", v)?;
- }
- if !self.order_by.is_empty() {
- struct_ser.serialize_field("orderBy", &self.order_by)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AggregateUdfExprNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "fun_name",
- "funName",
- "args",
- "filter",
- "order_by",
- "orderBy",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- FunName,
- Args,
- Filter,
- OrderBy,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "funName" | "fun_name" => Ok(GeneratedField::FunName),
- "args" => Ok(GeneratedField::Args),
- "filter" => Ok(GeneratedField::Filter),
- "orderBy" | "order_by" => Ok(GeneratedField::OrderBy),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AggregateUdfExprNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AggregateUDFExprNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AggregateUdfExprNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut fun_name__ = None;
- let mut args__ = None;
- let mut filter__ = None;
- let mut order_by__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::FunName => {
- if fun_name__.is_some() {
- return Err(serde::de::Error::duplicate_field("funName"));
- }
- fun_name__ = Some(map.next_value()?);
- }
- GeneratedField::Args => {
- if args__.is_some() {
- return Err(serde::de::Error::duplicate_field("args"));
- }
- args__ = Some(map.next_value()?);
- }
- GeneratedField::Filter => {
- if filter__.is_some() {
- return Err(serde::de::Error::duplicate_field("filter"));
- }
- filter__ = map.next_value()?;
- }
- GeneratedField::OrderBy => {
- if order_by__.is_some() {
- return Err(serde::de::Error::duplicate_field("orderBy"));
- }
- order_by__ = Some(map.next_value()?);
- }
- }
- }
- Ok(AggregateUdfExprNode {
- fun_name: fun_name__.unwrap_or_default(),
- args: args__.unwrap_or_default(),
- filter: filter__,
- order_by: order_by__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AggregateUDFExprNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for AliasNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.expr.is_some() {
- len += 1;
- }
- if !self.alias.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.AliasNode", len)?;
- if let Some(v) = self.expr.as_ref() {
- struct_ser.serialize_field("expr", v)?;
- }
- if !self.alias.is_empty() {
- struct_ser.serialize_field("alias", &self.alias)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AliasNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "expr",
- "alias",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Expr,
- Alias,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "expr" => Ok(GeneratedField::Expr),
- "alias" => Ok(GeneratedField::Alias),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AliasNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AliasNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AliasNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut expr__ = None;
- let mut alias__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Expr => {
- if expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("expr"));
- }
- expr__ = map.next_value()?;
- }
- GeneratedField::Alias => {
- if alias__.is_some() {
- return Err(serde::de::Error::duplicate_field("alias"));
- }
- alias__ = Some(map.next_value()?);
- }
- }
- }
- Ok(AliasNode {
- expr: expr__,
- alias: alias__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AliasNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for AnalyzeNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.input.is_some() {
- len += 1;
- }
- if self.verbose {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.AnalyzeNode", len)?;
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- if self.verbose {
- struct_ser.serialize_field("verbose", &self.verbose)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AnalyzeNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "input",
- "verbose",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Input,
- Verbose,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "input" => Ok(GeneratedField::Input),
- "verbose" => Ok(GeneratedField::Verbose),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AnalyzeNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AnalyzeNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AnalyzeNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut input__ = None;
- let mut verbose__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- GeneratedField::Verbose => {
- if verbose__.is_some() {
- return Err(serde::de::Error::duplicate_field("verbose"));
- }
- verbose__ = Some(map.next_value()?);
- }
- }
- }
- Ok(AnalyzeNode {
- input: input__,
- verbose: verbose__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AnalyzeNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for AnalyzedLogicalPlanType {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.analyzer_name.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.AnalyzedLogicalPlanType", len)?;
- if !self.analyzer_name.is_empty() {
- struct_ser.serialize_field("analyzerName", &self.analyzer_name)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AnalyzedLogicalPlanType {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "analyzer_name",
- "analyzerName",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- AnalyzerName,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "analyzerName" | "analyzer_name" => Ok(GeneratedField::AnalyzerName),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AnalyzedLogicalPlanType;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AnalyzedLogicalPlanType")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AnalyzedLogicalPlanType, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut analyzer_name__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::AnalyzerName => {
- if analyzer_name__.is_some() {
- return Err(serde::de::Error::duplicate_field("analyzerName"));
- }
- analyzer_name__ = Some(map.next_value()?);
- }
- }
- }
- Ok(AnalyzedLogicalPlanType {
- analyzer_name: analyzer_name__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AnalyzedLogicalPlanType", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for ArrowType {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.arrow_type_enum.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.ArrowType", len)?;
- if let Some(v) = self.arrow_type_enum.as_ref() {
- match v {
- arrow_type::ArrowTypeEnum::None(v) => {
- struct_ser.serialize_field("NONE", v)?;
- }
- arrow_type::ArrowTypeEnum::Bool(v) => {
- struct_ser.serialize_field("BOOL", v)?;
- }
- arrow_type::ArrowTypeEnum::Uint8(v) => {
- struct_ser.serialize_field("UINT8", v)?;
- }
- arrow_type::ArrowTypeEnum::Int8(v) => {
- struct_ser.serialize_field("INT8", v)?;
- }
- arrow_type::ArrowTypeEnum::Uint16(v) => {
- struct_ser.serialize_field("UINT16", v)?;
- }
- arrow_type::ArrowTypeEnum::Int16(v) => {
- struct_ser.serialize_field("INT16", v)?;
- }
- arrow_type::ArrowTypeEnum::Uint32(v) => {
- struct_ser.serialize_field("UINT32", v)?;
- }
- arrow_type::ArrowTypeEnum::Int32(v) => {
- struct_ser.serialize_field("INT32", v)?;
- }
- arrow_type::ArrowTypeEnum::Uint64(v) => {
- struct_ser.serialize_field("UINT64", v)?;
- }
- arrow_type::ArrowTypeEnum::Int64(v) => {
- struct_ser.serialize_field("INT64", v)?;
- }
- arrow_type::ArrowTypeEnum::Float16(v) => {
- struct_ser.serialize_field("FLOAT16", v)?;
- }
- arrow_type::ArrowTypeEnum::Float32(v) => {
- struct_ser.serialize_field("FLOAT32", v)?;
- }
- arrow_type::ArrowTypeEnum::Float64(v) => {
- struct_ser.serialize_field("FLOAT64", v)?;
- }
- arrow_type::ArrowTypeEnum::Utf8(v) => {
- struct_ser.serialize_field("UTF8", v)?;
- }
- arrow_type::ArrowTypeEnum::LargeUtf8(v) => {
- struct_ser.serialize_field("LARGEUTF8", v)?;
- }
- arrow_type::ArrowTypeEnum::Binary(v) => {
- struct_ser.serialize_field("BINARY", v)?;
- }
- arrow_type::ArrowTypeEnum::FixedSizeBinary(v) => {
- struct_ser.serialize_field("FIXEDSIZEBINARY", v)?;
- }
- arrow_type::ArrowTypeEnum::LargeBinary(v) => {
- struct_ser.serialize_field("LARGEBINARY", v)?;
- }
- arrow_type::ArrowTypeEnum::Date32(v) => {
- struct_ser.serialize_field("DATE32", v)?;
- }
- arrow_type::ArrowTypeEnum::Date64(v) => {
- struct_ser.serialize_field("DATE64", v)?;
- }
- arrow_type::ArrowTypeEnum::Duration(v) => {
- let v = TimeUnit::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
- struct_ser.serialize_field("DURATION", &v)?;
- }
- arrow_type::ArrowTypeEnum::Timestamp(v) => {
- struct_ser.serialize_field("TIMESTAMP", v)?;
- }
- arrow_type::ArrowTypeEnum::Time32(v) => {
- let v = TimeUnit::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
- struct_ser.serialize_field("TIME32", &v)?;
- }
- arrow_type::ArrowTypeEnum::Time64(v) => {
- let v = TimeUnit::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
- struct_ser.serialize_field("TIME64", &v)?;
- }
- arrow_type::ArrowTypeEnum::Interval(v) => {
- let v = IntervalUnit::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
- struct_ser.serialize_field("INTERVAL", &v)?;
- }
- arrow_type::ArrowTypeEnum::Decimal(v) => {
- struct_ser.serialize_field("DECIMAL", v)?;
- }
- arrow_type::ArrowTypeEnum::List(v) => {
- struct_ser.serialize_field("LIST", v)?;
- }
- arrow_type::ArrowTypeEnum::LargeList(v) => {
- struct_ser.serialize_field("LARGELIST", v)?;
- }
- arrow_type::ArrowTypeEnum::FixedSizeList(v) => {
- struct_ser.serialize_field("FIXEDSIZELIST", v)?;
- }
- arrow_type::ArrowTypeEnum::Struct(v) => {
- struct_ser.serialize_field("STRUCT", v)?;
- }
- arrow_type::ArrowTypeEnum::Union(v) => {
- struct_ser.serialize_field("UNION", v)?;
- }
- arrow_type::ArrowTypeEnum::Dictionary(v) => {
- struct_ser.serialize_field("DICTIONARY", v)?;
- }
- arrow_type::ArrowTypeEnum::Map(v) => {
- struct_ser.serialize_field("MAP", v)?;
- }
- }
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for ArrowType {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "NONE",
- "BOOL",
- "UINT8",
- "INT8",
- "UINT16",
- "INT16",
- "UINT32",
- "INT32",
- "UINT64",
- "INT64",
- "FLOAT16",
- "FLOAT32",
- "FLOAT64",
- "UTF8",
- "LARGE_UTF8",
- "LARGEUTF8",
- "BINARY",
- "FIXED_SIZE_BINARY",
- "FIXEDSIZEBINARY",
- "LARGE_BINARY",
- "LARGEBINARY",
- "DATE32",
- "DATE64",
- "DURATION",
- "TIMESTAMP",
- "TIME32",
- "TIME64",
- "INTERVAL",
- "DECIMAL",
- "LIST",
- "LARGE_LIST",
- "LARGELIST",
- "FIXED_SIZE_LIST",
- "FIXEDSIZELIST",
- "STRUCT",
- "UNION",
- "DICTIONARY",
- "MAP",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- None,
- Bool,
- Uint8,
- Int8,
- Uint16,
- Int16,
- Uint32,
- Int32,
- Uint64,
- Int64,
- Float16,
- Float32,
- Float64,
- Utf8,
- LargeUtf8,
- Binary,
- FixedSizeBinary,
- LargeBinary,
- Date32,
- Date64,
- Duration,
- Timestamp,
- Time32,
- Time64,
- Interval,
- Decimal,
- List,
- LargeList,
- FixedSizeList,
- Struct,
- Union,
- Dictionary,
- Map,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "NONE" => Ok(GeneratedField::None),
- "BOOL" => Ok(GeneratedField::Bool),
- "UINT8" => Ok(GeneratedField::Uint8),
- "INT8" => Ok(GeneratedField::Int8),
- "UINT16" => Ok(GeneratedField::Uint16),
- "INT16" => Ok(GeneratedField::Int16),
- "UINT32" => Ok(GeneratedField::Uint32),
- "INT32" => Ok(GeneratedField::Int32),
- "UINT64" => Ok(GeneratedField::Uint64),
- "INT64" => Ok(GeneratedField::Int64),
- "FLOAT16" => Ok(GeneratedField::Float16),
- "FLOAT32" => Ok(GeneratedField::Float32),
- "FLOAT64" => Ok(GeneratedField::Float64),
- "UTF8" => Ok(GeneratedField::Utf8),
- "LARGEUTF8" | "LARGE_UTF8" => Ok(GeneratedField::LargeUtf8),
- "BINARY" => Ok(GeneratedField::Binary),
- "FIXEDSIZEBINARY" | "FIXED_SIZE_BINARY" => Ok(GeneratedField::FixedSizeBinary),
- "LARGEBINARY" | "LARGE_BINARY" => Ok(GeneratedField::LargeBinary),
- "DATE32" => Ok(GeneratedField::Date32),
- "DATE64" => Ok(GeneratedField::Date64),
- "DURATION" => Ok(GeneratedField::Duration),
- "TIMESTAMP" => Ok(GeneratedField::Timestamp),
- "TIME32" => Ok(GeneratedField::Time32),
- "TIME64" => Ok(GeneratedField::Time64),
- "INTERVAL" => Ok(GeneratedField::Interval),
- "DECIMAL" => Ok(GeneratedField::Decimal),
- "LIST" => Ok(GeneratedField::List),
- "LARGELIST" | "LARGE_LIST" => Ok(GeneratedField::LargeList),
- "FIXEDSIZELIST" | "FIXED_SIZE_LIST" => Ok(GeneratedField::FixedSizeList),
- "STRUCT" => Ok(GeneratedField::Struct),
- "UNION" => Ok(GeneratedField::Union),
- "DICTIONARY" => Ok(GeneratedField::Dictionary),
- "MAP" => Ok(GeneratedField::Map),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = ArrowType;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.ArrowType")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ArrowType, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut arrow_type_enum__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::None => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("NONE"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::None)
-;
- }
- GeneratedField::Bool => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("BOOL"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Bool)
-;
- }
- GeneratedField::Uint8 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("UINT8"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Uint8)
-;
- }
- GeneratedField::Int8 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("INT8"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Int8)
-;
- }
- GeneratedField::Uint16 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("UINT16"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Uint16)
-;
- }
- GeneratedField::Int16 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("INT16"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Int16)
-;
- }
- GeneratedField::Uint32 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("UINT32"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Uint32)
-;
- }
- GeneratedField::Int32 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("INT32"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Int32)
-;
- }
- GeneratedField::Uint64 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("UINT64"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Uint64)
-;
- }
- GeneratedField::Int64 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("INT64"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Int64)
-;
- }
- GeneratedField::Float16 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("FLOAT16"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Float16)
-;
- }
- GeneratedField::Float32 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("FLOAT32"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Float32)
-;
- }
- GeneratedField::Float64 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("FLOAT64"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Float64)
-;
- }
- GeneratedField::Utf8 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("UTF8"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Utf8)
-;
- }
- GeneratedField::LargeUtf8 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("LARGEUTF8"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::LargeUtf8)
-;
- }
- GeneratedField::Binary => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("BINARY"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Binary)
-;
- }
- GeneratedField::FixedSizeBinary => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("FIXEDSIZEBINARY"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| arrow_type::ArrowTypeEnum::FixedSizeBinary(x.0));
- }
- GeneratedField::LargeBinary => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("LARGEBINARY"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::LargeBinary)
-;
- }
- GeneratedField::Date32 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("DATE32"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Date32)
-;
- }
- GeneratedField::Date64 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("DATE64"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Date64)
-;
- }
- GeneratedField::Duration => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("DURATION"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<TimeUnit>>()?.map(|x| arrow_type::ArrowTypeEnum::Duration(x as i32));
- }
- GeneratedField::Timestamp => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("TIMESTAMP"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Timestamp)
-;
- }
- GeneratedField::Time32 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("TIME32"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<TimeUnit>>()?.map(|x| arrow_type::ArrowTypeEnum::Time32(x as i32));
- }
- GeneratedField::Time64 => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("TIME64"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<TimeUnit>>()?.map(|x| arrow_type::ArrowTypeEnum::Time64(x as i32));
- }
- GeneratedField::Interval => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("INTERVAL"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<IntervalUnit>>()?.map(|x| arrow_type::ArrowTypeEnum::Interval(x as i32));
- }
- GeneratedField::Decimal => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("DECIMAL"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Decimal)
-;
- }
- GeneratedField::List => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("LIST"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::List)
-;
- }
- GeneratedField::LargeList => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("LARGELIST"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::LargeList)
-;
- }
- GeneratedField::FixedSizeList => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("FIXEDSIZELIST"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::FixedSizeList)
-;
- }
- GeneratedField::Struct => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("STRUCT"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Struct)
-;
- }
- GeneratedField::Union => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("UNION"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Union)
-;
- }
- GeneratedField::Dictionary => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("DICTIONARY"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Dictionary)
-;
- }
- GeneratedField::Map => {
- if arrow_type_enum__.is_some() {
- return Err(serde::de::Error::duplicate_field("MAP"));
- }
- arrow_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Map)
-;
- }
- }
- }
- Ok(ArrowType {
- arrow_type_enum: arrow_type_enum__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.ArrowType", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for AvroFormat {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let len = 0;
- let struct_ser = serializer.serialize_struct("datafusion.AvroFormat", len)?;
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AvroFormat {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- Err(serde::de::Error::unknown_field(value, FIELDS))
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AvroFormat;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AvroFormat")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AvroFormat, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- while map.next_key::<GeneratedField>()?.is_some() {
- let _ = map.next_value::<serde::de::IgnoredAny>()?;
- }
- Ok(AvroFormat {
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AvroFormat", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for AvroScanExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.base_conf.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.AvroScanExecNode", len)?;
- if let Some(v) = self.base_conf.as_ref() {
- struct_ser.serialize_field("baseConf", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for AvroScanExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "base_conf",
- "baseConf",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- BaseConf,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "baseConf" | "base_conf" => Ok(GeneratedField::BaseConf),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = AvroScanExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.AvroScanExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AvroScanExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut base_conf__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::BaseConf => {
- if base_conf__.is_some() {
- return Err(serde::de::Error::duplicate_field("baseConf"));
- }
- base_conf__ = map.next_value()?;
- }
- }
- }
- Ok(AvroScanExecNode {
- base_conf: base_conf__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.AvroScanExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for BareTableReference {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.table.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.BareTableReference", len)?;
- if !self.table.is_empty() {
- struct_ser.serialize_field("table", &self.table)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for BareTableReference {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "table",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Table,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "table" => Ok(GeneratedField::Table),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = BareTableReference;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.BareTableReference")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<BareTableReference, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut table__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Table => {
- if table__.is_some() {
- return Err(serde::de::Error::duplicate_field("table"));
- }
- table__ = Some(map.next_value()?);
- }
- }
- }
- Ok(BareTableReference {
- table: table__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.BareTableReference", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for BetweenNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.expr.is_some() {
- len += 1;
- }
- if self.negated {
- len += 1;
- }
- if self.low.is_some() {
- len += 1;
- }
- if self.high.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.BetweenNode", len)?;
- if let Some(v) = self.expr.as_ref() {
- struct_ser.serialize_field("expr", v)?;
- }
- if self.negated {
- struct_ser.serialize_field("negated", &self.negated)?;
- }
- if let Some(v) = self.low.as_ref() {
- struct_ser.serialize_field("low", v)?;
- }
- if let Some(v) = self.high.as_ref() {
- struct_ser.serialize_field("high", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for BetweenNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "expr",
- "negated",
- "low",
- "high",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Expr,
- Negated,
- Low,
- High,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "expr" => Ok(GeneratedField::Expr),
- "negated" => Ok(GeneratedField::Negated),
- "low" => Ok(GeneratedField::Low),
- "high" => Ok(GeneratedField::High),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = BetweenNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.BetweenNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<BetweenNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut expr__ = None;
- let mut negated__ = None;
- let mut low__ = None;
- let mut high__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Expr => {
- if expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("expr"));
- }
- expr__ = map.next_value()?;
- }
- GeneratedField::Negated => {
- if negated__.is_some() {
- return Err(serde::de::Error::duplicate_field("negated"));
- }
- negated__ = Some(map.next_value()?);
- }
- GeneratedField::Low => {
- if low__.is_some() {
- return Err(serde::de::Error::duplicate_field("low"));
- }
- low__ = map.next_value()?;
- }
- GeneratedField::High => {
- if high__.is_some() {
- return Err(serde::de::Error::duplicate_field("high"));
- }
- high__ = map.next_value()?;
- }
- }
- }
- Ok(BetweenNode {
- expr: expr__,
- negated: negated__.unwrap_or_default(),
- low: low__,
- high: high__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.BetweenNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for BinaryExprNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.operands.is_empty() {
- len += 1;
- }
- if !self.op.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.BinaryExprNode", len)?;
- if !self.operands.is_empty() {
- struct_ser.serialize_field("operands", &self.operands)?;
- }
- if !self.op.is_empty() {
- struct_ser.serialize_field("op", &self.op)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for BinaryExprNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "operands",
- "op",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Operands,
- Op,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "operands" => Ok(GeneratedField::Operands),
- "op" => Ok(GeneratedField::Op),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = BinaryExprNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.BinaryExprNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<BinaryExprNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut operands__ = None;
- let mut op__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Operands => {
- if operands__.is_some() {
- return Err(serde::de::Error::duplicate_field("operands"));
- }
- operands__ = Some(map.next_value()?);
- }
- GeneratedField::Op => {
- if op__.is_some() {
- return Err(serde::de::Error::duplicate_field("op"));
- }
- op__ = Some(map.next_value()?);
- }
- }
- }
- Ok(BinaryExprNode {
- operands: operands__.unwrap_or_default(),
- op: op__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.BinaryExprNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for BuiltInWindowFunction {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- let variant = match self {
- Self::RowNumber => "ROW_NUMBER",
- Self::Rank => "RANK",
- Self::DenseRank => "DENSE_RANK",
- Self::PercentRank => "PERCENT_RANK",
- Self::CumeDist => "CUME_DIST",
- Self::Ntile => "NTILE",
- Self::Lag => "LAG",
- Self::Lead => "LEAD",
- Self::FirstValue => "FIRST_VALUE",
- Self::LastValue => "LAST_VALUE",
- Self::NthValue => "NTH_VALUE",
- };
- serializer.serialize_str(variant)
- }
-}
-impl<'de> serde::Deserialize<'de> for BuiltInWindowFunction {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "ROW_NUMBER",
- "RANK",
- "DENSE_RANK",
- "PERCENT_RANK",
- "CUME_DIST",
- "NTILE",
- "LAG",
- "LEAD",
- "FIRST_VALUE",
- "LAST_VALUE",
- "NTH_VALUE",
- ];
-
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = BuiltInWindowFunction;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- use std::convert::TryFrom;
- i32::try_from(v)
- .ok()
- .and_then(BuiltInWindowFunction::from_i32)
- .ok_or_else(|| {
- serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
- })
- }
-
- fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- use std::convert::TryFrom;
- i32::try_from(v)
- .ok()
- .and_then(BuiltInWindowFunction::from_i32)
- .ok_or_else(|| {
- serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
- })
- }
-
- fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- match value {
- "ROW_NUMBER" => Ok(BuiltInWindowFunction::RowNumber),
- "RANK" => Ok(BuiltInWindowFunction::Rank),
- "DENSE_RANK" => Ok(BuiltInWindowFunction::DenseRank),
- "PERCENT_RANK" => Ok(BuiltInWindowFunction::PercentRank),
- "CUME_DIST" => Ok(BuiltInWindowFunction::CumeDist),
- "NTILE" => Ok(BuiltInWindowFunction::Ntile),
- "LAG" => Ok(BuiltInWindowFunction::Lag),
- "LEAD" => Ok(BuiltInWindowFunction::Lead),
- "FIRST_VALUE" => Ok(BuiltInWindowFunction::FirstValue),
- "LAST_VALUE" => Ok(BuiltInWindowFunction::LastValue),
- "NTH_VALUE" => Ok(BuiltInWindowFunction::NthValue),
- _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_any(GeneratedVisitor)
- }
-}
-impl serde::Serialize for CaseNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.expr.is_some() {
- len += 1;
- }
- if !self.when_then_expr.is_empty() {
- len += 1;
- }
- if self.else_expr.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CaseNode", len)?;
- if let Some(v) = self.expr.as_ref() {
- struct_ser.serialize_field("expr", v)?;
- }
- if !self.when_then_expr.is_empty() {
- struct_ser.serialize_field("whenThenExpr", &self.when_then_expr)?;
- }
- if let Some(v) = self.else_expr.as_ref() {
- struct_ser.serialize_field("elseExpr", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CaseNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "expr",
- "when_then_expr",
- "whenThenExpr",
- "else_expr",
- "elseExpr",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Expr,
- WhenThenExpr,
- ElseExpr,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "expr" => Ok(GeneratedField::Expr),
- "whenThenExpr" | "when_then_expr" => Ok(GeneratedField::WhenThenExpr),
- "elseExpr" | "else_expr" => Ok(GeneratedField::ElseExpr),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CaseNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CaseNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CaseNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut expr__ = None;
- let mut when_then_expr__ = None;
- let mut else_expr__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Expr => {
- if expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("expr"));
- }
- expr__ = map.next_value()?;
- }
- GeneratedField::WhenThenExpr => {
- if when_then_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("whenThenExpr"));
- }
- when_then_expr__ = Some(map.next_value()?);
- }
- GeneratedField::ElseExpr => {
- if else_expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("elseExpr"));
- }
- else_expr__ = map.next_value()?;
- }
- }
- }
- Ok(CaseNode {
- expr: expr__,
- when_then_expr: when_then_expr__.unwrap_or_default(),
- else_expr: else_expr__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CaseNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CastNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.expr.is_some() {
- len += 1;
- }
- if self.arrow_type.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CastNode", len)?;
- if let Some(v) = self.expr.as_ref() {
- struct_ser.serialize_field("expr", v)?;
- }
- if let Some(v) = self.arrow_type.as_ref() {
- struct_ser.serialize_field("arrowType", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CastNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "expr",
- "arrow_type",
- "arrowType",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Expr,
- ArrowType,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "expr" => Ok(GeneratedField::Expr),
- "arrowType" | "arrow_type" => Ok(GeneratedField::ArrowType),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CastNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CastNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CastNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut expr__ = None;
- let mut arrow_type__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Expr => {
- if expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("expr"));
- }
- expr__ = map.next_value()?;
- }
- GeneratedField::ArrowType => {
- if arrow_type__.is_some() {
- return Err(serde::de::Error::duplicate_field("arrowType"));
- }
- arrow_type__ = map.next_value()?;
- }
- }
- }
- Ok(CastNode {
- expr: expr__,
- arrow_type: arrow_type__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CastNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CoalesceBatchesExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.input.is_some() {
- len += 1;
- }
- if self.target_batch_size != 0 {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CoalesceBatchesExecNode", len)?;
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- if self.target_batch_size != 0 {
- struct_ser.serialize_field("targetBatchSize", &self.target_batch_size)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CoalesceBatchesExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "input",
- "target_batch_size",
- "targetBatchSize",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Input,
- TargetBatchSize,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "input" => Ok(GeneratedField::Input),
- "targetBatchSize" | "target_batch_size" => Ok(GeneratedField::TargetBatchSize),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CoalesceBatchesExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CoalesceBatchesExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CoalesceBatchesExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut input__ = None;
- let mut target_batch_size__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- GeneratedField::TargetBatchSize => {
- if target_batch_size__.is_some() {
- return Err(serde::de::Error::duplicate_field("targetBatchSize"));
- }
- target_batch_size__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- }
- }
- Ok(CoalesceBatchesExecNode {
- input: input__,
- target_batch_size: target_batch_size__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CoalesceBatchesExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CoalescePartitionsExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.input.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CoalescePartitionsExecNode", len)?;
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CoalescePartitionsExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "input",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Input,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "input" => Ok(GeneratedField::Input),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CoalescePartitionsExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CoalescePartitionsExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CoalescePartitionsExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut input__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- }
- }
- Ok(CoalescePartitionsExecNode {
- input: input__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CoalescePartitionsExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for Column {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.name.is_empty() {
- len += 1;
- }
- if self.relation.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.Column", len)?;
- if !self.name.is_empty() {
- struct_ser.serialize_field("name", &self.name)?;
- }
- if let Some(v) = self.relation.as_ref() {
- struct_ser.serialize_field("relation", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for Column {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "name",
- "relation",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Name,
- Relation,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "name" => Ok(GeneratedField::Name),
- "relation" => Ok(GeneratedField::Relation),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = Column;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.Column")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Column, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut name__ = None;
- let mut relation__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Name => {
- if name__.is_some() {
- return Err(serde::de::Error::duplicate_field("name"));
- }
- name__ = Some(map.next_value()?);
- }
- GeneratedField::Relation => {
- if relation__.is_some() {
- return Err(serde::de::Error::duplicate_field("relation"));
- }
- relation__ = map.next_value()?;
- }
- }
- }
- Ok(Column {
- name: name__.unwrap_or_default(),
- relation: relation__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.Column", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for ColumnIndex {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.index != 0 {
- len += 1;
- }
- if self.side != 0 {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.ColumnIndex", len)?;
- if self.index != 0 {
- struct_ser.serialize_field("index", &self.index)?;
- }
- if self.side != 0 {
- let v = JoinSide::from_i32(self.side)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.side)))?;
- struct_ser.serialize_field("side", &v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for ColumnIndex {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "index",
- "side",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Index,
- Side,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "index" => Ok(GeneratedField::Index),
- "side" => Ok(GeneratedField::Side),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = ColumnIndex;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.ColumnIndex")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ColumnIndex, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut index__ = None;
- let mut side__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Index => {
- if index__.is_some() {
- return Err(serde::de::Error::duplicate_field("index"));
- }
- index__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- GeneratedField::Side => {
- if side__.is_some() {
- return Err(serde::de::Error::duplicate_field("side"));
- }
- side__ = Some(map.next_value::<JoinSide>()? as i32);
- }
- }
- }
- Ok(ColumnIndex {
- index: index__.unwrap_or_default(),
- side: side__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.ColumnIndex", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for ColumnRelation {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.relation.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.ColumnRelation", len)?;
- if !self.relation.is_empty() {
- struct_ser.serialize_field("relation", &self.relation)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for ColumnRelation {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "relation",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Relation,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "relation" => Ok(GeneratedField::Relation),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = ColumnRelation;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.ColumnRelation")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ColumnRelation, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut relation__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Relation => {
- if relation__.is_some() {
- return Err(serde::de::Error::duplicate_field("relation"));
- }
- relation__ = Some(map.next_value()?);
- }
- }
- }
- Ok(ColumnRelation {
- relation: relation__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.ColumnRelation", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for ColumnStats {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.min_value.is_some() {
- len += 1;
- }
- if self.max_value.is_some() {
- len += 1;
- }
- if self.null_count != 0 {
- len += 1;
- }
- if self.distinct_count != 0 {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.ColumnStats", len)?;
- if let Some(v) = self.min_value.as_ref() {
- struct_ser.serialize_field("minValue", v)?;
- }
- if let Some(v) = self.max_value.as_ref() {
- struct_ser.serialize_field("maxValue", v)?;
- }
- if self.null_count != 0 {
- struct_ser.serialize_field("nullCount", &self.null_count)?;
- }
- if self.distinct_count != 0 {
- struct_ser.serialize_field("distinctCount", &self.distinct_count)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for ColumnStats {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "min_value",
- "minValue",
- "max_value",
- "maxValue",
- "null_count",
- "nullCount",
- "distinct_count",
- "distinctCount",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- MinValue,
- MaxValue,
- NullCount,
- DistinctCount,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "minValue" | "min_value" => Ok(GeneratedField::MinValue),
- "maxValue" | "max_value" => Ok(GeneratedField::MaxValue),
- "nullCount" | "null_count" => Ok(GeneratedField::NullCount),
- "distinctCount" | "distinct_count" => Ok(GeneratedField::DistinctCount),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = ColumnStats;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.ColumnStats")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ColumnStats, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut min_value__ = None;
- let mut max_value__ = None;
- let mut null_count__ = None;
- let mut distinct_count__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::MinValue => {
- if min_value__.is_some() {
- return Err(serde::de::Error::duplicate_field("minValue"));
- }
- min_value__ = map.next_value()?;
- }
- GeneratedField::MaxValue => {
- if max_value__.is_some() {
- return Err(serde::de::Error::duplicate_field("maxValue"));
- }
- max_value__ = map.next_value()?;
- }
- GeneratedField::NullCount => {
- if null_count__.is_some() {
- return Err(serde::de::Error::duplicate_field("nullCount"));
- }
- null_count__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- GeneratedField::DistinctCount => {
- if distinct_count__.is_some() {
- return Err(serde::de::Error::duplicate_field("distinctCount"));
- }
- distinct_count__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- }
- }
- Ok(ColumnStats {
- min_value: min_value__,
- max_value: max_value__,
- null_count: null_count__.unwrap_or_default(),
- distinct_count: distinct_count__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.ColumnStats", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CreateCatalogNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.catalog_name.is_empty() {
- len += 1;
- }
- if self.if_not_exists {
- len += 1;
- }
- if self.schema.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CreateCatalogNode", len)?;
- if !self.catalog_name.is_empty() {
- struct_ser.serialize_field("catalogName", &self.catalog_name)?;
- }
- if self.if_not_exists {
- struct_ser.serialize_field("ifNotExists", &self.if_not_exists)?;
- }
- if let Some(v) = self.schema.as_ref() {
- struct_ser.serialize_field("schema", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CreateCatalogNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "catalog_name",
- "catalogName",
- "if_not_exists",
- "ifNotExists",
- "schema",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- CatalogName,
- IfNotExists,
- Schema,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "catalogName" | "catalog_name" => Ok(GeneratedField::CatalogName),
- "ifNotExists" | "if_not_exists" => Ok(GeneratedField::IfNotExists),
- "schema" => Ok(GeneratedField::Schema),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CreateCatalogNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CreateCatalogNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateCatalogNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut catalog_name__ = None;
- let mut if_not_exists__ = None;
- let mut schema__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::CatalogName => {
- if catalog_name__.is_some() {
- return Err(serde::de::Error::duplicate_field("catalogName"));
- }
- catalog_name__ = Some(map.next_value()?);
- }
- GeneratedField::IfNotExists => {
- if if_not_exists__.is_some() {
- return Err(serde::de::Error::duplicate_field("ifNotExists"));
- }
- if_not_exists__ = Some(map.next_value()?);
- }
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = map.next_value()?;
- }
- }
- }
- Ok(CreateCatalogNode {
- catalog_name: catalog_name__.unwrap_or_default(),
- if_not_exists: if_not_exists__.unwrap_or_default(),
- schema: schema__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CreateCatalogNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CreateCatalogSchemaNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.schema_name.is_empty() {
- len += 1;
- }
- if self.if_not_exists {
- len += 1;
- }
- if self.schema.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CreateCatalogSchemaNode", len)?;
- if !self.schema_name.is_empty() {
- struct_ser.serialize_field("schemaName", &self.schema_name)?;
- }
- if self.if_not_exists {
- struct_ser.serialize_field("ifNotExists", &self.if_not_exists)?;
- }
- if let Some(v) = self.schema.as_ref() {
- struct_ser.serialize_field("schema", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CreateCatalogSchemaNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "schema_name",
- "schemaName",
- "if_not_exists",
- "ifNotExists",
- "schema",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- SchemaName,
- IfNotExists,
- Schema,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "schemaName" | "schema_name" => Ok(GeneratedField::SchemaName),
- "ifNotExists" | "if_not_exists" => Ok(GeneratedField::IfNotExists),
- "schema" => Ok(GeneratedField::Schema),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CreateCatalogSchemaNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CreateCatalogSchemaNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateCatalogSchemaNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut schema_name__ = None;
- let mut if_not_exists__ = None;
- let mut schema__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::SchemaName => {
- if schema_name__.is_some() {
- return Err(serde::de::Error::duplicate_field("schemaName"));
- }
- schema_name__ = Some(map.next_value()?);
- }
- GeneratedField::IfNotExists => {
- if if_not_exists__.is_some() {
- return Err(serde::de::Error::duplicate_field("ifNotExists"));
- }
- if_not_exists__ = Some(map.next_value()?);
- }
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = map.next_value()?;
- }
- }
- }
- Ok(CreateCatalogSchemaNode {
- schema_name: schema_name__.unwrap_or_default(),
- if_not_exists: if_not_exists__.unwrap_or_default(),
- schema: schema__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CreateCatalogSchemaNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CreateExternalTableNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.name.is_some() {
- len += 1;
- }
- if !self.location.is_empty() {
- len += 1;
- }
- if !self.file_type.is_empty() {
- len += 1;
- }
- if self.has_header {
- len += 1;
- }
- if self.schema.is_some() {
- len += 1;
- }
- if !self.table_partition_cols.is_empty() {
- len += 1;
- }
- if self.if_not_exists {
- len += 1;
- }
- if !self.delimiter.is_empty() {
- len += 1;
- }
- if !self.definition.is_empty() {
- len += 1;
- }
- if !self.file_compression_type.is_empty() {
- len += 1;
- }
- if !self.order_exprs.is_empty() {
- len += 1;
- }
- if self.unbounded {
- len += 1;
- }
- if !self.options.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CreateExternalTableNode", len)?;
- if let Some(v) = self.name.as_ref() {
- struct_ser.serialize_field("name", v)?;
- }
- if !self.location.is_empty() {
- struct_ser.serialize_field("location", &self.location)?;
- }
- if !self.file_type.is_empty() {
- struct_ser.serialize_field("fileType", &self.file_type)?;
- }
- if self.has_header {
- struct_ser.serialize_field("hasHeader", &self.has_header)?;
- }
- if let Some(v) = self.schema.as_ref() {
- struct_ser.serialize_field("schema", v)?;
- }
- if !self.table_partition_cols.is_empty() {
- struct_ser.serialize_field("tablePartitionCols", &self.table_partition_cols)?;
- }
- if self.if_not_exists {
- struct_ser.serialize_field("ifNotExists", &self.if_not_exists)?;
- }
- if !self.delimiter.is_empty() {
- struct_ser.serialize_field("delimiter", &self.delimiter)?;
- }
- if !self.definition.is_empty() {
- struct_ser.serialize_field("definition", &self.definition)?;
- }
- if !self.file_compression_type.is_empty() {
- struct_ser.serialize_field("fileCompressionType", &self.file_compression_type)?;
- }
- if !self.order_exprs.is_empty() {
- struct_ser.serialize_field("orderExprs", &self.order_exprs)?;
- }
- if self.unbounded {
- struct_ser.serialize_field("unbounded", &self.unbounded)?;
- }
- if !self.options.is_empty() {
- struct_ser.serialize_field("options", &self.options)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CreateExternalTableNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "name",
- "location",
- "file_type",
- "fileType",
- "has_header",
- "hasHeader",
- "schema",
- "table_partition_cols",
- "tablePartitionCols",
- "if_not_exists",
- "ifNotExists",
- "delimiter",
- "definition",
- "file_compression_type",
- "fileCompressionType",
- "order_exprs",
- "orderExprs",
- "unbounded",
- "options",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Name,
- Location,
- FileType,
- HasHeader,
- Schema,
- TablePartitionCols,
- IfNotExists,
- Delimiter,
- Definition,
- FileCompressionType,
- OrderExprs,
- Unbounded,
- Options,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "name" => Ok(GeneratedField::Name),
- "location" => Ok(GeneratedField::Location),
- "fileType" | "file_type" => Ok(GeneratedField::FileType),
- "hasHeader" | "has_header" => Ok(GeneratedField::HasHeader),
- "schema" => Ok(GeneratedField::Schema),
- "tablePartitionCols" | "table_partition_cols" => Ok(GeneratedField::TablePartitionCols),
- "ifNotExists" | "if_not_exists" => Ok(GeneratedField::IfNotExists),
- "delimiter" => Ok(GeneratedField::Delimiter),
- "definition" => Ok(GeneratedField::Definition),
- "fileCompressionType" | "file_compression_type" => Ok(GeneratedField::FileCompressionType),
- "orderExprs" | "order_exprs" => Ok(GeneratedField::OrderExprs),
- "unbounded" => Ok(GeneratedField::Unbounded),
- "options" => Ok(GeneratedField::Options),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CreateExternalTableNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CreateExternalTableNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateExternalTableNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut name__ = None;
- let mut location__ = None;
- let mut file_type__ = None;
- let mut has_header__ = None;
- let mut schema__ = None;
- let mut table_partition_cols__ = None;
- let mut if_not_exists__ = None;
- let mut delimiter__ = None;
- let mut definition__ = None;
- let mut file_compression_type__ = None;
- let mut order_exprs__ = None;
- let mut unbounded__ = None;
- let mut options__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Name => {
- if name__.is_some() {
- return Err(serde::de::Error::duplicate_field("name"));
- }
- name__ = map.next_value()?;
- }
- GeneratedField::Location => {
- if location__.is_some() {
- return Err(serde::de::Error::duplicate_field("location"));
- }
- location__ = Some(map.next_value()?);
- }
- GeneratedField::FileType => {
- if file_type__.is_some() {
- return Err(serde::de::Error::duplicate_field("fileType"));
- }
- file_type__ = Some(map.next_value()?);
- }
- GeneratedField::HasHeader => {
- if has_header__.is_some() {
- return Err(serde::de::Error::duplicate_field("hasHeader"));
- }
- has_header__ = Some(map.next_value()?);
- }
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = map.next_value()?;
- }
- GeneratedField::TablePartitionCols => {
- if table_partition_cols__.is_some() {
- return Err(serde::de::Error::duplicate_field("tablePartitionCols"));
- }
- table_partition_cols__ = Some(map.next_value()?);
- }
- GeneratedField::IfNotExists => {
- if if_not_exists__.is_some() {
- return Err(serde::de::Error::duplicate_field("ifNotExists"));
- }
- if_not_exists__ = Some(map.next_value()?);
- }
- GeneratedField::Delimiter => {
- if delimiter__.is_some() {
- return Err(serde::de::Error::duplicate_field("delimiter"));
- }
- delimiter__ = Some(map.next_value()?);
- }
- GeneratedField::Definition => {
- if definition__.is_some() {
- return Err(serde::de::Error::duplicate_field("definition"));
- }
- definition__ = Some(map.next_value()?);
- }
- GeneratedField::FileCompressionType => {
- if file_compression_type__.is_some() {
- return Err(serde::de::Error::duplicate_field("fileCompressionType"));
- }
- file_compression_type__ = Some(map.next_value()?);
- }
- GeneratedField::OrderExprs => {
- if order_exprs__.is_some() {
- return Err(serde::de::Error::duplicate_field("orderExprs"));
- }
- order_exprs__ = Some(map.next_value()?);
- }
- GeneratedField::Unbounded => {
- if unbounded__.is_some() {
- return Err(serde::de::Error::duplicate_field("unbounded"));
- }
- unbounded__ = Some(map.next_value()?);
- }
- GeneratedField::Options => {
- if options__.is_some() {
- return Err(serde::de::Error::duplicate_field("options"));
- }
- options__ = Some(
- map.next_value::<std::collections::HashMap<_, _>>()?
- );
- }
- }
- }
- Ok(CreateExternalTableNode {
- name: name__,
- location: location__.unwrap_or_default(),
- file_type: file_type__.unwrap_or_default(),
- has_header: has_header__.unwrap_or_default(),
- schema: schema__,
- table_partition_cols: table_partition_cols__.unwrap_or_default(),
- if_not_exists: if_not_exists__.unwrap_or_default(),
- delimiter: delimiter__.unwrap_or_default(),
- definition: definition__.unwrap_or_default(),
- file_compression_type: file_compression_type__.unwrap_or_default(),
- order_exprs: order_exprs__.unwrap_or_default(),
- unbounded: unbounded__.unwrap_or_default(),
- options: options__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CreateExternalTableNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CreateViewNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.name.is_some() {
- len += 1;
- }
- if self.input.is_some() {
- len += 1;
- }
- if self.or_replace {
- len += 1;
- }
- if !self.definition.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CreateViewNode", len)?;
- if let Some(v) = self.name.as_ref() {
- struct_ser.serialize_field("name", v)?;
- }
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- if self.or_replace {
- struct_ser.serialize_field("orReplace", &self.or_replace)?;
- }
- if !self.definition.is_empty() {
- struct_ser.serialize_field("definition", &self.definition)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CreateViewNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "name",
- "input",
- "or_replace",
- "orReplace",
- "definition",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Name,
- Input,
- OrReplace,
- Definition,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "name" => Ok(GeneratedField::Name),
- "input" => Ok(GeneratedField::Input),
- "orReplace" | "or_replace" => Ok(GeneratedField::OrReplace),
- "definition" => Ok(GeneratedField::Definition),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CreateViewNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CreateViewNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateViewNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut name__ = None;
- let mut input__ = None;
- let mut or_replace__ = None;
- let mut definition__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Name => {
- if name__.is_some() {
- return Err(serde::de::Error::duplicate_field("name"));
- }
- name__ = map.next_value()?;
- }
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- GeneratedField::OrReplace => {
- if or_replace__.is_some() {
- return Err(serde::de::Error::duplicate_field("orReplace"));
- }
- or_replace__ = Some(map.next_value()?);
- }
- GeneratedField::Definition => {
- if definition__.is_some() {
- return Err(serde::de::Error::duplicate_field("definition"));
- }
- definition__ = Some(map.next_value()?);
- }
- }
- }
- Ok(CreateViewNode {
- name: name__,
- input: input__,
- or_replace: or_replace__.unwrap_or_default(),
- definition: definition__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CreateViewNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CrossJoinExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.left.is_some() {
- len += 1;
- }
- if self.right.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CrossJoinExecNode", len)?;
- if let Some(v) = self.left.as_ref() {
- struct_ser.serialize_field("left", v)?;
- }
- if let Some(v) = self.right.as_ref() {
- struct_ser.serialize_field("right", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CrossJoinExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "left",
- "right",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Left,
- Right,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "left" => Ok(GeneratedField::Left),
- "right" => Ok(GeneratedField::Right),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CrossJoinExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CrossJoinExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CrossJoinExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut left__ = None;
- let mut right__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Left => {
- if left__.is_some() {
- return Err(serde::de::Error::duplicate_field("left"));
- }
- left__ = map.next_value()?;
- }
- GeneratedField::Right => {
- if right__.is_some() {
- return Err(serde::de::Error::duplicate_field("right"));
- }
- right__ = map.next_value()?;
- }
- }
- }
- Ok(CrossJoinExecNode {
- left: left__,
- right: right__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CrossJoinExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CrossJoinNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.left.is_some() {
- len += 1;
- }
- if self.right.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CrossJoinNode", len)?;
- if let Some(v) = self.left.as_ref() {
- struct_ser.serialize_field("left", v)?;
- }
- if let Some(v) = self.right.as_ref() {
- struct_ser.serialize_field("right", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CrossJoinNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "left",
- "right",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Left,
- Right,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "left" => Ok(GeneratedField::Left),
- "right" => Ok(GeneratedField::Right),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CrossJoinNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CrossJoinNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CrossJoinNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut left__ = None;
- let mut right__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Left => {
- if left__.is_some() {
- return Err(serde::de::Error::duplicate_field("left"));
- }
- left__ = map.next_value()?;
- }
- GeneratedField::Right => {
- if right__.is_some() {
- return Err(serde::de::Error::duplicate_field("right"));
- }
- right__ = map.next_value()?;
- }
- }
- }
- Ok(CrossJoinNode {
- left: left__,
- right: right__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CrossJoinNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CsvFormat {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.has_header {
- len += 1;
- }
- if !self.delimiter.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CsvFormat", len)?;
- if self.has_header {
- struct_ser.serialize_field("hasHeader", &self.has_header)?;
- }
- if !self.delimiter.is_empty() {
- struct_ser.serialize_field("delimiter", &self.delimiter)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CsvFormat {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "has_header",
- "hasHeader",
- "delimiter",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- HasHeader,
- Delimiter,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "hasHeader" | "has_header" => Ok(GeneratedField::HasHeader),
- "delimiter" => Ok(GeneratedField::Delimiter),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CsvFormat;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CsvFormat")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CsvFormat, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut has_header__ = None;
- let mut delimiter__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::HasHeader => {
- if has_header__.is_some() {
- return Err(serde::de::Error::duplicate_field("hasHeader"));
- }
- has_header__ = Some(map.next_value()?);
- }
- GeneratedField::Delimiter => {
- if delimiter__.is_some() {
- return Err(serde::de::Error::duplicate_field("delimiter"));
- }
- delimiter__ = Some(map.next_value()?);
- }
- }
- }
- Ok(CsvFormat {
- has_header: has_header__.unwrap_or_default(),
- delimiter: delimiter__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CsvFormat", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CsvScanExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.base_conf.is_some() {
- len += 1;
- }
- if self.has_header {
- len += 1;
- }
- if !self.delimiter.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CsvScanExecNode", len)?;
- if let Some(v) = self.base_conf.as_ref() {
- struct_ser.serialize_field("baseConf", v)?;
- }
- if self.has_header {
- struct_ser.serialize_field("hasHeader", &self.has_header)?;
- }
- if !self.delimiter.is_empty() {
- struct_ser.serialize_field("delimiter", &self.delimiter)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CsvScanExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "base_conf",
- "baseConf",
- "has_header",
- "hasHeader",
- "delimiter",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- BaseConf,
- HasHeader,
- Delimiter,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "baseConf" | "base_conf" => Ok(GeneratedField::BaseConf),
- "hasHeader" | "has_header" => Ok(GeneratedField::HasHeader),
- "delimiter" => Ok(GeneratedField::Delimiter),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CsvScanExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CsvScanExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CsvScanExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut base_conf__ = None;
- let mut has_header__ = None;
- let mut delimiter__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::BaseConf => {
- if base_conf__.is_some() {
- return Err(serde::de::Error::duplicate_field("baseConf"));
- }
- base_conf__ = map.next_value()?;
- }
- GeneratedField::HasHeader => {
- if has_header__.is_some() {
- return Err(serde::de::Error::duplicate_field("hasHeader"));
- }
- has_header__ = Some(map.next_value()?);
- }
- GeneratedField::Delimiter => {
- if delimiter__.is_some() {
- return Err(serde::de::Error::duplicate_field("delimiter"));
- }
- delimiter__ = Some(map.next_value()?);
- }
- }
- }
- Ok(CsvScanExecNode {
- base_conf: base_conf__,
- has_header: has_header__.unwrap_or_default(),
- delimiter: delimiter__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CsvScanExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CubeNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.expr.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CubeNode", len)?;
- if !self.expr.is_empty() {
- struct_ser.serialize_field("expr", &self.expr)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CubeNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "expr",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Expr,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "expr" => Ok(GeneratedField::Expr),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CubeNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CubeNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CubeNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut expr__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Expr => {
- if expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("expr"));
- }
- expr__ = Some(map.next_value()?);
- }
- }
- }
- Ok(CubeNode {
- expr: expr__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CubeNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for CustomTableScanNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.table_name.is_some() {
- len += 1;
- }
- if self.projection.is_some() {
- len += 1;
- }
- if self.schema.is_some() {
- len += 1;
- }
- if !self.filters.is_empty() {
- len += 1;
- }
- if !self.custom_table_data.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.CustomTableScanNode", len)?;
- if let Some(v) = self.table_name.as_ref() {
- struct_ser.serialize_field("tableName", v)?;
- }
- if let Some(v) = self.projection.as_ref() {
- struct_ser.serialize_field("projection", v)?;
- }
- if let Some(v) = self.schema.as_ref() {
- struct_ser.serialize_field("schema", v)?;
- }
- if !self.filters.is_empty() {
- struct_ser.serialize_field("filters", &self.filters)?;
- }
- if !self.custom_table_data.is_empty() {
- struct_ser.serialize_field("customTableData", pbjson::private::base64::encode(&self.custom_table_data).as_str())?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for CustomTableScanNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "table_name",
- "tableName",
- "projection",
- "schema",
- "filters",
- "custom_table_data",
- "customTableData",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- TableName,
- Projection,
- Schema,
- Filters,
- CustomTableData,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "tableName" | "table_name" => Ok(GeneratedField::TableName),
- "projection" => Ok(GeneratedField::Projection),
- "schema" => Ok(GeneratedField::Schema),
- "filters" => Ok(GeneratedField::Filters),
- "customTableData" | "custom_table_data" => Ok(GeneratedField::CustomTableData),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = CustomTableScanNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.CustomTableScanNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CustomTableScanNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut table_name__ = None;
- let mut projection__ = None;
- let mut schema__ = None;
- let mut filters__ = None;
- let mut custom_table_data__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::TableName => {
- if table_name__.is_some() {
- return Err(serde::de::Error::duplicate_field("tableName"));
- }
- table_name__ = map.next_value()?;
- }
- GeneratedField::Projection => {
- if projection__.is_some() {
- return Err(serde::de::Error::duplicate_field("projection"));
- }
- projection__ = map.next_value()?;
- }
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = map.next_value()?;
- }
- GeneratedField::Filters => {
- if filters__.is_some() {
- return Err(serde::de::Error::duplicate_field("filters"));
- }
- filters__ = Some(map.next_value()?);
- }
- GeneratedField::CustomTableData => {
- if custom_table_data__.is_some() {
- return Err(serde::de::Error::duplicate_field("customTableData"));
- }
- custom_table_data__ =
- Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
- ;
- }
- }
- }
- Ok(CustomTableScanNode {
- table_name: table_name__,
- projection: projection__,
- schema: schema__,
- filters: filters__.unwrap_or_default(),
- custom_table_data: custom_table_data__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.CustomTableScanNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for DateUnit {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- let variant = match self {
- Self::Day => "Day",
- Self::DateMillisecond => "DateMillisecond",
- };
- serializer.serialize_str(variant)
- }
-}
-impl<'de> serde::Deserialize<'de> for DateUnit {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "Day",
- "DateMillisecond",
- ];
-
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = DateUnit;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- use std::convert::TryFrom;
- i32::try_from(v)
- .ok()
- .and_then(DateUnit::from_i32)
- .ok_or_else(|| {
- serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
- })
- }
-
- fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- use std::convert::TryFrom;
- i32::try_from(v)
- .ok()
- .and_then(DateUnit::from_i32)
- .ok_or_else(|| {
- serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
- })
- }
-
- fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
- where
- E: serde::de::Error,
- {
- match value {
- "Day" => Ok(DateUnit::Day),
- "DateMillisecond" => Ok(DateUnit::DateMillisecond),
- _ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_any(GeneratedVisitor)
- }
-}
-impl serde::Serialize for Decimal {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.precision != 0 {
- len += 1;
- }
- if self.scale != 0 {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.Decimal", len)?;
- if self.precision != 0 {
- struct_ser.serialize_field("precision", &self.precision)?;
- }
- if self.scale != 0 {
- struct_ser.serialize_field("scale", &self.scale)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for Decimal {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "precision",
- "scale",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Precision,
- Scale,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "precision" => Ok(GeneratedField::Precision),
- "scale" => Ok(GeneratedField::Scale),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = Decimal;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.Decimal")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Decimal, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut precision__ = None;
- let mut scale__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Precision => {
- if precision__.is_some() {
- return Err(serde::de::Error::duplicate_field("precision"));
- }
- precision__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- GeneratedField::Scale => {
- if scale__.is_some() {
- return Err(serde::de::Error::duplicate_field("scale"));
- }
- scale__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- }
- }
- Ok(Decimal {
- precision: precision__.unwrap_or_default(),
- scale: scale__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.Decimal", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for Decimal128 {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.value.is_empty() {
- len += 1;
- }
- if self.p != 0 {
- len += 1;
- }
- if self.s != 0 {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.Decimal128", len)?;
- if !self.value.is_empty() {
- struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?;
- }
- if self.p != 0 {
- struct_ser.serialize_field("p", ToString::to_string(&self.p).as_str())?;
- }
- if self.s != 0 {
- struct_ser.serialize_field("s", ToString::to_string(&self.s).as_str())?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for Decimal128 {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "value",
- "p",
- "s",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Value,
- P,
- S,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "value" => Ok(GeneratedField::Value),
- "p" => Ok(GeneratedField::P),
- "s" => Ok(GeneratedField::S),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = Decimal128;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.Decimal128")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Decimal128, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut value__ = None;
- let mut p__ = None;
- let mut s__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Value => {
- if value__.is_some() {
- return Err(serde::de::Error::duplicate_field("value"));
- }
- value__ =
- Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
- ;
- }
- GeneratedField::P => {
- if p__.is_some() {
- return Err(serde::de::Error::duplicate_field("p"));
- }
- p__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- GeneratedField::S => {
- if s__.is_some() {
- return Err(serde::de::Error::duplicate_field("s"));
- }
- s__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- }
- }
- Ok(Decimal128 {
- value: value__.unwrap_or_default(),
- p: p__.unwrap_or_default(),
- s: s__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.Decimal128", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for DfField {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.field.is_some() {
- len += 1;
- }
- if self.qualifier.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.DfField", len)?;
- if let Some(v) = self.field.as_ref() {
- struct_ser.serialize_field("field", v)?;
- }
- if let Some(v) = self.qualifier.as_ref() {
- struct_ser.serialize_field("qualifier", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for DfField {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "field",
- "qualifier",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Field,
- Qualifier,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "field" => Ok(GeneratedField::Field),
- "qualifier" => Ok(GeneratedField::Qualifier),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = DfField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.DfField")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<DfField, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut field__ = None;
- let mut qualifier__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Field => {
- if field__.is_some() {
- return Err(serde::de::Error::duplicate_field("field"));
- }
- field__ = map.next_value()?;
- }
- GeneratedField::Qualifier => {
- if qualifier__.is_some() {
- return Err(serde::de::Error::duplicate_field("qualifier"));
- }
- qualifier__ = map.next_value()?;
- }
- }
- }
- Ok(DfField {
- field: field__,
- qualifier: qualifier__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.DfField", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for DfSchema {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.columns.is_empty() {
- len += 1;
- }
- if !self.metadata.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.DfSchema", len)?;
- if !self.columns.is_empty() {
- struct_ser.serialize_field("columns", &self.columns)?;
- }
- if !self.metadata.is_empty() {
- struct_ser.serialize_field("metadata", &self.metadata)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for DfSchema {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "columns",
- "metadata",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Columns,
- Metadata,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "columns" => Ok(GeneratedField::Columns),
- "metadata" => Ok(GeneratedField::Metadata),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = DfSchema;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.DfSchema")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<DfSchema, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut columns__ = None;
- let mut metadata__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Columns => {
- if columns__.is_some() {
- return Err(serde::de::Error::duplicate_field("columns"));
- }
- columns__ = Some(map.next_value()?);
- }
- GeneratedField::Metadata => {
- if metadata__.is_some() {
- return Err(serde::de::Error::duplicate_field("metadata"));
- }
- metadata__ = Some(
- map.next_value::<std::collections::HashMap<_, _>>()?
- );
- }
- }
- }
- Ok(DfSchema {
- columns: columns__.unwrap_or_default(),
- metadata: metadata__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.DfSchema", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for Dictionary {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.key.is_some() {
- len += 1;
- }
- if self.value.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.Dictionary", len)?;
- if let Some(v) = self.key.as_ref() {
- struct_ser.serialize_field("key", v)?;
- }
- if let Some(v) = self.value.as_ref() {
- struct_ser.serialize_field("value", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for Dictionary {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "key",
- "value",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Key,
- Value,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "key" => Ok(GeneratedField::Key),
- "value" => Ok(GeneratedField::Value),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = Dictionary;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.Dictionary")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Dictionary, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut key__ = None;
- let mut value__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Key => {
- if key__.is_some() {
- return Err(serde::de::Error::duplicate_field("key"));
- }
- key__ = map.next_value()?;
- }
- GeneratedField::Value => {
- if value__.is_some() {
- return Err(serde::de::Error::duplicate_field("value"));
- }
- value__ = map.next_value()?;
- }
- }
- }
- Ok(Dictionary {
- key: key__,
- value: value__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.Dictionary", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for DistinctNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.input.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.DistinctNode", len)?;
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for DistinctNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "input",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Input,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "input" => Ok(GeneratedField::Input),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = DistinctNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.DistinctNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<DistinctNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut input__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- }
- }
- Ok(DistinctNode {
- input: input__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.DistinctNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for DropViewNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.name.is_some() {
- len += 1;
- }
- if self.if_exists {
- len += 1;
- }
- if self.schema.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.DropViewNode", len)?;
- if let Some(v) = self.name.as_ref() {
- struct_ser.serialize_field("name", v)?;
- }
- if self.if_exists {
- struct_ser.serialize_field("ifExists", &self.if_exists)?;
- }
- if let Some(v) = self.schema.as_ref() {
- struct_ser.serialize_field("schema", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for DropViewNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "name",
- "if_exists",
- "ifExists",
- "schema",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Name,
- IfExists,
- Schema,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "name" => Ok(GeneratedField::Name),
- "ifExists" | "if_exists" => Ok(GeneratedField::IfExists),
- "schema" => Ok(GeneratedField::Schema),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = DropViewNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.DropViewNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<DropViewNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut name__ = None;
- let mut if_exists__ = None;
- let mut schema__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Name => {
- if name__.is_some() {
- return Err(serde::de::Error::duplicate_field("name"));
- }
- name__ = map.next_value()?;
- }
- GeneratedField::IfExists => {
- if if_exists__.is_some() {
- return Err(serde::de::Error::duplicate_field("ifExists"));
- }
- if_exists__ = Some(map.next_value()?);
- }
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = map.next_value()?;
- }
- }
- }
- Ok(DropViewNode {
- name: name__,
- if_exists: if_exists__.unwrap_or_default(),
- schema: schema__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.DropViewNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for EmptyExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.produce_one_row {
- len += 1;
- }
- if self.schema.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.EmptyExecNode", len)?;
- if self.produce_one_row {
- struct_ser.serialize_field("produceOneRow", &self.produce_one_row)?;
- }
- if let Some(v) = self.schema.as_ref() {
- struct_ser.serialize_field("schema", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for EmptyExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "produce_one_row",
- "produceOneRow",
- "schema",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- ProduceOneRow,
- Schema,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "produceOneRow" | "produce_one_row" => Ok(GeneratedField::ProduceOneRow),
- "schema" => Ok(GeneratedField::Schema),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = EmptyExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.EmptyExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<EmptyExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut produce_one_row__ = None;
- let mut schema__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::ProduceOneRow => {
- if produce_one_row__.is_some() {
- return Err(serde::de::Error::duplicate_field("produceOneRow"));
- }
- produce_one_row__ = Some(map.next_value()?);
- }
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = map.next_value()?;
- }
- }
- }
- Ok(EmptyExecNode {
- produce_one_row: produce_one_row__.unwrap_or_default(),
- schema: schema__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.EmptyExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for EmptyMessage {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let len = 0;
- let struct_ser = serializer.serialize_struct("datafusion.EmptyMessage", len)?;
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for EmptyMessage {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- Err(serde::de::Error::unknown_field(value, FIELDS))
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = EmptyMessage;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.EmptyMessage")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<EmptyMessage, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- while map.next_key::<GeneratedField>()?.is_some() {
- let _ = map.next_value::<serde::de::IgnoredAny>()?;
- }
- Ok(EmptyMessage {
- })
- }
- }
- deserializer.deserialize_struct("datafusion.EmptyMessage", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for EmptyRelationNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.produce_one_row {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.EmptyRelationNode", len)?;
- if self.produce_one_row {
- struct_ser.serialize_field("produceOneRow", &self.produce_one_row)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for EmptyRelationNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "produce_one_row",
- "produceOneRow",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- ProduceOneRow,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "produceOneRow" | "produce_one_row" => Ok(GeneratedField::ProduceOneRow),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = EmptyRelationNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.EmptyRelationNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<EmptyRelationNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut produce_one_row__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::ProduceOneRow => {
- if produce_one_row__.is_some() {
- return Err(serde::de::Error::duplicate_field("produceOneRow"));
- }
- produce_one_row__ = Some(map.next_value()?);
- }
- }
- }
- Ok(EmptyRelationNode {
- produce_one_row: produce_one_row__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.EmptyRelationNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for ExplainExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.schema.is_some() {
- len += 1;
- }
- if !self.stringified_plans.is_empty() {
- len += 1;
- }
- if self.verbose {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.ExplainExecNode", len)?;
- if let Some(v) = self.schema.as_ref() {
- struct_ser.serialize_field("schema", v)?;
- }
- if !self.stringified_plans.is_empty() {
- struct_ser.serialize_field("stringifiedPlans", &self.stringified_plans)?;
- }
- if self.verbose {
- struct_ser.serialize_field("verbose", &self.verbose)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for ExplainExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "schema",
- "stringified_plans",
- "stringifiedPlans",
- "verbose",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Schema,
- StringifiedPlans,
- Verbose,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "schema" => Ok(GeneratedField::Schema),
- "stringifiedPlans" | "stringified_plans" => Ok(GeneratedField::StringifiedPlans),
- "verbose" => Ok(GeneratedField::Verbose),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = ExplainExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.ExplainExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ExplainExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut schema__ = None;
- let mut stringified_plans__ = None;
- let mut verbose__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = map.next_value()?;
- }
- GeneratedField::StringifiedPlans => {
- if stringified_plans__.is_some() {
- return Err(serde::de::Error::duplicate_field("stringifiedPlans"));
- }
- stringified_plans__ = Some(map.next_value()?);
- }
- GeneratedField::Verbose => {
- if verbose__.is_some() {
- return Err(serde::de::Error::duplicate_field("verbose"));
- }
- verbose__ = Some(map.next_value()?);
- }
- }
- }
- Ok(ExplainExecNode {
- schema: schema__,
- stringified_plans: stringified_plans__.unwrap_or_default(),
- verbose: verbose__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.ExplainExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for ExplainNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.input.is_some() {
- len += 1;
- }
- if self.verbose {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.ExplainNode", len)?;
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- if self.verbose {
- struct_ser.serialize_field("verbose", &self.verbose)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for ExplainNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "input",
- "verbose",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Input,
- Verbose,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "input" => Ok(GeneratedField::Input),
- "verbose" => Ok(GeneratedField::Verbose),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = ExplainNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.ExplainNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ExplainNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut input__ = None;
- let mut verbose__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- GeneratedField::Verbose => {
- if verbose__.is_some() {
- return Err(serde::de::Error::duplicate_field("verbose"));
- }
- verbose__ = Some(map.next_value()?);
- }
- }
- }
- Ok(ExplainNode {
- input: input__,
- verbose: verbose__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.ExplainNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for Field {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.name.is_empty() {
- len += 1;
- }
- if self.arrow_type.is_some() {
- len += 1;
- }
- if self.nullable {
- len += 1;
- }
- if !self.children.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.Field", len)?;
- if !self.name.is_empty() {
- struct_ser.serialize_field("name", &self.name)?;
- }
- if let Some(v) = self.arrow_type.as_ref() {
- struct_ser.serialize_field("arrowType", v)?;
- }
- if self.nullable {
- struct_ser.serialize_field("nullable", &self.nullable)?;
- }
- if !self.children.is_empty() {
- struct_ser.serialize_field("children", &self.children)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for Field {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "name",
- "arrow_type",
- "arrowType",
- "nullable",
- "children",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Name,
- ArrowType,
- Nullable,
- Children,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "name" => Ok(GeneratedField::Name),
- "arrowType" | "arrow_type" => Ok(GeneratedField::ArrowType),
- "nullable" => Ok(GeneratedField::Nullable),
- "children" => Ok(GeneratedField::Children),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = Field;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.Field")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Field, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut name__ = None;
- let mut arrow_type__ = None;
- let mut nullable__ = None;
- let mut children__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Name => {
- if name__.is_some() {
- return Err(serde::de::Error::duplicate_field("name"));
- }
- name__ = Some(map.next_value()?);
- }
- GeneratedField::ArrowType => {
- if arrow_type__.is_some() {
- return Err(serde::de::Error::duplicate_field("arrowType"));
- }
- arrow_type__ = map.next_value()?;
- }
- GeneratedField::Nullable => {
- if nullable__.is_some() {
- return Err(serde::de::Error::duplicate_field("nullable"));
- }
- nullable__ = Some(map.next_value()?);
- }
- GeneratedField::Children => {
- if children__.is_some() {
- return Err(serde::de::Error::duplicate_field("children"));
- }
- children__ = Some(map.next_value()?);
- }
- }
- }
- Ok(Field {
- name: name__.unwrap_or_default(),
- arrow_type: arrow_type__,
- nullable: nullable__.unwrap_or_default(),
- children: children__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.Field", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for FileGroup {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.files.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.FileGroup", len)?;
- if !self.files.is_empty() {
- struct_ser.serialize_field("files", &self.files)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for FileGroup {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "files",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Files,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "files" => Ok(GeneratedField::Files),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = FileGroup;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.FileGroup")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FileGroup, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut files__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Files => {
- if files__.is_some() {
- return Err(serde::de::Error::duplicate_field("files"));
- }
- files__ = Some(map.next_value()?);
- }
- }
- }
- Ok(FileGroup {
- files: files__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.FileGroup", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for FileRange {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.start != 0 {
- len += 1;
- }
- if self.end != 0 {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.FileRange", len)?;
- if self.start != 0 {
- struct_ser.serialize_field("start", ToString::to_string(&self.start).as_str())?;
- }
- if self.end != 0 {
- struct_ser.serialize_field("end", ToString::to_string(&self.end).as_str())?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for FileRange {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "start",
- "end",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Start,
- End,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "start" => Ok(GeneratedField::Start),
- "end" => Ok(GeneratedField::End),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = FileRange;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.FileRange")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FileRange, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut start__ = None;
- let mut end__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Start => {
- if start__.is_some() {
- return Err(serde::de::Error::duplicate_field("start"));
- }
- start__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- GeneratedField::End => {
- if end__.is_some() {
- return Err(serde::de::Error::duplicate_field("end"));
- }
- end__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- }
- }
- Ok(FileRange {
- start: start__.unwrap_or_default(),
- end: end__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.FileRange", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for FileScanExecConf {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.file_groups.is_empty() {
- len += 1;
- }
- if self.schema.is_some() {
- len += 1;
- }
- if !self.projection.is_empty() {
- len += 1;
- }
- if self.limit.is_some() {
- len += 1;
- }
- if self.statistics.is_some() {
- len += 1;
- }
- if !self.table_partition_cols.is_empty() {
- len += 1;
- }
- if !self.object_store_url.is_empty() {
- len += 1;
- }
- if !self.output_ordering.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.FileScanExecConf", len)?;
- if !self.file_groups.is_empty() {
- struct_ser.serialize_field("fileGroups", &self.file_groups)?;
- }
- if let Some(v) = self.schema.as_ref() {
- struct_ser.serialize_field("schema", v)?;
- }
- if !self.projection.is_empty() {
- struct_ser.serialize_field("projection", &self.projection)?;
- }
- if let Some(v) = self.limit.as_ref() {
- struct_ser.serialize_field("limit", v)?;
- }
- if let Some(v) = self.statistics.as_ref() {
- struct_ser.serialize_field("statistics", v)?;
- }
- if !self.table_partition_cols.is_empty() {
- struct_ser.serialize_field("tablePartitionCols", &self.table_partition_cols)?;
- }
- if !self.object_store_url.is_empty() {
- struct_ser.serialize_field("objectStoreUrl", &self.object_store_url)?;
- }
- if !self.output_ordering.is_empty() {
- struct_ser.serialize_field("outputOrdering", &self.output_ordering)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for FileScanExecConf {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "file_groups",
- "fileGroups",
- "schema",
- "projection",
- "limit",
- "statistics",
- "table_partition_cols",
- "tablePartitionCols",
- "object_store_url",
- "objectStoreUrl",
- "output_ordering",
- "outputOrdering",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- FileGroups,
- Schema,
- Projection,
- Limit,
- Statistics,
- TablePartitionCols,
- ObjectStoreUrl,
- OutputOrdering,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "fileGroups" | "file_groups" => Ok(GeneratedField::FileGroups),
- "schema" => Ok(GeneratedField::Schema),
- "projection" => Ok(GeneratedField::Projection),
- "limit" => Ok(GeneratedField::Limit),
- "statistics" => Ok(GeneratedField::Statistics),
- "tablePartitionCols" | "table_partition_cols" => Ok(GeneratedField::TablePartitionCols),
- "objectStoreUrl" | "object_store_url" => Ok(GeneratedField::ObjectStoreUrl),
- "outputOrdering" | "output_ordering" => Ok(GeneratedField::OutputOrdering),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = FileScanExecConf;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.FileScanExecConf")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FileScanExecConf, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut file_groups__ = None;
- let mut schema__ = None;
- let mut projection__ = None;
- let mut limit__ = None;
- let mut statistics__ = None;
- let mut table_partition_cols__ = None;
- let mut object_store_url__ = None;
- let mut output_ordering__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::FileGroups => {
- if file_groups__.is_some() {
- return Err(serde::de::Error::duplicate_field("fileGroups"));
- }
- file_groups__ = Some(map.next_value()?);
- }
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = map.next_value()?;
- }
- GeneratedField::Projection => {
- if projection__.is_some() {
- return Err(serde::de::Error::duplicate_field("projection"));
- }
- projection__ =
- Some(map.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
- .into_iter().map(|x| x.0).collect())
- ;
- }
- GeneratedField::Limit => {
- if limit__.is_some() {
- return Err(serde::de::Error::duplicate_field("limit"));
- }
- limit__ = map.next_value()?;
- }
- GeneratedField::Statistics => {
- if statistics__.is_some() {
- return Err(serde::de::Error::duplicate_field("statistics"));
- }
- statistics__ = map.next_value()?;
- }
- GeneratedField::TablePartitionCols => {
- if table_partition_cols__.is_some() {
- return Err(serde::de::Error::duplicate_field("tablePartitionCols"));
- }
- table_partition_cols__ = Some(map.next_value()?);
- }
- GeneratedField::ObjectStoreUrl => {
- if object_store_url__.is_some() {
- return Err(serde::de::Error::duplicate_field("objectStoreUrl"));
- }
- object_store_url__ = Some(map.next_value()?);
- }
- GeneratedField::OutputOrdering => {
- if output_ordering__.is_some() {
- return Err(serde::de::Error::duplicate_field("outputOrdering"));
- }
- output_ordering__ = Some(map.next_value()?);
- }
- }
- }
- Ok(FileScanExecConf {
- file_groups: file_groups__.unwrap_or_default(),
- schema: schema__,
- projection: projection__.unwrap_or_default(),
- limit: limit__,
- statistics: statistics__,
- table_partition_cols: table_partition_cols__.unwrap_or_default(),
- object_store_url: object_store_url__.unwrap_or_default(),
- output_ordering: output_ordering__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.FileScanExecConf", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for FilterExecNode {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.input.is_some() {
- len += 1;
- }
- if self.expr.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.FilterExecNode", len)?;
- if let Some(v) = self.input.as_ref() {
- struct_ser.serialize_field("input", v)?;
- }
- if let Some(v) = self.expr.as_ref() {
- struct_ser.serialize_field("expr", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for FilterExecNode {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "input",
- "expr",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Input,
- Expr,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "input" => Ok(GeneratedField::Input),
- "expr" => Ok(GeneratedField::Expr),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = FilterExecNode;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.FilterExecNode")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FilterExecNode, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut input__ = None;
- let mut expr__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Input => {
- if input__.is_some() {
- return Err(serde::de::Error::duplicate_field("input"));
- }
- input__ = map.next_value()?;
- }
- GeneratedField::Expr => {
- if expr__.is_some() {
- return Err(serde::de::Error::duplicate_field("expr"));
- }
- expr__ = map.next_value()?;
- }
- }
- }
- Ok(FilterExecNode {
- input: input__,
- expr: expr__,
- })
- }
- }
- deserializer.deserialize_struct("datafusion.FilterExecNode", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for FixedSizeBinary {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.length != 0 {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.FixedSizeBinary", len)?;
- if self.length != 0 {
- struct_ser.serialize_field("length", &self.length)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for FixedSizeBinary {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "length",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Length,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "length" => Ok(GeneratedField::Length),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = FixedSizeBinary;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.FixedSizeBinary")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FixedSizeBinary, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut length__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Length => {
- if length__.is_some() {
- return Err(serde::de::Error::duplicate_field("length"));
- }
- length__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- }
- }
- Ok(FixedSizeBinary {
- length: length__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.FixedSizeBinary", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for FixedSizeList {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.field_type.is_some() {
- len += 1;
- }
- if self.list_size != 0 {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.FixedSizeList", len)?;
- if let Some(v) = self.field_type.as_ref() {
- struct_ser.serialize_field("fieldType", v)?;
- }
- if self.list_size != 0 {
- struct_ser.serialize_field("listSize", &self.list_size)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for FixedSizeList {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "field_type",
- "fieldType",
- "list_size",
- "listSize",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- FieldType,
- ListSize,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "fieldType" | "field_type" => Ok(GeneratedField::FieldType),
- "listSize" | "list_size" => Ok(GeneratedField::ListSize),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = FixedSizeList;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.FixedSizeList")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FixedSizeList, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut field_type__ = None;
- let mut list_size__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::FieldType => {
- if field_type__.is_some() {
- return Err(serde::de::Error::duplicate_field("fieldType"));
- }
- field_type__ = map.next_value()?;
- }
- GeneratedField::ListSize => {
- if list_size__.is_some() {
- return Err(serde::de::Error::duplicate_field("listSize"));
- }
- list_size__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
- ;
- }
- }
- }
- Ok(FixedSizeList {
- field_type: field_type__,
- list_size: list_size__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.FixedSizeList", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for FullTableReference {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if !self.catalog.is_empty() {
- len += 1;
- }
- if !self.schema.is_empty() {
- len += 1;
- }
- if !self.table.is_empty() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.FullTableReference", len)?;
- if !self.catalog.is_empty() {
- struct_ser.serialize_field("catalog", &self.catalog)?;
- }
- if !self.schema.is_empty() {
- struct_ser.serialize_field("schema", &self.schema)?;
- }
- if !self.table.is_empty() {
- struct_ser.serialize_field("table", &self.table)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for FullTableReference {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "catalog",
- "schema",
- "table",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Catalog,
- Schema,
- Table,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "catalog" => Ok(GeneratedField::Catalog),
- "schema" => Ok(GeneratedField::Schema),
- "table" => Ok(GeneratedField::Table),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = FullTableReference;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.FullTableReference")
- }
-
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FullTableReference, V::Error>
- where
- V: serde::de::MapAccess<'de>,
- {
- let mut catalog__ = None;
- let mut schema__ = None;
- let mut table__ = None;
- while let Some(k) = map.next_key()? {
- match k {
- GeneratedField::Catalog => {
- if catalog__.is_some() {
- return Err(serde::de::Error::duplicate_field("catalog"));
- }
- catalog__ = Some(map.next_value()?);
- }
- GeneratedField::Schema => {
- if schema__.is_some() {
- return Err(serde::de::Error::duplicate_field("schema"));
- }
- schema__ = Some(map.next_value()?);
- }
- GeneratedField::Table => {
- if table__.is_some() {
- return Err(serde::de::Error::duplicate_field("table"));
- }
- table__ = Some(map.next_value()?);
- }
- }
- }
- Ok(FullTableReference {
- catalog: catalog__.unwrap_or_default(),
- schema: schema__.unwrap_or_default(),
- table: table__.unwrap_or_default(),
- })
- }
- }
- deserializer.deserialize_struct("datafusion.FullTableReference", FIELDS, GeneratedVisitor)
- }
-}
-impl serde::Serialize for GetIndexedField {
- #[allow(deprecated)]
- fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- use serde::ser::SerializeStruct;
- let mut len = 0;
- if self.expr.is_some() {
- len += 1;
- }
- if self.key.is_some() {
- len += 1;
- }
- let mut struct_ser = serializer.serialize_struct("datafusion.GetIndexedField", len)?;
- if let Some(v) = self.expr.as_ref() {
- struct_ser.serialize_field("expr", v)?;
- }
- if let Some(v) = self.key.as_ref() {
- struct_ser.serialize_field("key", v)?;
- }
- struct_ser.end()
- }
-}
-impl<'de> serde::Deserialize<'de> for GetIndexedField {
- #[allow(deprecated)]
- fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- const FIELDS: &[&str] = &[
- "expr",
- "key",
- ];
-
- #[allow(clippy::enum_variant_names)]
- enum GeneratedField {
- Expr,
- Key,
- }
- impl<'de> serde::Deserialize<'de> for GeneratedField {
- fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- struct GeneratedVisitor;
-
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GeneratedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(formatter, "expected one of: {:?}", &FIELDS)
- }
-
- #[allow(unused_variables)]
- fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
- where
- E: serde::de::Error,
- {
- match value {
- "expr" => Ok(GeneratedField::Expr),
- "key" => Ok(GeneratedField::Key),
- _ => Err(serde::de::Error::unknown_field(value, FIELDS)),
- }
- }
- }
- deserializer.deserialize_identifier(GeneratedVisitor)
- }
- }
- struct GeneratedVisitor;
- impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
- type Value = GetIndexedField;
-
- fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- formatter.write_str("struct datafusion.GetIndexedField")
- }
-
... 15748 lines suppressed ...