Skip to content

Apache DataFusion SQL Query Engine

Update arrow 47.0.0 in DataFusion (#7587)

Raphael Taylor-Davies5f38135d5d21
diff --git a/.github/workflows/docs_pr.yaml b/.github/workflows/docs_pr.yaml
index 6669aa6100..c2f3dd684a 100644
--- a/.github/workflows/docs_pr.yaml
+++ b/.github/workflows/docs_pr.yaml
@@ -47,7 +47,6 @@ jobs:
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- # Note: this does not include dictionary_expressions to reduce codegen
- name: Run doctests
run: cargo test --doc --features avro,json
- name: Verify Working Directory Clean
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 995916ef0d..6989d89878 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -65,7 +65,6 @@ jobs:
- name: Check workspace in debug mode
run: cargo check
- # Note: this does not include dictionary_expressions to reduce codegen
- name: Check workspace with all features
run: cargo check --workspace --benches --features avro,json
- name: Check Cargo.lock for datafusion-cli
@@ -96,7 +95,7 @@ jobs:
with:
rust-version: stable
- name: Run tests (excluding doctests)
- run: cargo test --lib --tests --bins --features avro,json,dictionary_expressions,backtrace
+ run: cargo test --lib --tests --bins --features avro,json,backtrace
- name: Verify Working Directory Clean
run: git diff --exit-code
@@ -177,7 +176,6 @@ jobs:
uses: ./.github/actions/setup-builder
with:
rust-version: stable
- # Note: this does not include dictionary_expressions to reduce codegen
- name: Run doctests
run: |
cargo test --doc --features avro,json
@@ -302,7 +300,7 @@ jobs:
shell: bash
run: |
export PATH=$PATH:$HOME/d/protoc/bin
- cargo test --lib --tests --bins --features avro,json,dictionary_expressions,backtrace
+ cargo test --lib --tests --bins --features avro,json,backtrace
cd datafusion-cli
cargo test --lib --tests --bins --all-features
env:
@@ -338,7 +336,7 @@ jobs:
- name: Run tests (excluding doctests)
shell: bash
run: |
- cargo test --lib --tests --bins --features avro,json,dictionary_expressions,backtrace
+ cargo test --lib --tests --bins --features avro,json,backtrace
cd datafusion-cli
cargo test --lib --tests --bins --all-features
env:
diff --git a/Cargo.toml b/Cargo.toml
index c8ef1736c9..9566769ff4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -47,18 +47,15 @@ rust-version = "1.70"
version = "31.0.0"
[workspace.dependencies]
-arrow = { version = "46.0.0", features = ["prettyprint", "dyn_cmp_dict"] }
-arrow-array = { version = "46.0.0", default-features = false, features = [
- "chrono-tz",
-] }
-arrow-buffer = { version = "46.0.0", default-features = false }
-arrow-flight = { version = "46.0.0", features = ["flight-sql-experimental"] }
-arrow-schema = { version = "46.0.0", default-features = false }
-parquet = { version = "46.0.0", features = ["arrow", "async", "object_store"] }
+arrow = { version = "47.0.0", features = ["prettyprint"] }
+arrow-array = { version = "47.0.0", default-features = false, features = ["chrono-tz"] }
+arrow-buffer = { version = "47.0.0", default-features = false }
+arrow-flight = { version = "47.0.0", features = ["flight-sql-experimental"] }
+arrow-schema = { version = "47.0.0", default-features = false }
+parquet = { version = "47.0.0", features = ["arrow", "async", "object_store"] }
sqlparser = { version = "0.38.0", features = ["visitor"] }
chrono = { version = "0.4.31", default-features = false }
-
[profile.release]
codegen-units = 1
lto = true
diff --git a/datafusion-cli/Cargo.lock b/datafusion-cli/Cargo.lock
index ba733726c3..0ca83452bd 100644
--- a/datafusion-cli/Cargo.lock
+++ b/datafusion-cli/Cargo.lock
@@ -95,9 +95,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]]
name = "arrow"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04a8801ebb147ad240b2d978d3ab9f73c9ccd4557ba6a03e7800496770ed10e0"
+checksum = "7fab9e93ba8ce88a37d5a30dce4b9913b75413dc1ac56cb5d72e5a840543f829"
dependencies = [
"ahash",
"arrow-arith",
@@ -117,9 +117,9 @@ dependencies = [
[[package]]
name = "arrow-arith"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "895263144bd4a69751cbe6a34a53f26626e19770b313a9fa792c415cd0e78f11"
+checksum = "bc1d4e368e87ad9ee64f28b9577a3834ce10fe2703a26b28417d485bbbdff956"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -132,9 +132,9 @@ dependencies = [
[[package]]
name = "arrow-array"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "226fdc6c3a4ae154a74c24091d36a90b514f0ed7112f5b8322c1d8f354d8e20d"
+checksum = "d02efa7253ede102d45a4e802a129e83bcc3f49884cab795b1ac223918e4318d"
dependencies = [
"ahash",
"arrow-buffer",
@@ -149,9 +149,9 @@ dependencies = [
[[package]]
name = "arrow-buffer"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc4843af4dd679c2f35b69c572874da8fde33be53eb549a5fb128e7a4b763510"
+checksum = "fda119225204141138cb0541c692fbfef0e875ba01bfdeaed09e9d354f9d6195"
dependencies = [
"bytes",
"half",
@@ -160,9 +160,9 @@ dependencies = [
[[package]]
name = "arrow-cast"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "35e8b9990733a9b635f656efda3c9b8308c7a19695c9ec2c7046dd154f9b144b"
+checksum = "1d825d51b9968868d50bc5af92388754056796dbc62a4e25307d588a1fc84dee"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -178,9 +178,9 @@ dependencies = [
[[package]]
name = "arrow-csv"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "646fbb4e11dd0afb8083e883f53117713b8caadb4413b3c9e63e3f535da3683c"
+checksum = "43ef855dc6b126dc197f43e061d4de46b9d4c033aa51c2587657f7508242cef1"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -197,9 +197,9 @@ dependencies = [
[[package]]
name = "arrow-data"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da900f31ff01a0a84da0572209be72b2b6f980f3ea58803635de47913191c188"
+checksum = "475a4c3699c8b4095ca61cecf15da6f67841847a5f5aac983ccb9a377d02f73a"
dependencies = [
"arrow-buffer",
"arrow-schema",
@@ -209,9 +209,9 @@ dependencies = [
[[package]]
name = "arrow-ipc"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2707a8d7ee2d345d045283ece3ae43416175873483e5d96319c929da542a0b1f"
+checksum = "1248005c8ac549f869b7a840859d942bf62471479c1a2d82659d453eebcd166a"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -223,9 +223,9 @@ dependencies = [
[[package]]
name = "arrow-json"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d1b91a63c356d14eedc778b76d66a88f35ac8498426bb0799a769a49a74a8b4"
+checksum = "f03d7e3b04dd688ccec354fe449aed56b831679f03e44ee2c1cfc4045067b69c"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -243,9 +243,9 @@ dependencies = [
[[package]]
name = "arrow-ord"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "584325c91293abbca7aaaabf8da9fe303245d641f5f4a18a6058dc68009c7ebf"
+checksum = "03b87aa408ea6a6300e49eb2eba0c032c88ed9dc19e0a9948489c55efdca71f4"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -258,9 +258,9 @@ dependencies = [
[[package]]
name = "arrow-row"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e32afc1329f7b372463b21c6ca502b07cf237e1ed420d87706c1770bb0ebd38"
+checksum = "114a348ab581e7c9b6908fcab23cb39ff9f060eb19e72b13f8fb8eaa37f65d22"
dependencies = [
"ahash",
"arrow-array",
@@ -273,16 +273,17 @@ dependencies = [
[[package]]
name = "arrow-schema"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b104f5daa730f00fde22adc03a12aa5a2ae9ccbbf99cbd53d284119ddc90e03d"
+checksum = "5d1d179c117b158853e0101bfbed5615e86fe97ee356b4af901f1c5001e1ce4b"
[[package]]
name = "arrow-select"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73b3ca55356d1eae07cf48808d8c462cea674393ae6ad1e0b120f40b422eb2b4"
+checksum = "d5c71e003202e67e9db139e5278c79f5520bb79922261dfe140e4637ee8b6108"
dependencies = [
+ "ahash",
"arrow-array",
"arrow-buffer",
"arrow-data",
@@ -292,9 +293,9 @@ dependencies = [
[[package]]
name = "arrow-string"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af1433ce02590cae68da0a18ed3a3ed868ffac2c6f24c533ddd2067f7ee04b4a"
+checksum = "c4cebbb282d6b9244895f4a9a912e55e57bce112554c7fa91fcec5459cb421ab"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -2292,9 +2293,9 @@ dependencies = [
[[package]]
name = "parquet"
-version = "46.0.0"
+version = "47.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ad2cba786ae07da4d73371a88b9e0f9d3ffac1a9badc83922e0e15814f5c5fa"
+checksum = "0463cc3b256d5f50408c49a4be3a16674f4c8ceef60941709620a062b1f6bf4d"
dependencies = [
"ahash",
"arrow-array",
diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml
index e77ad7d85e..a550b48750 100644
--- a/datafusion-cli/Cargo.toml
+++ b/datafusion-cli/Cargo.toml
@@ -29,7 +29,7 @@ rust-version = "1.70"
readme = "README.md"
[dependencies]
-arrow = "46.0.0"
+arrow = "47.0.0"
async-trait = "0.1.41"
aws-config = "0.55"
aws-credential-types = "0.55"
diff --git a/datafusion-examples/Cargo.toml b/datafusion-examples/Cargo.toml
index 22cc3f4df4..d928f0177d 100644
--- a/datafusion-examples/Cargo.toml
+++ b/datafusion-examples/Cargo.toml
@@ -47,12 +47,12 @@ log = "0.4"
mimalloc = { version = "0.1", default-features = false }
num_cpus = "1.13.0"
object_store = { version = "0.7.0", features = ["aws"] }
-prost = { version = "0.11", default-features = false }
+prost = { version = "0.12", default-features = false }
prost-derive = { version = "0.11", default-features = false }
serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.82"
tempfile = "3"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "parking_lot"] }
-tonic = "0.9"
+tonic = "0.10"
url = "2.2"
uuid = "1.2"
diff --git a/datafusion-examples/examples/flight_sql_server.rs b/datafusion-examples/examples/flight_sql_server.rs
index 1cf288b7d2..aad63fc2bc 100644
--- a/datafusion-examples/examples/flight_sql_server.rs
+++ b/datafusion-examples/examples/flight_sql_server.rs
@@ -20,7 +20,7 @@ use arrow::record_batch::RecordBatch;
use arrow_flight::encode::FlightDataEncoderBuilder;
use arrow_flight::flight_descriptor::DescriptorType;
use arrow_flight::flight_service_server::{FlightService, FlightServiceServer};
-use arrow_flight::sql::server::FlightSqlService;
+use arrow_flight::sql::server::{FlightSqlService, PeekableFlightDataStream};
use arrow_flight::sql::{
ActionBeginSavepointRequest, ActionBeginSavepointResult,
ActionBeginTransactionRequest, ActionBeginTransactionResult,
@@ -36,7 +36,7 @@ use arrow_flight::sql::{
TicketStatementQuery,
};
use arrow_flight::{
- Action, FlightData, FlightDescriptor, FlightEndpoint, FlightInfo, HandshakeRequest,
+ Action, FlightDescriptor, FlightEndpoint, FlightInfo, HandshakeRequest,
HandshakeResponse, IpcMessage, SchemaAsIpc, Ticket,
};
use arrow_schema::Schema;
@@ -547,7 +547,7 @@ impl FlightSqlService for FlightSqlServiceImpl {
async fn do_put_statement_update(
&self,
_ticket: CommandStatementUpdate,
- _request: Request<Streaming<FlightData>>,
+ _request: Request<PeekableFlightDataStream>,
) -> Result<i64, Status> {
info!("do_put_statement_update");
Err(Status::unimplemented("Implement do_put_statement_update"))
@@ -556,7 +556,7 @@ impl FlightSqlService for FlightSqlServiceImpl {
async fn do_put_prepared_statement_query(
&self,
_query: CommandPreparedStatementQuery,
- _request: Request<Streaming<FlightData>>,
+ _request: Request<PeekableFlightDataStream>,
) -> Result<Response<<Self as FlightService>::DoPutStream>, Status> {
info!("do_put_prepared_statement_query");
Err(Status::unimplemented(
@@ -567,7 +567,7 @@ impl FlightSqlService for FlightSqlServiceImpl {
async fn do_put_prepared_statement_update(
&self,
_handle: CommandPreparedStatementUpdate,
- _request: Request<Streaming<FlightData>>,
+ _request: Request<PeekableFlightDataStream>,
) -> Result<i64, Status> {
info!("do_put_prepared_statement_update");
// statements like "CREATE TABLE.." or "SET datafusion.nnn.." call this function
@@ -578,7 +578,7 @@ impl FlightSqlService for FlightSqlServiceImpl {
async fn do_put_substrait_plan(
&self,
_query: CommandStatementSubstraitPlan,
- _request: Request<Streaming<FlightData>>,
+ _request: Request<PeekableFlightDataStream>,
) -> Result<i64, Status> {
info!("do_put_prepared_statement_update");
Err(Status::unimplemented(
diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml
index e99ec7ef6f..d8bd11d8e5 100644
--- a/datafusion/core/Cargo.toml
+++ b/datafusion/core/Cargo.toml
@@ -40,9 +40,6 @@ backtrace = ["datafusion-common/backtrace"]
compression = ["xz2", "bzip2", "flate2", "zstd", "async-compression"]
crypto_expressions = ["datafusion-physical-expr/crypto_expressions", "datafusion-optimizer/crypto_expressions"]
default = ["crypto_expressions", "encoding__expressions", "regex_expressions", "unicode_expressions", "compression"]
-# Enables support for non-scalar, binary operations on dictionaries
-# Note: this results in significant additional codegen
-dictionary_expressions = ["datafusion-physical-expr/dictionary_expressions", "datafusion-optimizer/dictionary_expressions"]
encoding__expressions = ["datafusion-physical-expr/encoding_expressions"]
# Used for testing ONLY: causes all values to hash to the same value (test for collisions)
force_hash_collisions = []
diff --git a/datafusion/core/src/datasource/physical_plan/file_stream.rs b/datafusion/core/src/datasource/physical_plan/file_stream.rs
index 71b322de44..af304f40dd 100644
--- a/datafusion/core/src/datasource/physical_plan/file_stream.rs
+++ b/datafusion/core/src/datasource/physical_plan/file_stream.rs
@@ -560,7 +560,7 @@ mod tests {
if self.error_opening_idx.contains(&idx) {
Ok(futures::future::ready(internal_err!("error opening")).boxed())
} else if self.error_scanning_idx.contains(&idx) {
- let error = futures::future::ready(Err(ArrowError::IoError(
+ let error = futures::future::ready(Err(ArrowError::IpcError(
"error scanning".to_owned(),
)));
let stream = futures::stream::once(error).boxed();
diff --git a/datafusion/core/tests/memory_limit.rs b/datafusion/core/tests/memory_limit.rs
index 3367a92302..1041888b95 100644
--- a/datafusion/core/tests/memory_limit.rs
+++ b/datafusion/core/tests/memory_limit.rs
@@ -239,9 +239,7 @@ async fn sort_preserving_merge() {
#[tokio::test]
async fn sort_spill_reservation() {
- let scenario = Scenario::new_dictionary_strings(1)
- // make the batches small enough to avoid triggering CardinalityAwareRowConverter
- .with_single_row_batches(true);
+ let scenario = Scenario::new_dictionary_strings(1);
let partition_size = scenario.partition_size();
let base_config = SessionConfig::new()
@@ -267,15 +265,15 @@ async fn sort_spill_reservation() {
// also merge, so we can ensure the sort could finish
// given enough merging memory
&[
- "+---------------+----------------------------------------------------------------------------------------------------------+",
- "| plan_type | plan |",
- "+---------------+----------------------------------------------------------------------------------------------------------+",
- "| logical_plan | Sort: t.a ASC NULLS LAST, t.b DESC NULLS FIRST |",
- "| | TableScan: t projection=[a, b] |",
- "| physical_plan | SortExec: expr=[a@0 ASC NULLS LAST,b@1 DESC] |",
- "| | MemoryExec: partitions=1, partition_sizes=[245], output_ordering=a@0 ASC NULLS LAST,b@1 ASC NULLS LAST |",
- "| | |",
- "+---------------+----------------------------------------------------------------------------------------------------------+",
+ "+---------------+--------------------------------------------------------------------------------------------------------+",
+ "| plan_type | plan |",
+ "+---------------+--------------------------------------------------------------------------------------------------------+",
+ "| logical_plan | Sort: t.a ASC NULLS LAST, t.b DESC NULLS FIRST |",
+ "| | TableScan: t projection=[a, b] |",
+ "| physical_plan | SortExec: expr=[a@0 ASC NULLS LAST,b@1 DESC] |",
+ "| | MemoryExec: partitions=1, partition_sizes=[5], output_ordering=a@0 ASC NULLS LAST,b@1 ASC NULLS LAST |",
+ "| | |",
+ "+---------------+--------------------------------------------------------------------------------------------------------+",
]
);
@@ -492,19 +490,6 @@ impl Scenario {
}
}
- /// Should the input be split into 1 row batches?
- fn with_single_row_batches(mut self, val: bool) -> Self {
- if let Self::DictionaryStrings {
- single_row_batches, ..
- } = &mut self
- {
- *single_row_batches = val;
- } else {
- panic!("Scenario does not support single row batches");
- }
- self
- }
-
/// return the size, in bytes, of each partition
fn partition_size(&self) -> usize {
if let Self::DictionaryStrings {
diff --git a/datafusion/core/tests/sql/select.rs b/datafusion/core/tests/sql/select.rs
index c05dc31cbe..cda5fba805 100644
--- a/datafusion/core/tests/sql/select.rs
+++ b/datafusion/core/tests/sql/select.rs
@@ -188,7 +188,6 @@ async fn query_nested_get_indexed_field_on_struct() -> Result<()> {
}
#[tokio::test]
-#[cfg(feature = "dictionary_expressions")]
async fn query_on_string_dictionary() -> Result<()> {
// Test to ensure DataFusion can operate on dictionary types
// Use StringDictionary (32 bit indexes = keys)
@@ -214,7 +213,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// Basic SELECT
let sql = "SELECT d1 FROM test";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+",
"| d1 |",
"+-------+",
@@ -228,7 +227,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// basic filtering
let sql = "SELECT d1 FROM test WHERE d1 IS NOT NULL";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+",
"| d1 |",
"+-------+",
@@ -241,7 +240,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// comparison with constant
let sql = "SELECT d1 FROM test WHERE d1 = 'three'";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+",
"| d1 |",
"+-------+",
@@ -253,7 +252,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// comparison with another dictionary column
let sql = "SELECT d1 FROM test WHERE d1 = d2";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+",
"| d1 |",
"+-------+",
@@ -265,7 +264,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// order comparison with another dictionary column
let sql = "SELECT d1 FROM test WHERE d1 <= d2";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+",
"| d1 |",
"+-------+",
@@ -277,7 +276,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// comparison with a non dictionary column
let sql = "SELECT d1 FROM test WHERE d1 = d3";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+",
"| d1 |",
"+-------+",
@@ -289,7 +288,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// filtering with constant
let sql = "SELECT d1 FROM test WHERE d1 = 'three'";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+",
"| d1 |",
"+-------+",
@@ -301,7 +300,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// Expression evaluation
let sql = "SELECT concat(d1, '-foo') FROM test";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+------------------------------+",
"| concat(test.d1,Utf8(\"-foo\")) |",
"+------------------------------+",
@@ -315,7 +314,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// Expression evaluation with two dictionaries
let sql = "SELECT concat(d1, d2) FROM test";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------------------------+",
"| concat(test.d1,test.d2) |",
"+-------------------------+",
@@ -329,7 +328,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// aggregation
let sql = "SELECT COUNT(d1) FROM test";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+----------------+",
"| COUNT(test.d1) |",
"+----------------+",
@@ -341,7 +340,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// aggregation min
let sql = "SELECT MIN(d1) FROM test";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+--------------+",
"| MIN(test.d1) |",
"+--------------+",
@@ -353,7 +352,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// aggregation max
let sql = "SELECT MAX(d1) FROM test";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+--------------+",
"| MAX(test.d1) |",
"+--------------+",
@@ -365,7 +364,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// grouping
let sql = "SELECT d1, COUNT(*) FROM test group by d1";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+----------+",
"| d1 | COUNT(*) |",
"+-------+----------+",
@@ -379,7 +378,7 @@ async fn query_on_string_dictionary() -> Result<()> {
// window functions
let sql = "SELECT d1, row_number() OVER (partition by d1) as rn1 FROM test";
let actual = execute_to_batches(&ctx, sql).await;
- let expected = vec![
+ let expected = [
"+-------+-----+",
"| d1 | rn1 |",
"+-------+-----+",
diff --git a/datafusion/optimizer/Cargo.toml b/datafusion/optimizer/Cargo.toml
index 2fc3b500f1..e1ffcb41ba 100644
--- a/datafusion/optimizer/Cargo.toml
+++ b/datafusion/optimizer/Cargo.toml
@@ -35,7 +35,6 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["datafusion-physical-expr/crypto_expressions"]
default = ["unicode_expressions", "crypto_expressions", "regex_expressions"]
-dictionary_expressions = ["datafusion-physical-expr/dictionary_expressions"]
regex_expressions = ["datafusion-physical-expr/regex_expressions"]
unicode_expressions = ["datafusion-physical-expr/unicode_expressions"]
diff --git a/datafusion/physical-expr/Cargo.toml b/datafusion/physical-expr/Cargo.toml
index cfb8b580ee..2c0ddc692d 100644
--- a/datafusion/physical-expr/Cargo.toml
+++ b/datafusion/physical-expr/Cargo.toml
@@ -35,9 +35,6 @@ path = "src/lib.rs"
[features]
crypto_expressions = ["md-5", "sha2", "blake2", "blake3"]
default = ["crypto_expressions", "regex_expressions", "unicode_expressions", "encoding_expressions"]
-# Enables support for non-scalar, binary operations on dictionaries
-# Note: this results in significant additional codegen
-dictionary_expressions = ["arrow/dyn_cmp_dict"]
encoding_expressions = ["base64", "hex"]
regex_expressions = ["regex"]
unicode_expressions = ["unicode-segmentation"]
diff --git a/datafusion/physical-expr/src/expressions/binary.rs b/datafusion/physical-expr/src/expressions/binary.rs
index f235ea9fcd..f75c2f951f 100644
--- a/datafusion/physical-expr/src/expressions/binary.rs
+++ b/datafusion/physical-expr/src/expressions/binary.rs
@@ -38,12 +38,12 @@ use arrow::compute::kernels::comparison::regexp_is_match_utf8_scalar;
use arrow::compute::kernels::concat_elements::concat_elements_utf8;
use arrow::datatypes::*;
use arrow::record_batch::RecordBatch;
-use arrow_array::Datum;
use datafusion_common::cast::as_boolean_array;
use datafusion_common::{internal_err, DataFusionError, Result, ScalarValue};
use datafusion_expr::type_coercion::binary::get_result_type;
use datafusion_expr::{ColumnarValue, Operator};
+use crate::expressions::datum::{apply, apply_cmp};
use kernels::{
bitwise_and_dyn, bitwise_and_dyn_scalar, bitwise_or_dyn, bitwise_or_dyn_scalar,
bitwise_shift_left_dyn, bitwise_shift_left_dyn_scalar, bitwise_shift_right_dyn,
@@ -132,32 +132,6 @@ macro_rules! compute_utf8_op {
}};
}
-/// Invoke a compute kernel on a data array and a scalar value
-macro_rules! compute_utf8_op_scalar {
- ($LEFT:expr, $RIGHT:expr, $OP:ident, $DT:ident, $OP_TYPE:expr) => {{
- let ll = $LEFT
- .as_any()
- .downcast_ref::<$DT>()
- .expect("compute_op failed to downcast left side array");
- if let ScalarValue::Utf8(Some(string_value))
- | ScalarValue::LargeUtf8(Some(string_value)) = $RIGHT
- {
- Ok(Arc::new(paste::expr! {[<$OP _utf8_scalar>]}(
- &ll,
- &string_value,
- )?))
- } else if $RIGHT.is_null() {
- Ok(Arc::new(new_null_array($OP_TYPE, $LEFT.len())))
- } else {
- internal_err!(
- "compute_utf8_op_scalar for '{}' failed to cast literal value {}",
- stringify!($OP),
- $RIGHT
- )
- }
- }};
-}
-
macro_rules! binary_string_array_op {
($LEFT:expr, $RIGHT:expr, $OP:ident) => {{
match $LEFT.data_type() {
@@ -284,35 +258,37 @@ impl PhysicalExpr for BinaryExpr {
}
fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> {
- let left_value = self.left.evaluate(batch)?;
- let right_value = self.right.evaluate(batch)?;
- let left_data_type = left_value.data_type();
- let right_data_type = right_value.data_type();
+ use arrow::compute::kernels::numeric::*;
+
+ let lhs = self.left.evaluate(batch)?;
+ let rhs = self.right.evaluate(batch)?;
+ let left_data_type = lhs.data_type();
+ let right_data_type = rhs.data_type();
let schema = batch.schema();
let input_schema = schema.as_ref();
- if self.is_datum_operator() {
- return match (&left_value, &right_value) {
- (ColumnarValue::Array(left), ColumnarValue::Array(right)) => {
- self.evaluate_datum(&left.as_ref(), &right.as_ref())
- }
- (ColumnarValue::Scalar(left), ColumnarValue::Array(right)) => {
- self.evaluate_datum(&left.to_scalar(), &right.as_ref())
- }
- (ColumnarValue::Array(left), ColumnarValue::Scalar(right)) => {
- self.evaluate_datum(&left.as_ref(), &right.to_scalar())
- }
- (ColumnarValue::Scalar(left), ColumnarValue::Scalar(right)) => {
- self.evaluate_datum(&left.to_scalar(), &right.to_scalar())
- }
- };
+ match self.op {
+ Operator::Plus => return apply(&lhs, &rhs, add_wrapping),
+ Operator::Minus => return apply(&lhs, &rhs, sub_wrapping),
+ Operator::Multiply => return apply(&lhs, &rhs, mul_wrapping),
+ Operator::Divide => return apply(&lhs, &rhs, div),
+ Operator::Modulo => return apply(&lhs, &rhs, rem),
+ Operator::Eq => return apply_cmp(&lhs, &rhs, eq),
+ Operator::NotEq => return apply_cmp(&lhs, &rhs, neq),
+ Operator::Lt => return apply_cmp(&lhs, &rhs, lt),
+ Operator::Gt => return apply_cmp(&lhs, &rhs, gt),
+ Operator::LtEq => return apply_cmp(&lhs, &rhs, lt_eq),
+ Operator::GtEq => return apply_cmp(&lhs, &rhs, gt_eq),
+ Operator::IsDistinctFrom => return apply_cmp(&lhs, &rhs, distinct),
+ Operator::IsNotDistinctFrom => return apply_cmp(&lhs, &rhs, not_distinct),
+ _ => {}
}
let result_type = self.data_type(input_schema)?;
// Attempt to use special kernels if one input is scalar and the other is an array
- let scalar_result = match (&left_value, &right_value) {
+ let scalar_result = match (&lhs, &rhs) {
(ColumnarValue::Array(array), ColumnarValue::Scalar(scalar)) => {
// if left is array and right is literal - use scalar operations
self.evaluate_array_scalar(array, scalar.clone())?.map(|r| {
@@ -328,8 +304,8 @@ impl PhysicalExpr for BinaryExpr {
// if both arrays or both literals - extract arrays and continue execution
let (left, right) = (
- left_value.into_array(batch.num_rows()),
- right_value.into_array(batch.num_rows()),
+ lhs.into_array(batch.num_rows()),
+ rhs.into_array(batch.num_rows()),
);
self.evaluate_with_resolved_args(left, &left_data_type, right, &right_data_type)
.map(|a| ColumnarValue::Array(a))
@@ -450,46 +426,6 @@ fn to_result_type_array(
}
impl BinaryExpr {
- fn is_datum_operator(&self) -> bool {
- use Operator::*;
- self.op.is_numerical_operators()
- || matches!(
- self.op,
- Lt | LtEq | Gt | GtEq | Eq | NotEq | IsDistinctFrom | IsNotDistinctFrom
- )
- }
-
- /// Evaluate the expression using [`Datum`]
- fn evaluate_datum(
- &self,
- left: &dyn Datum,
- right: &dyn Datum,
- ) -> Result<ColumnarValue> {
- use arrow::compute::kernels::numeric::*;
- let array = match self.op {
- Operator::Plus => add_wrapping(left, right)?,
- Operator::Minus => sub_wrapping(left, right)?,
- Operator::Multiply => mul_wrapping(left, right)?,
- Operator::Divide => div(left, right)?,
- Operator::Modulo => rem(left, right)?,
- Operator::Eq => Arc::new(eq(left, right)?),
- Operator::NotEq => Arc::new(neq(left, right)?),
- Operator::Lt => Arc::new(lt(left, right)?),
- Operator::Gt => Arc::new(gt(left, right)?),
- Operator::LtEq => Arc::new(lt_eq(left, right)?),
- Operator::GtEq => Arc::new(gt_eq(left, right)?),
- Operator::IsDistinctFrom => Arc::new(distinct(left, right)?),
- Operator::IsNotDistinctFrom => Arc::new(not_distinct(left, right)?),
- _ => unreachable!(),
- };
-
- if left.get().1 && right.get().1 {
- let scalar = ScalarValue::try_from_array(array.as_ref(), 0)?;
- return Ok(ColumnarValue::Scalar(scalar));
- }
- Ok(ColumnarValue::Array(array))
- }
-
/// Evaluate the expression of the left input is an array and
/// right is literal - use scalar operations
fn evaluate_array_scalar(
diff --git a/datafusion/physical-expr/src/expressions/datum.rs b/datafusion/physical-expr/src/expressions/datum.rs
new file mode 100644
index 0000000000..f57cbbd4ff
--- /dev/null
+++ b/datafusion/physical-expr/src/expressions/datum.rs
@@ -0,0 +1,58 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use arrow::array::{ArrayRef, Datum};
+use arrow::error::ArrowError;
+use arrow_array::BooleanArray;
+use datafusion_common::{Result, ScalarValue};
+use datafusion_expr::ColumnarValue;
+use std::sync::Arc;
+
+/// Applies a binary [`Datum`] kernel `f` to `lhs` and `rhs`
+///
+/// This maps arrow-rs' [`Datum`] kernels to DataFusion's [`ColumnarValue`] abstraction
+pub(crate) fn apply(
+ lhs: &ColumnarValue,
+ rhs: &ColumnarValue,
+ f: impl Fn(&dyn Datum, &dyn Datum) -> Result<ArrayRef, ArrowError>,
+) -> Result<ColumnarValue> {
+ match (&lhs, &rhs) {
+ (ColumnarValue::Array(left), ColumnarValue::Array(right)) => {
+ Ok(ColumnarValue::Array(f(&left.as_ref(), &right.as_ref())?))
+ }
+ (ColumnarValue::Scalar(left), ColumnarValue::Array(right)) => {
+ Ok(ColumnarValue::Array(f(&left.to_scalar(), &right.as_ref())?))
+ }
+ (ColumnarValue::Array(left), ColumnarValue::Scalar(right)) => {
+ Ok(ColumnarValue::Array(f(&left.as_ref(), &right.to_scalar())?))
+ }
+ (ColumnarValue::Scalar(left), ColumnarValue::Scalar(right)) => {
+ let array = f(&left.to_scalar(), &right.to_scalar())?;
+ let scalar = ScalarValue::try_from_array(array.as_ref(), 0)?;
+ Ok(ColumnarValue::Scalar(scalar))
+ }
+ }
+}
+
+/// Applies a binary [`Datum`] comparison kernel `f` to `lhs` and `rhs`
+pub(crate) fn apply_cmp(
+ lhs: &ColumnarValue,
+ rhs: &ColumnarValue,
+ f: impl Fn(&dyn Datum, &dyn Datum) -> Result<BooleanArray, ArrowError>,
+) -> Result<ColumnarValue> {
+ apply(lhs, rhs, |l, r| Ok(Arc::new(f(l, r)?)))
+}
diff --git a/datafusion/physical-expr/src/expressions/like.rs b/datafusion/physical-expr/src/expressions/like.rs
index b3d366142a..e833eabbff 100644
--- a/datafusion/physical-expr/src/expressions/like.rs
+++ b/datafusion/physical-expr/src/expressions/like.rs
@@ -20,18 +20,10 @@ use std::{any::Any, sync::Arc};
use crate::{physical_expr::down_cast_any_ref, PhysicalExpr};
-use arrow::compute::kernels::comparison::{
- ilike_utf8, like_utf8, nilike_utf8, nlike_utf8,
-};
-use arrow::compute::kernels::comparison::{
- ilike_utf8_scalar, like_utf8_scalar, nilike_utf8_scalar, nlike_utf8_scalar,
-};
-use arrow::{
- array::{new_null_array, Array, ArrayRef, LargeStringArray, StringArray},
- record_batch::RecordBatch,
-};
+use crate::expressions::datum::apply_cmp;
+use arrow::record_batch::RecordBatch;
use arrow_schema::{DataType, Schema};
-use datafusion_common::{internal_err, DataFusionError, Result, ScalarValue};
+use datafusion_common::{internal_err, DataFusionError, Result};
use datafusion_expr::ColumnarValue;
// Like expression
@@ -109,61 +101,15 @@ impl PhysicalExpr for LikeExpr {
}
fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> {
- let expr_value = self.expr.evaluate(batch)?;
- let pattern_value = self.pattern.evaluate(batch)?;
- let expr_data_type = expr_value.data_type();
- let pattern_data_type = pattern_value.data_type();
-
- match (
- &expr_value,
- &expr_data_type,
- &pattern_value,
- &pattern_data_type,
- ) {
- // Types are equal => valid
- (_, l, _, r) if l == r => {}
- // Allow comparing a dictionary value with its corresponding scalar value
- (
- ColumnarValue::Array(_),
- DataType::Dictionary(_, dict_t),
- ColumnarValue::Scalar(_),
- scalar_t,
- )
- | (
- ColumnarValue::Scalar(_),
- scalar_t,
- ColumnarValue::Array(_),
- DataType::Dictionary(_, dict_t),
- ) if dict_t.as_ref() == scalar_t => {}
- _ => {
- return internal_err!(
- "Cannot evaluate {} expression with types {:?} and {:?}",
- self.op_name(),
- expr_data_type,
- pattern_data_type
- );
- }
- }
-
- // Attempt to use special kernels if one input is scalar and the other is an array
- let scalar_result = match (&expr_value, &pattern_value) {
- (ColumnarValue::Array(array), ColumnarValue::Scalar(scalar)) => {
- self.evaluate_array_scalar(array, scalar)?
- }
- (_, _) => None, // default to array implementation
- };
-
- if let Some(result) = scalar_result {
- return result.map(|a| ColumnarValue::Array(a));
+ use arrow::compute::*;
+ let lhs = self.expr.evaluate(batch)?;
+ let rhs = self.pattern.evaluate(batch)?;
+ match (self.negated, self.case_insensitive) {
+ (false, false) => apply_cmp(&lhs, &rhs, like),
+ (false, true) => apply_cmp(&lhs, &rhs, ilike),
+ (true, false) => apply_cmp(&lhs, &rhs, nlike),
+ (true, true) => apply_cmp(&lhs, &rhs, nilike),
}
-
- // if both arrays or both literals - extract arrays and continue execution
- let (expr, pattern) = (
- expr_value.into_array(batch.num_rows()),
- pattern_value.into_array(batch.num_rows()),
- );
- self.evaluate_array_array(expr, pattern)
- .map(|a| ColumnarValue::Array(a))
}
fn children(&self) -> Vec<Arc<dyn PhysicalExpr>> {
@@ -202,71 +148,6 @@ impl PartialEq<dyn Any> for LikeExpr {
}
}
-macro_rules! binary_string_array_op_scalar {
- ($LEFT:expr, $RIGHT:expr, $OP:ident, $OP_TYPE:expr) => {{
- let result: Result<Arc<dyn Array>> = match $LEFT.data_type() {
- DataType::Utf8 => compute_utf8_op_scalar!($LEFT, $RIGHT, $OP, StringArray, $OP_TYPE),
- DataType::LargeUtf8 => compute_utf8_op_scalar!($LEFT, $RIGHT, $OP, LargeStringArray, $OP_TYPE),
- other => internal_err!(
- "Data type {:?} not supported for scalar operation '{}' on string array",
- other, stringify!($OP)
- ),
- };
- Some(result)
- }};
-}
-
-impl LikeExpr {
- /// Evaluate the expression if the input is an array and
- /// pattern is literal - use scalar operations
- fn evaluate_array_scalar(
- &self,
- array: &dyn Array,
- scalar: &ScalarValue,
- ) -> Result<Option<Result<ArrayRef>>> {
- let scalar_result = match (self.negated, self.case_insensitive) {
- (false, false) => binary_string_array_op_scalar!(
- array,
- scalar.clone(),
- like,
- &DataType::Boolean
- ),
- (true, false) => binary_string_array_op_scalar!(
- array,
- scalar.clone(),
- nlike,
- &DataType::Boolean
- ),
- (false, true) => binary_string_array_op_scalar!(
- array,
- scalar.clone(),
- ilike,
- &DataType::Boolean
- ),
- (true, true) => binary_string_array_op_scalar!(
- array,
- scalar.clone(),
- nilike,
- &DataType::Boolean
- ),
- };
- Ok(scalar_result)
- }
-
- fn evaluate_array_array(
- &self,
- left: Arc<dyn Array>,
- right: Arc<dyn Array>,
- ) -> Result<ArrayRef> {
- match (self.negated, self.case_insensitive) {
- (false, false) => binary_string_array_op!(left, right, like),
- (true, false) => binary_string_array_op!(left, right, nlike),
- (false, true) => binary_string_array_op!(left, right, ilike),
- (true, true) => binary_string_array_op!(left, right, nilike),
- }
- }
-}
-
/// Create a like expression, erroring if the argument types are not compatible.
pub fn like(
negated: bool,
@@ -294,7 +175,7 @@ pub fn like(
mod test {
use super::*;
use crate::expressions::col;
- use arrow::array::BooleanArray;
+ use arrow::array::*;
use arrow_schema::Field;
use datafusion_common::cast::as_boolean_array;
diff --git a/datafusion/physical-expr/src/expressions/mod.rs b/datafusion/physical-expr/src/expressions/mod.rs
index 422aff20ed..c44b3cf01d 100644
--- a/datafusion/physical-expr/src/expressions/mod.rs
+++ b/datafusion/physical-expr/src/expressions/mod.rs
@@ -22,6 +22,7 @@ mod binary;
mod case;
mod cast;
mod column;
+mod datum;
mod get_indexed_field;
mod in_list;
mod is_not_null;
diff --git a/datafusion/physical-plan/src/aggregates/group_values/row.rs b/datafusion/physical-plan/src/aggregates/group_values/row.rs
index 346f15fd1f..746537557d 100644
--- a/datafusion/physical-plan/src/aggregates/group_values/row.rs
+++ b/datafusion/physical-plan/src/aggregates/group_values/row.rs
@@ -16,13 +16,13 @@
// under the License.
use crate::aggregates::group_values::GroupValues;
-use crate::row_converter::CardinalityAwareRowConverter;
use ahash::RandomState;
+use arrow::compute::cast;
use arrow::record_batch::RecordBatch;
-use arrow::row::{Rows, SortField};
-use arrow_array::ArrayRef;
-use arrow_schema::SchemaRef;
-use datafusion_common::Result;
+use arrow::row::{RowConverter, Rows, SortField};
+use arrow_array::{Array, ArrayRef};
+use arrow_schema::{DataType, SchemaRef};
+use datafusion_common::{DataFusionError, Result};
use datafusion_execution::memory_pool::proxy::{RawTableAllocExt, VecAllocExt};
use datafusion_physical_expr::hash_utils::create_hashes;
use datafusion_physical_expr::EmitTo;
@@ -30,8 +30,11 @@ use hashbrown::raw::RawTable;
/// A [`GroupValues`] making use of [`Rows`]
pub struct GroupValuesRows {
+ /// The output schema
+ schema: SchemaRef,
+
/// Converter for the group values
- row_converter: CardinalityAwareRowConverter,
+ row_converter: RowConverter,
/// Logically maps group values to a group_index in
/// [`Self::group_values`] and in each accumulator
@@ -65,7 +68,7 @@ pub struct GroupValuesRows {
impl GroupValuesRows {
pub fn try_new(schema: SchemaRef) -> Result<Self> {
- let row_converter = CardinalityAwareRowConverter::new(
+ let row_converter = RowConverter::new(
schema
.fields()
.iter()
@@ -76,6 +79,7 @@ impl GroupValuesRows {
let map = RawTable::with_capacity(0);
Ok(Self {
+ schema,
row_converter,
map,
map_size: 0,
@@ -95,7 +99,7 @@ impl GroupValues for GroupValuesRows {
let mut group_values = match self.group_values.take() {
Some(group_values) => group_values,
- None => self.row_converter.empty_rows(0, 0)?,
+ None => self.row_converter.empty_rows(0, 0),
};
// tracks to which group each of the input rows belongs
@@ -166,7 +170,7 @@ impl GroupValues for GroupValuesRows {
.take()
.expect("Can not emit from empty rows");
- let output = match emit_to {
+ let mut output = match emit_to {
EmitTo::All => {
let output = self.row_converter.convert_rows(&group_values)?;
group_values.clear();
@@ -177,7 +181,7 @@ impl GroupValues for GroupValuesRows {
let output = self.row_converter.convert_rows(groups_rows)?;
// Clear out first n group keys by copying them to a new Rows.
// TODO file some ticket in arrow-rs to make this more efficent?
- let mut new_group_values = self.row_converter.empty_rows(0, 0)?;
+ let mut new_group_values = self.row_converter.empty_rows(0, 0);
for row in group_values.iter().skip(n) {
new_group_values.push(row);
}
@@ -199,6 +203,20 @@ impl GroupValues for GroupValuesRows {
}
};
+ // TODO: Materialize dictionaries in group keys (#7647)
+ for (field, array) in self.schema.fields.iter().zip(&mut output) {
+ let expected = field.data_type();
+ if let DataType::Dictionary(_, v) = expected {
+ let actual = array.data_type();
+ if v.as_ref() != actual {
+ return Err(DataFusionError::Internal(format!(
+ "Converted group rows expected dictionary of {v} got {actual}"
+ )));
+ }
+ *array = cast(array.as_ref(), expected)?;
+ }
+ }
+
self.group_values = Some(group_values);
Ok(output)
}
diff --git a/datafusion/physical-plan/src/aggregates/mod.rs b/datafusion/physical-plan/src/aggregates/mod.rs
index 58dbb252fe..b6e4b0a44d 100644
--- a/datafusion/physical-plan/src/aggregates/mod.rs
+++ b/datafusion/physical-plan/src/aggregates/mod.rs
@@ -1665,7 +1665,7 @@ mod tests {
))];
let task_ctx = if spill {
- new_spill_ctx(2, 2500)
+ new_spill_ctx(2, 1500)
} else {
Arc::new(TaskContext::default())
};
@@ -1919,6 +1919,7 @@ mod tests {
}
#[tokio::test]
+ #[ignore]
async fn aggregate_source_with_yielding_with_spill() -> Result<()> {
let input: Arc<dyn ExecutionPlan> =
Arc::new(TestYieldingExec { yield_first: true });
diff --git a/datafusion/physical-plan/src/aggregates/order/partial.rs b/datafusion/physical-plan/src/aggregates/order/partial.rs
index bd8688820d..ff8a75b9b2 100644
--- a/datafusion/physical-plan/src/aggregates/order/partial.rs
+++ b/datafusion/physical-plan/src/aggregates/order/partial.rs
@@ -15,8 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-use crate::row_converter::CardinalityAwareRowConverter;
-use arrow::row::{OwnedRow, Rows, SortField};
+use arrow::row::{OwnedRow, RowConverter, Rows, SortField};
use arrow_array::ArrayRef;
use arrow_schema::Schema;
use datafusion_common::Result;
@@ -71,7 +70,7 @@ pub(crate) struct GroupOrderingPartial {
/// Converter for the sort key (used on the group columns
/// specified in `order_indexes`)
- row_converter: CardinalityAwareRowConverter,
+ row_converter: RowConverter,
}
#[derive(Debug, Default)]
@@ -125,7 +124,7 @@ impl GroupOrderingPartial {
Ok(Self {
state: State::Start,
order_indices: order_indices.to_vec(),
- row_converter: CardinalityAwareRowConverter::new(fields)?,
+ row_converter: RowConverter::new(fields)?,
})
}
@@ -142,7 +141,7 @@ impl GroupOrderingPartial {
.map(|&idx| group_values[idx].clone())
.collect();
- self.row_converter.convert_columns(&sort_values)
+ Ok(self.row_converter.convert_columns(&sort_values)?)
}
/// How many groups be emitted, or None if no data can be emitted
diff --git a/datafusion/physical-plan/src/lib.rs b/datafusion/physical-plan/src/lib.rs
index c27ec200e7..c397fb5d3e 100644
--- a/datafusion/physical-plan/src/lib.rs
+++ b/datafusion/physical-plan/src/lib.rs
@@ -352,7 +352,6 @@ pub mod memory;
pub mod metrics;
pub mod projection;
pub mod repartition;
-mod row_converter;
pub mod sorts;
pub mod stream;
pub mod streaming;
diff --git a/datafusion/physical-plan/src/row_converter.rs b/datafusion/physical-plan/src/row_converter.rs
deleted file mode 100644
index 447cdaf4c1..0000000000
--- a/datafusion/physical-plan/src/row_converter.rs
+++ /dev/null
@@ -1,295 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-//! [`CardinalityAwareRowConverter`] for converting data to
-//! [`arrow::row`] format.
-
-use arrow::datatypes::DataType;
-use arrow::row::{Row, RowConverter};
-use arrow::row::{Rows, SortField};
-use arrow_array::cast::AsArray;
-use arrow_array::*;
-use datafusion_common::{internal_err, DataFusionError, Result};
-
-/// The threshold of the number of values at which to consider a
-/// [`DictionaryArray`] "high" cardinality.
-///
-/// Since [`RowConverter`] blindly generates a mapping for all values,
-/// regardless of if they appear in the keys, this value is compared
-/// to the length of values.
-///
-/// The assumption is that the number of potential distinct key values
-/// (aka the length of the values array) is a more robust predictor of
-/// being "high" cardinality than the actual number of keys used. The
-/// intuition for this is that other values in the dictionary could be
-/// used in subsequent batches.
-///
-/// While an argument can made for doing something more sophisticated,
-/// this would likely only really make sense if the dictionary
-/// interner itself followed a similar approach, which it did not at
-/// the time of this writing.
-const LOW_CARDINALITY_THRESHOLD: usize = 512;
-
-/// Wrapper around an [`arrow::row`] [`RowConverter`] that disables
-/// dictionary preservation for high cardinality columns, based on the
-/// observed cardinalities in the first columns converted.
-///
-/// ## Background
-///
-/// By default, the [`RowConverter`] interns (and keeps a copy of) all
-/// values from [`DictionaryArray`]s. For low cardinality columns
-/// (with few distinct values) this approach is both faster and more
-/// memory efficient. However for high cardinality coumns it is slower
-/// and requires more memory. In certain degenerate cases, such as
-/// columns of nearly unique values, the `RowConverter` will keep a
-/// copy of the entire column.
-///
-/// See <https://github.com/apache/arrow-datafusion/issues/7200> for
-/// more details
-#[derive(Debug)]
-pub enum CardinalityAwareRowConverter {
- /// Converter is newly initialized, and hasn't yet seen data
- New {
- /// Defines the Row conversion
- fields: Vec<SortField>,
- },
- /// Converter has seen data and can convert [`Array`]s to/from
- /// [`Rows`]
- Converting {
- /// Underlying converter
- converter: RowConverter,
- /// if preserve_dictionaries is disabled, the output type can be
- /// different than input.
- output_types: Vec<DataType>,
- },
-}
-
-impl CardinalityAwareRowConverter {
- pub fn new(fields: Vec<SortField>) -> Result<Self> {
- Ok(Self::New { fields })
- }
-
- /// Returns the memory size of the underlying [`RowConverter`] if
- /// any.
- pub fn size(&self) -> usize {
- match self {
- Self::New { .. } => 0,
- Self::Converting { converter, .. } => converter.size(),
- }
- }
-
- pub fn empty_rows(&self, row_capacity: usize, data_capacity: usize) -> Result<Rows> {
- match self {
- Self::New { .. } => internal_err!(
- "CardinalityAwareRowConverter has not converted any rows yet"
- ),
- Self::Converting { converter, .. } => {
- Ok(converter.empty_rows(row_capacity, data_capacity))
- }
- }
- }
-
- pub fn convert_rows<'a, I>(&self, rows: I) -> Result<Vec<ArrayRef>>
- where
- I: IntoIterator<Item = Row<'a>>,
- {
- match self {
- Self::New { .. } => internal_err!(
- "CardinalityAwareRowConverter has not converted any rows yet"
- ),
- Self::Converting {
- converter,
- output_types,
- } => {
- // Cast output type if needed. The input type and
- // output type must match exactly (including
- // encodings).
- // https://github.com/apache/arrow-datafusion/discussions/7421
- // could reduce the need for this.
- let output = converter
- .convert_rows(rows)?
- .into_iter()
- .zip(output_types.iter())
- .map(|(arr, output_type)| {
- if arr.data_type() != output_type {
- Ok(arrow::compute::cast(&arr, output_type)?)
- } else {
- Ok(arr)
- }
- })
- .collect::<Result<Vec<_>>>()?;
-
- Ok(output)
- }
- }
- }
-
- /// Calls [`RowConverter::convert_columns`] after first
- /// initializing the converter based on cardinalities
- pub fn convert_columns(&mut self, columns: &[ArrayRef]) -> Result<Rows> {
- Ok(self.converter_mut(columns)?.convert_columns(columns)?)
- }
-
- /// Return a mutable reference to the inner converter, creating it if needed
- fn converter_mut(&mut self, columns: &[ArrayRef]) -> Result<&mut RowConverter> {
- if let Self::New { fields } = self {
- let mut updated_fields = fields.clone();
- let mut output_types = vec![];
- for (i, col) in columns.iter().enumerate() {
- output_types.push(col.data_type().clone());
- if let DataType::Dictionary(_, _) = col.data_type() {
- // see comments on LOW_CARDINALITY_THRESHOLD for
- // the rationale of this calculation
- let cardinality = col.as_any_dictionary_opt().unwrap().values().len();
- if cardinality >= LOW_CARDINALITY_THRESHOLD {
- updated_fields[i] =
- updated_fields[i].clone().preserve_dictionaries(false);
- }
- }
- }
- *self = Self::Converting {
- converter: RowConverter::new(updated_fields)?,
- output_types,
- };
- };
-
- match self {
- Self::New { .. } => {
- unreachable!();
- }
- Self::Converting { converter, .. } => Ok(converter),
- }
- }
-}
-
-#[cfg(test)]
-mod tests {
- use std::sync::Arc;
-
- use rand::Rng;
- use uuid::Uuid;
-
- use arrow::datatypes::DataType;
- use arrow_array::{
- types::Int32Type, ArrayRef, DictionaryArray, Int32Array, RecordBatch, StringArray,
- };
- use arrow_schema::SortOptions;
-
- use super::*;
-
- /// Generate a record batch with two columns:
- ///
- /// `a_dict`: String Dictionary
- /// `b_prim`: Int32Array with random values 0..20
- enum Generator {
- /// "High" cardinality (20 distinct values)
- High,
- /// "Low" cardinality (2 distinct values)
- Low,
- }
-
- impl Generator {
- fn build(&self) -> RecordBatch {
- let (keys, values) = match self {
- Self::High => {
- let values: Vec<_> =
- (0..1024).map(|_| Uuid::new_v4().to_string()).collect();
- let values = StringArray::from(values);
-
- let keys: Int32Array = (0..1024)
- .map(|_| rand::thread_rng().gen_range(0..1024))
- .collect();
- (keys, values)
- }
- Self::Low => {
- let values = StringArray::from_iter_values(["a", "b", "c"]);
- let keys: Int32Array = (0..1024)
- .map(|_| rand::thread_rng().gen_range(0..2))
- .collect();
- (keys, values)
- }
- };
- let dict =
- DictionaryArray::<Int32Type>::try_new(keys, Arc::new(values)).unwrap();
- let col_a = Arc::new(dict) as ArrayRef;
-
- // building column `b_prim`
- let values: Int32Array = (0..1024)
- .map(|_| rand::thread_rng().gen_range(0..20))
- .collect();
- let col_b: ArrayRef = Arc::new(values);
-
- RecordBatch::try_from_iter(vec![("a_dict", col_a), ("b_prim", col_b)])
- .unwrap()
- }
-
- fn sort_fields(&self) -> Vec<SortField> {
- vec![
- SortField::new_with_options(
- DataType::Dictionary(
- Box::new(DataType::Int32),
- Box::new(DataType::Utf8),
- ),
- SortOptions::default(),
- ),
- SortField::new_with_options(DataType::Int32, SortOptions::default()),
- ]
- }
- }
-
- #[tokio::test]
- async fn test_with_high_card() {
- let generator = Generator::High;
- let batch = generator.build();
-
- let mut card_converter =
- CardinalityAwareRowConverter::new(generator.sort_fields()).unwrap();
- let rows = card_converter.convert_columns(batch.columns()).unwrap();
- let converted_batch = card_converter.convert_rows(&rows).unwrap();
- assert_eq!(converted_batch, batch.columns());
-
- let mut row_converter = RowConverter::new(generator.sort_fields()).unwrap();
- let rows = row_converter.convert_columns(batch.columns()).unwrap();
- let converted_batch = row_converter.convert_rows(&rows).unwrap();
- assert_eq!(converted_batch, batch.columns());
-
- // with high cardinality the cardinality aware converter
- // should be lower, as there is no interning of values
- assert!(card_converter.size() < row_converter.size());
- }
-
- #[tokio::test]
- async fn test_with_low_card() {
- let generator = Generator::Low;
- let batch = generator.build();
-
- let mut card_converter =
- CardinalityAwareRowConverter::new(generator.sort_fields()).unwrap();
- let rows = card_converter.convert_columns(batch.columns()).unwrap();
- let converted_batch = card_converter.convert_rows(&rows).unwrap();
- assert_eq!(converted_batch, batch.columns());
-
- let mut row_converter = RowConverter::new(generator.sort_fields()).unwrap();
- let rows = row_converter.convert_columns(batch.columns()).unwrap();
- let converted_batch = row_converter.convert_rows(&rows).unwrap();
- assert_eq!(converted_batch, batch.columns());
-
- // with low cardinality the row converters sizes should be
- // equal as the same converter logic is used
- assert_eq!(card_converter.size(), row_converter.size());
- }
-}
diff --git a/datafusion/physical-plan/src/sorts/stream.rs b/datafusion/physical-plan/src/sorts/stream.rs
index 2ddce910ef..a7f9e7380c 100644
--- a/datafusion/physical-plan/src/sorts/stream.rs
+++ b/datafusion/physical-plan/src/sorts/stream.rs
@@ -15,14 +15,13 @@
// specific language governing permissions and limitations
// under the License.
-use crate::row_converter::CardinalityAwareRowConverter;
use crate::sorts::cursor::{FieldArray, FieldCursor, RowCursor};
use crate::SendableRecordBatchStream;
use crate::{PhysicalExpr, PhysicalSortExpr};
use arrow::array::Array;
use arrow::datatypes::Schema;
use arrow::record_batch::RecordBatch;
-use arrow::row::SortField;
+use arrow::row::{RowConverter, SortField};
use datafusion_common::Result;
use datafusion_execution::memory_pool::MemoryReservation;
use futures::stream::{Fuse, StreamExt};
@@ -81,7 +80,7 @@ impl FusedStreams {
#[derive(Debug)]
pub struct RowCursorStream {
/// Converter to convert output of physical expressions
- converter: CardinalityAwareRowConverter,
+ converter: RowConverter,
/// The physical expressions to sort by
column_expressions: Vec<Arc<dyn PhysicalExpr>>,
/// Input streams
@@ -106,7 +105,7 @@ impl RowCursorStream {
.collect::<Result<Vec<_>>>()?;
let streams = streams.into_iter().map(|s| s.fuse()).collect();
- let converter = CardinalityAwareRowConverter::new(sort_fields)?;
+ let converter = RowConverter::new(sort_fields)?;
Ok(Self {
converter,
reservation,
diff --git a/datafusion/proto/Cargo.toml b/datafusion/proto/Cargo.toml
index 02b609313a..e27eff537b 100644
--- a/datafusion/proto/Cargo.toml
+++ b/datafusion/proto/Cargo.toml
@@ -47,7 +47,7 @@ datafusion-common = { path = "../common", version = "31.0.0", default-features =
datafusion-expr = { path = "../expr", version = "31.0.0" }
object_store = { version = "0.7.0" }
pbjson = { version = "0.5", optional = true }
-prost = "0.11.0"
+prost = "0.12.0"
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
diff --git a/datafusion/proto/gen/Cargo.toml b/datafusion/proto/gen/Cargo.toml
index a00240ae5d..37c49666d3 100644
--- a/datafusion/proto/gen/Cargo.toml
+++ b/datafusion/proto/gen/Cargo.toml
@@ -31,5 +31,5 @@ publish = false
[dependencies]
# Pin these dependencies so that the generated output is deterministic
-pbjson-build = { version = "=0.5.1" }
-prost-build = { version = "=0.11.9" }
+pbjson-build = "=0.6.2"
+prost-build = "=0.12.1"
diff --git a/datafusion/proto/src/generated/pbjson.rs b/datafusion/proto/src/generated/pbjson.rs
index 458c1ea6e5..d1e9e886e7 100644
--- a/datafusion/proto/src/generated/pbjson.rs
+++ b/datafusion/proto/src/generated/pbjson.rs
@@ -47,8 +47,8 @@ impl serde::Serialize for AggregateExecNode {
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)))?;
+ let v = AggregateMode::try_from(self.mode)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.mode)))?;
struct_ser.serialize_field("mode", &v)?;
}
if let Some(v) = self.input.as_ref() {
@@ -166,7 +166,7 @@ impl<'de> serde::Deserialize<'de> for AggregateExecNode {
formatter.write_str("struct datafusion.AggregateExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AggregateExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<AggregateExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -181,73 +181,73 @@ impl<'de> serde::Deserialize<'de> for AggregateExecNode {
let mut groups__ = None;
let mut filter_expr__ = None;
let mut order_by_expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ 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()?);
+ 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);
+ 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()?;
+ 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()?);
+ 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()?);
+ 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()?;
+ 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()?);
+ 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()?);
+ 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()?);
+ 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()?);
+ order_by_expr__ = Some(map_.next_value()?);
}
}
}
@@ -294,8 +294,8 @@ impl serde::Serialize for AggregateExprNode {
}
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)))?;
+ let v = AggregateFunction::try_from(self.aggr_function)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.aggr_function)))?;
struct_ser.serialize_field("aggrFunction", &v)?;
}
if !self.expr.is_empty() {
@@ -377,7 +377,7 @@ impl<'de> serde::Deserialize<'de> for AggregateExprNode {
formatter.write_str("struct datafusion.AggregateExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AggregateExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<AggregateExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -386,37 +386,37 @@ impl<'de> serde::Deserialize<'de> for AggregateExprNode {
let mut distinct__ = None;
let mut filter__ = None;
let mut order_by__ = None;
- while let Some(k) = map.next_key()? {
+ 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);
+ 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()?);
+ expr__ = Some(map_.next_value()?);
}
GeneratedField::Distinct => {
if distinct__.is_some() {
return Err(serde::de::Error::duplicate_field("distinct"));
}
- distinct__ = Some(map.next_value()?);
+ distinct__ = Some(map_.next_value()?);
}
GeneratedField::Filter => {
if filter__.is_some() {
return Err(serde::de::Error::duplicate_field("filter"));
}
- filter__ = map.next_value()?;
+ 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()?);
+ order_by__ = Some(map_.next_value()?);
}
}
}
@@ -535,10 +535,9 @@ impl<'de> serde::Deserialize<'de> for AggregateFunction {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(AggregateFunction::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -548,10 +547,9 @@ impl<'de> serde::Deserialize<'de> for AggregateFunction {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(AggregateFunction::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -647,10 +645,9 @@ impl<'de> serde::Deserialize<'de> for AggregateMode {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(AggregateMode::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -660,10 +657,9 @@ impl<'de> serde::Deserialize<'de> for AggregateMode {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(AggregateMode::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -774,32 +770,32 @@ impl<'de> serde::Deserialize<'de> for AggregateNode {
formatter.write_str("struct datafusion.AggregateNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AggregateNode, V::Error>
+ 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()? {
+ 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()?;
+ 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()?);
+ 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()?);
+ aggr_expr__ = Some(map_.next_value()?);
}
}
}
@@ -910,7 +906,7 @@ impl<'de> serde::Deserialize<'de> for AggregateUdfExprNode {
formatter.write_str("struct datafusion.AggregateUDFExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AggregateUdfExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<AggregateUdfExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -918,31 +914,31 @@ impl<'de> serde::Deserialize<'de> for AggregateUdfExprNode {
let mut args__ = None;
let mut filter__ = None;
let mut order_by__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ 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()?);
+ args__ = Some(map_.next_value()?);
}
GeneratedField::Filter => {
if filter__.is_some() {
return Err(serde::de::Error::duplicate_field("filter"));
}
- filter__ = map.next_value()?;
+ 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()?);
+ order_by__ = Some(map_.next_value()?);
}
}
}
@@ -1034,25 +1030,25 @@ impl<'de> serde::Deserialize<'de> for AliasNode {
formatter.write_str("struct datafusion.AliasNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AliasNode, V::Error>
+ 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()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Alias => {
if alias__.is_some() {
return Err(serde::de::Error::duplicate_field("alias"));
}
- alias__ = Some(map.next_value()?);
+ alias__ = Some(map_.next_value()?);
}
}
}
@@ -1161,7 +1157,7 @@ impl<'de> serde::Deserialize<'de> for AnalyzeExecNode {
formatter.write_str("struct datafusion.AnalyzeExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AnalyzeExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<AnalyzeExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -1169,31 +1165,31 @@ impl<'de> serde::Deserialize<'de> for AnalyzeExecNode {
let mut show_statistics__ = None;
let mut input__ = None;
let mut schema__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Verbose => {
if verbose__.is_some() {
return Err(serde::de::Error::duplicate_field("verbose"));
}
- verbose__ = Some(map.next_value()?);
+ verbose__ = Some(map_.next_value()?);
}
GeneratedField::ShowStatistics => {
if show_statistics__.is_some() {
return Err(serde::de::Error::duplicate_field("showStatistics"));
}
- show_statistics__ = Some(map.next_value()?);
+ show_statistics__ = Some(map_.next_value()?);
}
GeneratedField::Input => {
if input__.is_some() {
return Err(serde::de::Error::duplicate_field("input"));
}
- input__ = map.next_value()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = map.next_value()?;
+ schema__ = map_.next_value()?;
}
}
}
@@ -1285,25 +1281,25 @@ impl<'de> serde::Deserialize<'de> for AnalyzeNode {
formatter.write_str("struct datafusion.AnalyzeNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AnalyzeNode, V::Error>
+ 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()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Verbose => {
if verbose__.is_some() {
return Err(serde::de::Error::duplicate_field("verbose"));
}
- verbose__ = Some(map.next_value()?);
+ verbose__ = Some(map_.next_value()?);
}
}
}
@@ -1385,18 +1381,18 @@ impl<'de> serde::Deserialize<'de> for AnalyzedLogicalPlanType {
formatter.write_str("struct datafusion.AnalyzedLogicalPlanType")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AnalyzedLogicalPlanType, V::Error>
+ 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()? {
+ 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()?);
+ analyzer_name__ = Some(map_.next_value()?);
}
}
}
@@ -1483,26 +1479,26 @@ impl serde::Serialize for ArrowType {
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)))?;
+ let v = TimeUnit::try_from(*v)
+ .map_err(|_| 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)))?;
+ let v = TimeUnit::try_from(*v)
+ .map_err(|_| 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)))?;
+ let v = TimeUnit::try_from(*v)
+ .map_err(|_| 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)))?;
+ let v = IntervalUnit::try_from(*v)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
struct_ser.serialize_field("INTERVAL", &v)?;
}
arrow_type::ArrowTypeEnum::Decimal(v) => {
@@ -1685,237 +1681,237 @@ impl<'de> serde::Deserialize<'de> for ArrowType {
formatter.write_str("struct datafusion.ArrowType")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ArrowType, V::Error>
+ 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()? {
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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));
+ 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)
+ 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)
+ 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)
+ 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));
+ 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)
+ 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));
+ 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));
+ 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));
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
+ arrow_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(arrow_type::ArrowTypeEnum::Map)
;
}
}
@@ -1985,12 +1981,12 @@ impl<'de> serde::Deserialize<'de> for AvroFormat {
formatter.write_str("struct datafusion.AvroFormat")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AvroFormat, V::Error>
+ 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>()?;
+ while map_.next_key::<GeneratedField>()?.is_some() {
+ let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(AvroFormat {
})
@@ -2068,18 +2064,18 @@ impl<'de> serde::Deserialize<'de> for AvroScanExecNode {
formatter.write_str("struct datafusion.AvroScanExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<AvroScanExecNode, V::Error>
+ 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()? {
+ 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()?;
+ base_conf__ = map_.next_value()?;
}
}
}
@@ -2159,18 +2155,18 @@ impl<'de> serde::Deserialize<'de> for BareTableReference {
formatter.write_str("struct datafusion.BareTableReference")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<BareTableReference, V::Error>
+ 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()? {
+ 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()?);
+ table__ = Some(map_.next_value()?);
}
}
}
@@ -2277,7 +2273,7 @@ impl<'de> serde::Deserialize<'de> for BetweenNode {
formatter.write_str("struct datafusion.BetweenNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<BetweenNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<BetweenNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -2285,31 +2281,31 @@ impl<'de> serde::Deserialize<'de> for BetweenNode {
let mut negated__ = None;
let mut low__ = None;
let mut high__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Negated => {
if negated__.is_some() {
return Err(serde::de::Error::duplicate_field("negated"));
}
- negated__ = Some(map.next_value()?);
+ negated__ = Some(map_.next_value()?);
}
GeneratedField::Low => {
if low__.is_some() {
return Err(serde::de::Error::duplicate_field("low"));
}
- low__ = map.next_value()?;
+ low__ = map_.next_value()?;
}
GeneratedField::High => {
if high__.is_some() {
return Err(serde::de::Error::duplicate_field("high"));
}
- high__ = map.next_value()?;
+ high__ = map_.next_value()?;
}
}
}
@@ -2401,25 +2397,25 @@ impl<'de> serde::Deserialize<'de> for BinaryExprNode {
formatter.write_str("struct datafusion.BinaryExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<BinaryExprNode, V::Error>
+ 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()? {
+ 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()?);
+ operands__ = Some(map_.next_value()?);
}
GeneratedField::Op => {
if op__.is_some() {
return Err(serde::de::Error::duplicate_field("op"));
}
- op__ = Some(map.next_value()?);
+ op__ = Some(map_.next_value()?);
}
}
}
@@ -2487,10 +2483,9 @@ impl<'de> serde::Deserialize<'de> for BuiltInWindowFunction {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(BuiltInWindowFunction::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -2500,10 +2495,9 @@ impl<'de> serde::Deserialize<'de> for BuiltInWindowFunction {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(BuiltInWindowFunction::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -2620,32 +2614,32 @@ impl<'de> serde::Deserialize<'de> for CaseNode {
formatter.write_str("struct datafusion.CaseNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CaseNode, V::Error>
+ 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()? {
+ 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()?;
+ 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()?);
+ 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()?;
+ else_expr__ = map_.next_value()?;
}
}
}
@@ -2737,25 +2731,25 @@ impl<'de> serde::Deserialize<'de> for CastNode {
formatter.write_str("struct datafusion.CastNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CastNode, V::Error>
+ 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()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::ArrowType => {
if arrow_type__.is_some() {
return Err(serde::de::Error::duplicate_field("arrowType"));
}
- arrow_type__ = map.next_value()?;
+ arrow_type__ = map_.next_value()?;
}
}
}
@@ -2846,26 +2840,26 @@ impl<'de> serde::Deserialize<'de> for CoalesceBatchesExecNode {
formatter.write_str("struct datafusion.CoalesceBatchesExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CoalesceBatchesExecNode, V::Error>
+ 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()? {
+ 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()?;
+ 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)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -2947,18 +2941,18 @@ impl<'de> serde::Deserialize<'de> for CoalescePartitionsExecNode {
formatter.write_str("struct datafusion.CoalescePartitionsExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CoalescePartitionsExecNode, V::Error>
+ 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()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
}
}
@@ -3047,25 +3041,25 @@ impl<'de> serde::Deserialize<'de> for Column {
formatter.write_str("struct datafusion.Column")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Column, V::Error>
+ 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()? {
+ 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()?);
+ name__ = Some(map_.next_value()?);
}
GeneratedField::Relation => {
if relation__.is_some() {
return Err(serde::de::Error::duplicate_field("relation"));
}
- relation__ = map.next_value()?;
+ relation__ = map_.next_value()?;
}
}
}
@@ -3097,8 +3091,8 @@ impl serde::Serialize for ColumnIndex {
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)))?;
+ let v = JoinSide::try_from(self.side)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.side)))?;
struct_ser.serialize_field("side", &v)?;
}
struct_ser.end()
@@ -3157,27 +3151,27 @@ impl<'de> serde::Deserialize<'de> for ColumnIndex {
formatter.write_str("struct datafusion.ColumnIndex")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ColumnIndex, V::Error>
+ 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()? {
+ 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)
+ 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);
+ side__ = Some(map_.next_value::<JoinSide>()? as i32);
}
}
}
@@ -3258,18 +3252,18 @@ impl<'de> serde::Deserialize<'de> for ColumnRelation {
formatter.write_str("struct datafusion.ColumnRelation")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ColumnRelation, V::Error>
+ 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()? {
+ 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()?);
+ relation__ = Some(map_.next_value()?);
}
}
}
@@ -3380,7 +3374,7 @@ impl<'de> serde::Deserialize<'de> for ColumnStats {
formatter.write_str("struct datafusion.ColumnStats")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ColumnStats, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ColumnStats, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -3388,26 +3382,26 @@ impl<'de> serde::Deserialize<'de> for ColumnStats {
let mut max_value__ = None;
let mut null_count__ = None;
let mut distinct_count__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ 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()?;
+ 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)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::DistinctCount => {
@@ -3415,7 +3409,7 @@ impl<'de> serde::Deserialize<'de> for ColumnStats {
return Err(serde::de::Error::duplicate_field("distinctCount"));
}
distinct_count__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -3519,32 +3513,32 @@ impl<'de> serde::Deserialize<'de> for CreateCatalogNode {
formatter.write_str("struct datafusion.CreateCatalogNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateCatalogNode, V::Error>
+ 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()? {
+ 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()?);
+ 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()?);
+ 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()?;
+ schema__ = map_.next_value()?;
}
}
}
@@ -3646,32 +3640,32 @@ impl<'de> serde::Deserialize<'de> for CreateCatalogSchemaNode {
formatter.write_str("struct datafusion.CreateCatalogSchemaNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateCatalogSchemaNode, V::Error>
+ 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()? {
+ 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()?);
+ 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()?);
+ 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()?;
+ schema__ = map_.next_value()?;
}
}
}
@@ -3867,7 +3861,7 @@ impl<'de> serde::Deserialize<'de> for CreateExternalTableNode {
formatter.write_str("struct datafusion.CreateExternalTableNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateExternalTableNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<CreateExternalTableNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -3884,86 +3878,86 @@ impl<'de> serde::Deserialize<'de> for CreateExternalTableNode {
let mut order_exprs__ = None;
let mut unbounded__ = None;
let mut options__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ name__ = map_.next_value()?;
}
GeneratedField::Location => {
if location__.is_some() {
return Err(serde::de::Error::duplicate_field("location"));
}
- location__ = Some(map.next_value()?);
+ 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()?);
+ 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()?);
+ has_header__ = Some(map_.next_value()?);
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = map.next_value()?;
+ 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()?);
+ 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()?);
+ 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()?);
+ delimiter__ = Some(map_.next_value()?);
}
GeneratedField::Definition => {
if definition__.is_some() {
return Err(serde::de::Error::duplicate_field("definition"));
}
- definition__ = Some(map.next_value()?);
+ 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()?);
+ 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()?);
+ 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()?);
+ 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<_, _>>()?
+ map_.next_value::<std::collections::HashMap<_, _>>()?
);
}
}
@@ -4084,7 +4078,7 @@ impl<'de> serde::Deserialize<'de> for CreateViewNode {
formatter.write_str("struct datafusion.CreateViewNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateViewNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<CreateViewNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -4092,31 +4086,31 @@ impl<'de> serde::Deserialize<'de> for CreateViewNode {
let mut input__ = None;
let mut or_replace__ = None;
let mut definition__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ name__ = map_.next_value()?;
}
GeneratedField::Input => {
if input__.is_some() {
return Err(serde::de::Error::duplicate_field("input"));
}
- input__ = map.next_value()?;
+ 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()?);
+ 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()?);
+ definition__ = Some(map_.next_value()?);
}
}
}
@@ -4208,25 +4202,25 @@ impl<'de> serde::Deserialize<'de> for CrossJoinExecNode {
formatter.write_str("struct datafusion.CrossJoinExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CrossJoinExecNode, V::Error>
+ 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()? {
+ 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()?;
+ left__ = map_.next_value()?;
}
GeneratedField::Right => {
if right__.is_some() {
return Err(serde::de::Error::duplicate_field("right"));
}
- right__ = map.next_value()?;
+ right__ = map_.next_value()?;
}
}
}
@@ -4316,25 +4310,25 @@ impl<'de> serde::Deserialize<'de> for CrossJoinNode {
formatter.write_str("struct datafusion.CrossJoinNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CrossJoinNode, V::Error>
+ 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()? {
+ 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()?;
+ left__ = map_.next_value()?;
}
GeneratedField::Right => {
if right__.is_some() {
return Err(serde::de::Error::duplicate_field("right"));
}
- right__ = map.next_value()?;
+ right__ = map_.next_value()?;
}
}
}
@@ -4447,7 +4441,7 @@ impl<'de> serde::Deserialize<'de> for CsvFormat {
formatter.write_str("struct datafusion.CsvFormat")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CsvFormat, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<CsvFormat, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -4455,31 +4449,31 @@ impl<'de> serde::Deserialize<'de> for CsvFormat {
let mut delimiter__ = None;
let mut quote__ = None;
let mut optional_escape__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ 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()?);
+ delimiter__ = Some(map_.next_value()?);
}
GeneratedField::Quote => {
if quote__.is_some() {
return Err(serde::de::Error::duplicate_field("quote"));
}
- quote__ = Some(map.next_value()?);
+ quote__ = Some(map_.next_value()?);
}
GeneratedField::Escape => {
if optional_escape__.is_some() {
return Err(serde::de::Error::duplicate_field("escape"));
}
- optional_escape__ = map.next_value::<::std::option::Option<_>>()?.map(csv_format::OptionalEscape::Escape);
+ optional_escape__ = map_.next_value::<::std::option::Option<_>>()?.map(csv_format::OptionalEscape::Escape);
}
}
}
@@ -4604,7 +4598,7 @@ impl<'de> serde::Deserialize<'de> for CsvScanExecNode {
formatter.write_str("struct datafusion.CsvScanExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CsvScanExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<CsvScanExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -4613,37 +4607,37 @@ impl<'de> serde::Deserialize<'de> for CsvScanExecNode {
let mut delimiter__ = None;
let mut quote__ = None;
let mut optional_escape__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ 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()?);
+ 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()?);
+ delimiter__ = Some(map_.next_value()?);
}
GeneratedField::Quote => {
if quote__.is_some() {
return Err(serde::de::Error::duplicate_field("quote"));
}
- quote__ = Some(map.next_value()?);
+ quote__ = Some(map_.next_value()?);
}
GeneratedField::Escape => {
if optional_escape__.is_some() {
return Err(serde::de::Error::duplicate_field("escape"));
}
- optional_escape__ = map.next_value::<::std::option::Option<_>>()?.map(csv_scan_exec_node::OptionalEscape::Escape);
+ optional_escape__ = map_.next_value::<::std::option::Option<_>>()?.map(csv_scan_exec_node::OptionalEscape::Escape);
}
}
}
@@ -4727,18 +4721,18 @@ impl<'de> serde::Deserialize<'de> for CubeNode {
formatter.write_str("struct datafusion.CubeNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CubeNode, V::Error>
+ 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()? {
+ 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()?);
+ expr__ = Some(map_.next_value()?);
}
}
}
@@ -4787,6 +4781,7 @@ impl serde::Serialize for CustomTableScanNode {
struct_ser.serialize_field("filters", &self.filters)?;
}
if !self.custom_table_data.is_empty() {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("customTableData", pbjson::private::base64::encode(&self.custom_table_data).as_str())?;
}
struct_ser.end()
@@ -4856,7 +4851,7 @@ impl<'de> serde::Deserialize<'de> for CustomTableScanNode {
formatter.write_str("struct datafusion.CustomTableScanNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<CustomTableScanNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<CustomTableScanNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -4865,38 +4860,38 @@ impl<'de> serde::Deserialize<'de> for CustomTableScanNode {
let mut schema__ = None;
let mut filters__ = None;
let mut custom_table_data__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ table_name__ = map_.next_value()?;
}
GeneratedField::Projection => {
if projection__.is_some() {
return Err(serde::de::Error::duplicate_field("projection"));
}
- projection__ = map.next_value()?;
+ projection__ = map_.next_value()?;
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = map.next_value()?;
+ schema__ = map_.next_value()?;
}
GeneratedField::Filters => {
if filters__.is_some() {
return Err(serde::de::Error::duplicate_field("filters"));
}
- filters__ = Some(map.next_value()?);
+ 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)
+ Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
;
}
}
@@ -4950,10 +4945,9 @@ impl<'de> serde::Deserialize<'de> for DateUnit {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(DateUnit::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -4963,10 +4957,9 @@ impl<'de> serde::Deserialize<'de> for DateUnit {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(DateUnit::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -5063,20 +5056,20 @@ impl<'de> serde::Deserialize<'de> for Decimal {
formatter.write_str("struct datafusion.Decimal")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Decimal, V::Error>
+ 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()? {
+ 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)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::Scale => {
@@ -5084,7 +5077,7 @@ impl<'de> serde::Deserialize<'de> for Decimal {
return Err(serde::de::Error::duplicate_field("scale"));
}
scale__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -5117,12 +5110,15 @@ impl serde::Serialize for Decimal128 {
}
let mut struct_ser = serializer.serialize_struct("datafusion.Decimal128", len)?;
if !self.value.is_empty() {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?;
}
if self.p != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("p", ToString::to_string(&self.p).as_str())?;
}
if self.s != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("s", ToString::to_string(&self.s).as_str())?;
}
struct_ser.end()
@@ -5184,21 +5180,21 @@ impl<'de> serde::Deserialize<'de> for Decimal128 {
formatter.write_str("struct datafusion.Decimal128")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Decimal128, V::Error>
+ 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()? {
+ 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)
+ Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
;
}
GeneratedField::P => {
@@ -5206,7 +5202,7 @@ impl<'de> serde::Deserialize<'de> for Decimal128 {
return Err(serde::de::Error::duplicate_field("p"));
}
p__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::S => {
@@ -5214,7 +5210,7 @@ impl<'de> serde::Deserialize<'de> for Decimal128 {
return Err(serde::de::Error::duplicate_field("s"));
}
s__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -5248,12 +5244,15 @@ impl serde::Serialize for Decimal256 {
}
let mut struct_ser = serializer.serialize_struct("datafusion.Decimal256", len)?;
if !self.value.is_empty() {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("value", pbjson::private::base64::encode(&self.value).as_str())?;
}
if self.p != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("p", ToString::to_string(&self.p).as_str())?;
}
if self.s != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("s", ToString::to_string(&self.s).as_str())?;
}
struct_ser.end()
@@ -5315,21 +5314,21 @@ impl<'de> serde::Deserialize<'de> for Decimal256 {
formatter.write_str("struct datafusion.Decimal256")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Decimal256, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Decimal256, 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()? {
+ 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)
+ Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
;
}
GeneratedField::P => {
@@ -5337,7 +5336,7 @@ impl<'de> serde::Deserialize<'de> for Decimal256 {
return Err(serde::de::Error::duplicate_field("p"));
}
p__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::S => {
@@ -5345,7 +5344,7 @@ impl<'de> serde::Deserialize<'de> for Decimal256 {
return Err(serde::de::Error::duplicate_field("s"));
}
s__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -5437,25 +5436,25 @@ impl<'de> serde::Deserialize<'de> for DfField {
formatter.write_str("struct datafusion.DfField")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<DfField, V::Error>
+ 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()? {
+ 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()?;
+ field__ = map_.next_value()?;
}
GeneratedField::Qualifier => {
if qualifier__.is_some() {
return Err(serde::de::Error::duplicate_field("qualifier"));
}
- qualifier__ = map.next_value()?;
+ qualifier__ = map_.next_value()?;
}
}
}
@@ -5545,26 +5544,26 @@ impl<'de> serde::Deserialize<'de> for DfSchema {
formatter.write_str("struct datafusion.DfSchema")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<DfSchema, V::Error>
+ 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()? {
+ 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()?);
+ 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<_, _>>()?
+ map_.next_value::<std::collections::HashMap<_, _>>()?
);
}
}
@@ -5655,25 +5654,25 @@ impl<'de> serde::Deserialize<'de> for Dictionary {
formatter.write_str("struct datafusion.Dictionary")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Dictionary, V::Error>
+ 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()? {
+ 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()?;
+ key__ = map_.next_value()?;
}
GeneratedField::Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("value"));
}
- value__ = map.next_value()?;
+ value__ = map_.next_value()?;
}
}
}
@@ -5754,18 +5753,18 @@ impl<'de> serde::Deserialize<'de> for DistinctNode {
formatter.write_str("struct datafusion.DistinctNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<DistinctNode, V::Error>
+ 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()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
}
}
@@ -5864,32 +5863,32 @@ impl<'de> serde::Deserialize<'de> for DropViewNode {
formatter.write_str("struct datafusion.DropViewNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<DropViewNode, V::Error>
+ 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()? {
+ 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()?;
+ 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()?);
+ if_exists__ = Some(map_.next_value()?);
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = map.next_value()?;
+ schema__ = map_.next_value()?;
}
}
}
@@ -5981,25 +5980,25 @@ impl<'de> serde::Deserialize<'de> for EmptyExecNode {
formatter.write_str("struct datafusion.EmptyExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<EmptyExecNode, V::Error>
+ 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()? {
+ 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()?);
+ 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()?;
+ schema__ = map_.next_value()?;
}
}
}
@@ -6069,12 +6068,12 @@ impl<'de> serde::Deserialize<'de> for EmptyMessage {
formatter.write_str("struct datafusion.EmptyMessage")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<EmptyMessage, V::Error>
+ 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>()?;
+ while map_.next_key::<GeneratedField>()?.is_some() {
+ let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(EmptyMessage {
})
@@ -6152,18 +6151,18 @@ impl<'de> serde::Deserialize<'de> for EmptyRelationNode {
formatter.write_str("struct datafusion.EmptyRelationNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<EmptyRelationNode, V::Error>
+ 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()? {
+ 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()?);
+ produce_one_row__ = Some(map_.next_value()?);
}
}
}
@@ -6262,32 +6261,32 @@ impl<'de> serde::Deserialize<'de> for ExplainExecNode {
formatter.write_str("struct datafusion.ExplainExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ExplainExecNode, V::Error>
+ 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()? {
+ 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()?;
+ 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()?);
+ 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()?);
+ verbose__ = Some(map_.next_value()?);
}
}
}
@@ -6378,25 +6377,25 @@ impl<'de> serde::Deserialize<'de> for ExplainNode {
formatter.write_str("struct datafusion.ExplainNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ExplainNode, V::Error>
+ 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()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Verbose => {
if verbose__.is_some() {
return Err(serde::de::Error::duplicate_field("verbose"));
}
- verbose__ = Some(map.next_value()?);
+ verbose__ = Some(map_.next_value()?);
}
}
}
@@ -6514,7 +6513,7 @@ impl<'de> serde::Deserialize<'de> for Field {
formatter.write_str("struct datafusion.Field")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Field, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Field, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -6523,38 +6522,38 @@ impl<'de> serde::Deserialize<'de> for Field {
let mut nullable__ = None;
let mut children__ = None;
let mut metadata__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ 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()?;
+ arrow_type__ = map_.next_value()?;
}
GeneratedField::Nullable => {
if nullable__.is_some() {
return Err(serde::de::Error::duplicate_field("nullable"));
}
- nullable__ = Some(map.next_value()?);
+ nullable__ = Some(map_.next_value()?);
}
GeneratedField::Children => {
if children__.is_some() {
return Err(serde::de::Error::duplicate_field("children"));
}
- children__ = Some(map.next_value()?);
+ children__ = 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<_, _>>()?
+ map_.next_value::<std::collections::HashMap<_, _>>()?
);
}
}
@@ -6639,18 +6638,18 @@ impl<'de> serde::Deserialize<'de> for FileGroup {
formatter.write_str("struct datafusion.FileGroup")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FileGroup, V::Error>
+ 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()? {
+ 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()?);
+ files__ = Some(map_.next_value()?);
}
}
}
@@ -6678,9 +6677,11 @@ impl serde::Serialize for FileRange {
}
let mut struct_ser = serializer.serialize_struct("datafusion.FileRange", len)?;
if self.start != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("start", ToString::to_string(&self.start).as_str())?;
}
if self.end != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("end", ToString::to_string(&self.end).as_str())?;
}
struct_ser.end()
@@ -6739,20 +6740,20 @@ impl<'de> serde::Deserialize<'de> for FileRange {
formatter.write_str("struct datafusion.FileRange")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FileRange, V::Error>
+ 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()? {
+ 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)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::End => {
@@ -6760,7 +6761,7 @@ impl<'de> serde::Deserialize<'de> for FileRange {
return Err(serde::de::Error::duplicate_field("end"));
}
end__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -6909,7 +6910,7 @@ impl<'de> serde::Deserialize<'de> for FileScanExecConf {
formatter.write_str("struct datafusion.FileScanExecConf")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FileScanExecConf, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<FileScanExecConf, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -6921,26 +6922,26 @@ impl<'de> serde::Deserialize<'de> for FileScanExecConf {
let mut table_partition_cols__ = None;
let mut object_store_url__ = None;
let mut output_ordering__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ file_groups__ = Some(map_.next_value()?);
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = map.next_value()?;
+ 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<_>>>()?
+ Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
.into_iter().map(|x| x.0).collect())
;
}
@@ -6948,31 +6949,31 @@ impl<'de> serde::Deserialize<'de> for FileScanExecConf {
if limit__.is_some() {
return Err(serde::de::Error::duplicate_field("limit"));
}
- limit__ = map.next_value()?;
+ limit__ = map_.next_value()?;
}
GeneratedField::Statistics => {
if statistics__.is_some() {
return Err(serde::de::Error::duplicate_field("statistics"));
}
- statistics__ = map.next_value()?;
+ 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()?);
+ 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()?);
+ 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()?);
+ output_ordering__ = Some(map_.next_value()?);
}
}
}
@@ -7068,25 +7069,25 @@ impl<'de> serde::Deserialize<'de> for FilterExecNode {
formatter.write_str("struct datafusion.FilterExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FilterExecNode, V::Error>
+ 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()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = map.next_value()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -7167,19 +7168,19 @@ impl<'de> serde::Deserialize<'de> for FixedSizeBinary {
formatter.write_str("struct datafusion.FixedSizeBinary")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FixedSizeBinary, V::Error>
+ 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()? {
+ 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)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -7271,26 +7272,26 @@ impl<'de> serde::Deserialize<'de> for FixedSizeList {
formatter.write_str("struct datafusion.FixedSizeList")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FixedSizeList, V::Error>
+ 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()? {
+ 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()?;
+ 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)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -7390,32 +7391,32 @@ impl<'de> serde::Deserialize<'de> for FullTableReference {
formatter.write_str("struct datafusion.FullTableReference")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<FullTableReference, V::Error>
+ 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()? {
+ 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()?);
+ catalog__ = Some(map_.next_value()?);
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = Some(map.next_value()?);
+ schema__ = Some(map_.next_value()?);
}
GeneratedField::Table => {
if table__.is_some() {
return Err(serde::de::Error::duplicate_field("table"));
}
- table__ = Some(map.next_value()?);
+ table__ = Some(map_.next_value()?);
}
}
}
@@ -7525,39 +7526,39 @@ impl<'de> serde::Deserialize<'de> for GetIndexedField {
formatter.write_str("struct datafusion.GetIndexedField")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<GetIndexedField, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<GetIndexedField, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut field__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::NamedStructField => {
if field__.is_some() {
return Err(serde::de::Error::duplicate_field("namedStructField"));
}
- field__ = map.next_value::<::std::option::Option<_>>()?.map(get_indexed_field::Field::NamedStructField)
+ field__ = map_.next_value::<::std::option::Option<_>>()?.map(get_indexed_field::Field::NamedStructField)
;
}
GeneratedField::ListIndex => {
if field__.is_some() {
return Err(serde::de::Error::duplicate_field("listIndex"));
}
- field__ = map.next_value::<::std::option::Option<_>>()?.map(get_indexed_field::Field::ListIndex)
+ field__ = map_.next_value::<::std::option::Option<_>>()?.map(get_indexed_field::Field::ListIndex)
;
}
GeneratedField::ListRange => {
if field__.is_some() {
return Err(serde::de::Error::duplicate_field("listRange"));
}
- field__ = map.next_value::<::std::option::Option<_>>()?.map(get_indexed_field::Field::ListRange)
+ field__ = map_.next_value::<::std::option::Option<_>>()?.map(get_indexed_field::Field::ListRange)
;
}
}
@@ -7596,6 +7597,7 @@ impl serde::Serialize for GlobalLimitExecNode {
struct_ser.serialize_field("skip", &self.skip)?;
}
if self.fetch != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("fetch", ToString::to_string(&self.fetch).as_str())?;
}
struct_ser.end()
@@ -7657,27 +7659,27 @@ impl<'de> serde::Deserialize<'de> for GlobalLimitExecNode {
formatter.write_str("struct datafusion.GlobalLimitExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<GlobalLimitExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<GlobalLimitExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut skip__ = None;
let mut fetch__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Skip => {
if skip__.is_some() {
return Err(serde::de::Error::duplicate_field("skip"));
}
skip__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::Fetch => {
@@ -7685,7 +7687,7 @@ impl<'de> serde::Deserialize<'de> for GlobalLimitExecNode {
return Err(serde::de::Error::duplicate_field("fetch"));
}
fetch__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -7768,18 +7770,18 @@ impl<'de> serde::Deserialize<'de> for GroupingSetNode {
formatter.write_str("struct datafusion.GroupingSetNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<GroupingSetNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<GroupingSetNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ expr__ = Some(map_.next_value()?);
}
}
}
@@ -7831,13 +7833,13 @@ impl serde::Serialize for HashJoinExecNode {
struct_ser.serialize_field("on", &self.on)?;
}
if self.join_type != 0 {
- let v = JoinType::from_i32(self.join_type)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
+ let v = JoinType::try_from(self.join_type)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
struct_ser.serialize_field("joinType", &v)?;
}
if self.partition_mode != 0 {
- let v = PartitionMode::from_i32(self.partition_mode)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.partition_mode)))?;
+ let v = PartitionMode::try_from(self.partition_mode)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.partition_mode)))?;
struct_ser.serialize_field("partitionMode", &v)?;
}
if self.null_equals_null {
@@ -7920,7 +7922,7 @@ impl<'de> serde::Deserialize<'de> for HashJoinExecNode {
formatter.write_str("struct datafusion.HashJoinExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<HashJoinExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<HashJoinExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -7931,49 +7933,49 @@ impl<'de> serde::Deserialize<'de> for HashJoinExecNode {
let mut partition_mode__ = None;
let mut null_equals_null__ = None;
let mut filter__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ left__ = map_.next_value()?;
}
GeneratedField::Right => {
if right__.is_some() {
return Err(serde::de::Error::duplicate_field("right"));
}
- right__ = map.next_value()?;
+ right__ = map_.next_value()?;
}
GeneratedField::On => {
if on__.is_some() {
return Err(serde::de::Error::duplicate_field("on"));
}
- on__ = Some(map.next_value()?);
+ on__ = Some(map_.next_value()?);
}
GeneratedField::JoinType => {
if join_type__.is_some() {
return Err(serde::de::Error::duplicate_field("joinType"));
}
- join_type__ = Some(map.next_value::<JoinType>()? as i32);
+ join_type__ = Some(map_.next_value::<JoinType>()? as i32);
}
GeneratedField::PartitionMode => {
if partition_mode__.is_some() {
return Err(serde::de::Error::duplicate_field("partitionMode"));
}
- partition_mode__ = Some(map.next_value::<PartitionMode>()? as i32);
+ partition_mode__ = Some(map_.next_value::<PartitionMode>()? as i32);
}
GeneratedField::NullEqualsNull => {
if null_equals_null__.is_some() {
return Err(serde::de::Error::duplicate_field("nullEqualsNull"));
}
- null_equals_null__ = Some(map.next_value()?);
+ null_equals_null__ = Some(map_.next_value()?);
}
GeneratedField::Filter => {
if filter__.is_some() {
return Err(serde::de::Error::duplicate_field("filter"));
}
- filter__ = map.next_value()?;
+ filter__ = map_.next_value()?;
}
}
}
@@ -8010,6 +8012,7 @@ impl serde::Serialize for HashRepartition {
struct_ser.serialize_field("hashExpr", &self.hash_expr)?;
}
if self.partition_count != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("partitionCount", ToString::to_string(&self.partition_count).as_str())?;
}
struct_ser.end()
@@ -8070,26 +8073,26 @@ impl<'de> serde::Deserialize<'de> for HashRepartition {
formatter.write_str("struct datafusion.HashRepartition")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<HashRepartition, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<HashRepartition, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut hash_expr__ = None;
let mut partition_count__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::HashExpr => {
if hash_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("hashExpr"));
}
- hash_expr__ = Some(map.next_value()?);
+ hash_expr__ = Some(map_.next_value()?);
}
GeneratedField::PartitionCount => {
if partition_count__.is_some() {
return Err(serde::de::Error::duplicate_field("partitionCount"));
}
partition_count__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -8199,7 +8202,7 @@ impl<'de> serde::Deserialize<'de> for ILikeNode {
formatter.write_str("struct datafusion.ILikeNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ILikeNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ILikeNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -8207,31 +8210,31 @@ impl<'de> serde::Deserialize<'de> for ILikeNode {
let mut expr__ = None;
let mut pattern__ = None;
let mut escape_char__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Negated => {
if negated__.is_some() {
return Err(serde::de::Error::duplicate_field("negated"));
}
- negated__ = Some(map.next_value()?);
+ negated__ = Some(map_.next_value()?);
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = map.next_value()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Pattern => {
if pattern__.is_some() {
return Err(serde::de::Error::duplicate_field("pattern"));
}
- pattern__ = map.next_value()?;
+ pattern__ = map_.next_value()?;
}
GeneratedField::EscapeChar => {
if escape_char__.is_some() {
return Err(serde::de::Error::duplicate_field("escapeChar"));
}
- escape_char__ = Some(map.next_value()?);
+ escape_char__ = Some(map_.next_value()?);
}
}
}
@@ -8332,32 +8335,32 @@ impl<'de> serde::Deserialize<'de> for InListNode {
formatter.write_str("struct datafusion.InListNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<InListNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<InListNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut list__ = None;
let mut negated__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::List => {
if list__.is_some() {
return Err(serde::de::Error::duplicate_field("list"));
}
- list__ = Some(map.next_value()?);
+ list__ = Some(map_.next_value()?);
}
GeneratedField::Negated => {
if negated__.is_some() {
return Err(serde::de::Error::duplicate_field("negated"));
}
- negated__ = Some(map.next_value()?);
+ negated__ = Some(map_.next_value()?);
}
}
}
@@ -8396,6 +8399,7 @@ impl serde::Serialize for IntervalMonthDayNanoValue {
struct_ser.serialize_field("days", &self.days)?;
}
if self.nanos != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("nanos", ToString::to_string(&self.nanos).as_str())?;
}
struct_ser.end()
@@ -8457,21 +8461,21 @@ impl<'de> serde::Deserialize<'de> for IntervalMonthDayNanoValue {
formatter.write_str("struct datafusion.IntervalMonthDayNanoValue")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IntervalMonthDayNanoValue, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IntervalMonthDayNanoValue, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut months__ = None;
let mut days__ = None;
let mut nanos__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Months => {
if months__.is_some() {
return Err(serde::de::Error::duplicate_field("months"));
}
months__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::Days => {
@@ -8479,7 +8483,7 @@ impl<'de> serde::Deserialize<'de> for IntervalMonthDayNanoValue {
return Err(serde::de::Error::duplicate_field("days"));
}
days__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::Nanos => {
@@ -8487,7 +8491,7 @@ impl<'de> serde::Deserialize<'de> for IntervalMonthDayNanoValue {
return Err(serde::de::Error::duplicate_field("nanos"));
}
nanos__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -8541,10 +8545,9 @@ impl<'de> serde::Deserialize<'de> for IntervalUnit {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(IntervalUnit::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -8554,10 +8557,9 @@ impl<'de> serde::Deserialize<'de> for IntervalUnit {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(IntervalUnit::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -8646,18 +8648,18 @@ impl<'de> serde::Deserialize<'de> for IsFalse {
formatter.write_str("struct datafusion.IsFalse")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IsFalse, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IsFalse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -8737,18 +8739,18 @@ impl<'de> serde::Deserialize<'de> for IsNotFalse {
formatter.write_str("struct datafusion.IsNotFalse")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IsNotFalse, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IsNotFalse, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -8828,18 +8830,18 @@ impl<'de> serde::Deserialize<'de> for IsNotNull {
formatter.write_str("struct datafusion.IsNotNull")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IsNotNull, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IsNotNull, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -8919,18 +8921,18 @@ impl<'de> serde::Deserialize<'de> for IsNotTrue {
formatter.write_str("struct datafusion.IsNotTrue")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IsNotTrue, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IsNotTrue, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -9010,18 +9012,18 @@ impl<'de> serde::Deserialize<'de> for IsNotUnknown {
formatter.write_str("struct datafusion.IsNotUnknown")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IsNotUnknown, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IsNotUnknown, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -9101,18 +9103,18 @@ impl<'de> serde::Deserialize<'de> for IsNull {
formatter.write_str("struct datafusion.IsNull")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IsNull, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IsNull, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -9192,18 +9194,18 @@ impl<'de> serde::Deserialize<'de> for IsTrue {
formatter.write_str("struct datafusion.IsTrue")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IsTrue, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IsTrue, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -9283,18 +9285,18 @@ impl<'de> serde::Deserialize<'de> for IsUnknown {
formatter.write_str("struct datafusion.IsUnknown")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<IsUnknown, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<IsUnknown, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -9343,10 +9345,9 @@ impl<'de> serde::Deserialize<'de> for JoinConstraint {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(JoinConstraint::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -9356,10 +9357,9 @@ impl<'de> serde::Deserialize<'de> for JoinConstraint {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(JoinConstraint::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -9466,32 +9466,32 @@ impl<'de> serde::Deserialize<'de> for JoinFilter {
formatter.write_str("struct datafusion.JoinFilter")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<JoinFilter, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<JoinFilter, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expression__ = None;
let mut column_indices__ = None;
let mut schema__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Expression => {
if expression__.is_some() {
return Err(serde::de::Error::duplicate_field("expression"));
}
- expression__ = map.next_value()?;
+ expression__ = map_.next_value()?;
}
GeneratedField::ColumnIndices => {
if column_indices__.is_some() {
return Err(serde::de::Error::duplicate_field("columnIndices"));
}
- column_indices__ = Some(map.next_value()?);
+ column_indices__ = Some(map_.next_value()?);
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = map.next_value()?;
+ schema__ = map_.next_value()?;
}
}
}
@@ -9545,13 +9545,13 @@ impl serde::Serialize for JoinNode {
struct_ser.serialize_field("right", v)?;
}
if self.join_type != 0 {
- let v = JoinType::from_i32(self.join_type)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
+ let v = JoinType::try_from(self.join_type)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
struct_ser.serialize_field("joinType", &v)?;
}
if self.join_constraint != 0 {
- let v = JoinConstraint::from_i32(self.join_constraint)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.join_constraint)))?;
+ let v = JoinConstraint::try_from(self.join_constraint)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.join_constraint)))?;
struct_ser.serialize_field("joinConstraint", &v)?;
}
if !self.left_join_key.is_empty() {
@@ -9645,7 +9645,7 @@ impl<'de> serde::Deserialize<'de> for JoinNode {
formatter.write_str("struct datafusion.JoinNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<JoinNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<JoinNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -9657,55 +9657,55 @@ impl<'de> serde::Deserialize<'de> for JoinNode {
let mut right_join_key__ = None;
let mut null_equals_null__ = None;
let mut filter__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ left__ = map_.next_value()?;
}
GeneratedField::Right => {
if right__.is_some() {
return Err(serde::de::Error::duplicate_field("right"));
}
- right__ = map.next_value()?;
+ right__ = map_.next_value()?;
}
GeneratedField::JoinType => {
if join_type__.is_some() {
return Err(serde::de::Error::duplicate_field("joinType"));
}
- join_type__ = Some(map.next_value::<JoinType>()? as i32);
+ join_type__ = Some(map_.next_value::<JoinType>()? as i32);
}
GeneratedField::JoinConstraint => {
if join_constraint__.is_some() {
return Err(serde::de::Error::duplicate_field("joinConstraint"));
}
- join_constraint__ = Some(map.next_value::<JoinConstraint>()? as i32);
+ join_constraint__ = Some(map_.next_value::<JoinConstraint>()? as i32);
}
GeneratedField::LeftJoinKey => {
if left_join_key__.is_some() {
return Err(serde::de::Error::duplicate_field("leftJoinKey"));
}
- left_join_key__ = Some(map.next_value()?);
+ left_join_key__ = Some(map_.next_value()?);
}
GeneratedField::RightJoinKey => {
if right_join_key__.is_some() {
return Err(serde::de::Error::duplicate_field("rightJoinKey"));
}
- right_join_key__ = Some(map.next_value()?);
+ right_join_key__ = Some(map_.next_value()?);
}
GeneratedField::NullEqualsNull => {
if null_equals_null__.is_some() {
return Err(serde::de::Error::duplicate_field("nullEqualsNull"));
}
- null_equals_null__ = Some(map.next_value()?);
+ null_equals_null__ = Some(map_.next_value()?);
}
GeneratedField::Filter => {
if filter__.is_some() {
return Err(serde::de::Error::duplicate_field("filter"));
}
- filter__ = map.next_value()?;
+ filter__ = map_.next_value()?;
}
}
}
@@ -9801,25 +9801,25 @@ impl<'de> serde::Deserialize<'de> for JoinOn {
formatter.write_str("struct datafusion.JoinOn")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<JoinOn, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<JoinOn, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut left__ = None;
let mut right__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ left__ = map_.next_value()?;
}
GeneratedField::Right => {
if right__.is_some() {
return Err(serde::de::Error::duplicate_field("right"));
}
- right__ = map.next_value()?;
+ right__ = map_.next_value()?;
}
}
}
@@ -9869,10 +9869,9 @@ impl<'de> serde::Deserialize<'de> for JoinSide {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(JoinSide::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -9882,10 +9881,9 @@ impl<'de> serde::Deserialize<'de> for JoinSide {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(JoinSide::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -9954,10 +9952,9 @@ impl<'de> serde::Deserialize<'de> for JoinType {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(JoinType::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -9967,10 +9964,9 @@ impl<'de> serde::Deserialize<'de> for JoinType {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(JoinType::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -10092,7 +10088,7 @@ impl<'de> serde::Deserialize<'de> for LikeNode {
formatter.write_str("struct datafusion.LikeNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<LikeNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<LikeNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -10100,31 +10096,31 @@ impl<'de> serde::Deserialize<'de> for LikeNode {
let mut expr__ = None;
let mut pattern__ = None;
let mut escape_char__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Negated => {
if negated__.is_some() {
return Err(serde::de::Error::duplicate_field("negated"));
}
- negated__ = Some(map.next_value()?);
+ negated__ = Some(map_.next_value()?);
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = map.next_value()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Pattern => {
if pattern__.is_some() {
return Err(serde::de::Error::duplicate_field("pattern"));
}
- pattern__ = map.next_value()?;
+ pattern__ = map_.next_value()?;
}
GeneratedField::EscapeChar => {
if escape_char__.is_some() {
return Err(serde::de::Error::duplicate_field("escapeChar"));
}
- escape_char__ = Some(map.next_value()?);
+ escape_char__ = Some(map_.next_value()?);
}
}
}
@@ -10161,9 +10157,11 @@ impl serde::Serialize for LimitNode {
struct_ser.serialize_field("input", v)?;
}
if self.skip != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("skip", ToString::to_string(&self.skip).as_str())?;
}
if self.fetch != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("fetch", ToString::to_string(&self.fetch).as_str())?;
}
struct_ser.end()
@@ -10225,27 +10223,27 @@ impl<'de> serde::Deserialize<'de> for LimitNode {
formatter.write_str("struct datafusion.LimitNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<LimitNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<LimitNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut skip__ = None;
let mut fetch__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Skip => {
if skip__.is_some() {
return Err(serde::de::Error::duplicate_field("skip"));
}
skip__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::Fetch => {
@@ -10253,7 +10251,7 @@ impl<'de> serde::Deserialize<'de> for LimitNode {
return Err(serde::de::Error::duplicate_field("fetch"));
}
fetch__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -10337,18 +10335,18 @@ impl<'de> serde::Deserialize<'de> for List {
formatter.write_str("struct datafusion.List")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<List, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<List, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut field_type__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ field_type__ = map_.next_value()?;
}
}
}
@@ -10428,18 +10426,18 @@ impl<'de> serde::Deserialize<'de> for ListIndex {
formatter.write_str("struct datafusion.ListIndex")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ListIndex, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListIndex, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut key__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ key__ = map_.next_value()?;
}
}
}
@@ -10519,18 +10517,18 @@ impl<'de> serde::Deserialize<'de> for ListIndexExpr {
formatter.write_str("struct datafusion.ListIndexExpr")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ListIndexExpr, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListIndexExpr, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut key__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ key__ = map_.next_value()?;
}
}
}
@@ -10619,25 +10617,25 @@ impl<'de> serde::Deserialize<'de> for ListRange {
formatter.write_str("struct datafusion.ListRange")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ListRange, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListRange, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut start__ = None;
let mut stop__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Start => {
if start__.is_some() {
return Err(serde::de::Error::duplicate_field("start"));
}
- start__ = map.next_value()?;
+ start__ = map_.next_value()?;
}
GeneratedField::Stop => {
if stop__.is_some() {
return Err(serde::de::Error::duplicate_field("stop"));
}
- stop__ = map.next_value()?;
+ stop__ = map_.next_value()?;
}
}
}
@@ -10727,25 +10725,25 @@ impl<'de> serde::Deserialize<'de> for ListRangeExpr {
formatter.write_str("struct datafusion.ListRangeExpr")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ListRangeExpr, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListRangeExpr, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut start__ = None;
let mut stop__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Start => {
if start__.is_some() {
return Err(serde::de::Error::duplicate_field("start"));
}
- start__ = map.next_value()?;
+ start__ = map_.next_value()?;
}
GeneratedField::Stop => {
if stop__.is_some() {
return Err(serde::de::Error::duplicate_field("stop"));
}
- stop__ = map.next_value()?;
+ stop__ = map_.next_value()?;
}
}
}
@@ -10938,7 +10936,7 @@ impl<'de> serde::Deserialize<'de> for ListingTableScanNode {
formatter.write_str("struct datafusion.ListingTableScanNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ListingTableScanNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ListingTableScanNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -10953,89 +10951,89 @@ impl<'de> serde::Deserialize<'de> for ListingTableScanNode {
let mut target_partitions__ = None;
let mut file_sort_order__ = None;
let mut file_format_type__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ table_name__ = map_.next_value()?;
}
GeneratedField::Paths => {
if paths__.is_some() {
return Err(serde::de::Error::duplicate_field("paths"));
}
- paths__ = Some(map.next_value()?);
+ paths__ = Some(map_.next_value()?);
}
GeneratedField::FileExtension => {
if file_extension__.is_some() {
return Err(serde::de::Error::duplicate_field("fileExtension"));
}
- file_extension__ = Some(map.next_value()?);
+ file_extension__ = Some(map_.next_value()?);
}
GeneratedField::Projection => {
if projection__.is_some() {
return Err(serde::de::Error::duplicate_field("projection"));
}
- projection__ = map.next_value()?;
+ projection__ = map_.next_value()?;
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = map.next_value()?;
+ schema__ = map_.next_value()?;
}
GeneratedField::Filters => {
if filters__.is_some() {
return Err(serde::de::Error::duplicate_field("filters"));
}
- filters__ = Some(map.next_value()?);
+ filters__ = Some(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()?);
+ table_partition_cols__ = Some(map_.next_value()?);
}
GeneratedField::CollectStat => {
if collect_stat__.is_some() {
return Err(serde::de::Error::duplicate_field("collectStat"));
}
- collect_stat__ = Some(map.next_value()?);
+ collect_stat__ = Some(map_.next_value()?);
}
GeneratedField::TargetPartitions => {
if target_partitions__.is_some() {
return Err(serde::de::Error::duplicate_field("targetPartitions"));
}
target_partitions__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::FileSortOrder => {
if file_sort_order__.is_some() {
return Err(serde::de::Error::duplicate_field("fileSortOrder"));
}
- file_sort_order__ = Some(map.next_value()?);
+ file_sort_order__ = Some(map_.next_value()?);
}
GeneratedField::Csv => {
if file_format_type__.is_some() {
return Err(serde::de::Error::duplicate_field("csv"));
}
- file_format_type__ = map.next_value::<::std::option::Option<_>>()?.map(listing_table_scan_node::FileFormatType::Csv)
+ file_format_type__ = map_.next_value::<::std::option::Option<_>>()?.map(listing_table_scan_node::FileFormatType::Csv)
;
}
GeneratedField::Parquet => {
if file_format_type__.is_some() {
return Err(serde::de::Error::duplicate_field("parquet"));
}
- file_format_type__ = map.next_value::<::std::option::Option<_>>()?.map(listing_table_scan_node::FileFormatType::Parquet)
+ file_format_type__ = map_.next_value::<::std::option::Option<_>>()?.map(listing_table_scan_node::FileFormatType::Parquet)
;
}
GeneratedField::Avro => {
if file_format_type__.is_some() {
return Err(serde::de::Error::duplicate_field("avro"));
}
- file_format_type__ = map.next_value::<::std::option::Option<_>>()?.map(listing_table_scan_node::FileFormatType::Avro)
+ file_format_type__ = map_.next_value::<::std::option::Option<_>>()?.map(listing_table_scan_node::FileFormatType::Avro)
;
}
}
@@ -11135,26 +11133,26 @@ impl<'de> serde::Deserialize<'de> for LocalLimitExecNode {
formatter.write_str("struct datafusion.LocalLimitExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<LocalLimitExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<LocalLimitExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut fetch__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Fetch => {
if fetch__.is_some() {
return Err(serde::de::Error::duplicate_field("fetch"));
}
fetch__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -11236,18 +11234,18 @@ impl<'de> serde::Deserialize<'de> for LogicalExprList {
formatter.write_str("struct datafusion.LogicalExprList")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<LogicalExprList, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<LogicalExprList, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ expr__ = Some(map_.next_value()?);
}
}
}
@@ -11550,248 +11548,248 @@ impl<'de> serde::Deserialize<'de> for LogicalExprNode {
formatter.write_str("struct datafusion.LogicalExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<LogicalExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<LogicalExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr_type__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Column => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("column"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Column)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Column)
;
}
GeneratedField::Alias => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("alias"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Alias)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Alias)
;
}
GeneratedField::Literal => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("literal"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Literal)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Literal)
;
}
GeneratedField::BinaryExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("binaryExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::BinaryExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::BinaryExpr)
;
}
GeneratedField::AggregateExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("aggregateExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::AggregateExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::AggregateExpr)
;
}
GeneratedField::IsNullExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isNullExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNullExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNullExpr)
;
}
GeneratedField::IsNotNullExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isNotNullExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNotNullExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNotNullExpr)
;
}
GeneratedField::NotExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("notExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::NotExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::NotExpr)
;
}
GeneratedField::Between => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("between"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Between)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Between)
;
}
GeneratedField::Case => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("case"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Case)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Case)
;
}
GeneratedField::Cast => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("cast"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Cast)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Cast)
;
}
GeneratedField::Sort => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("sort"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Sort)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Sort)
;
}
GeneratedField::Negative => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("negative"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Negative)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Negative)
;
}
GeneratedField::InList => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("inList"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::InList)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::InList)
;
}
GeneratedField::Wildcard => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("wildcard"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Wildcard);
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Wildcard);
}
GeneratedField::ScalarFunction => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("scalarFunction"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::ScalarFunction)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::ScalarFunction)
;
}
GeneratedField::TryCast => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("tryCast"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::TryCast)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::TryCast)
;
}
GeneratedField::WindowExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("windowExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::WindowExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::WindowExpr)
;
}
GeneratedField::AggregateUdfExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("aggregateUdfExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::AggregateUdfExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::AggregateUdfExpr)
;
}
GeneratedField::ScalarUdfExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("scalarUdfExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::ScalarUdfExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::ScalarUdfExpr)
;
}
GeneratedField::GetIndexedField => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("getIndexedField"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::GetIndexedField)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::GetIndexedField)
;
}
GeneratedField::GroupingSet => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("groupingSet"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::GroupingSet)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::GroupingSet)
;
}
GeneratedField::Cube => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("cube"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Cube)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Cube)
;
}
GeneratedField::Rollup => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("rollup"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Rollup)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Rollup)
;
}
GeneratedField::IsTrue => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isTrue"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsTrue)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsTrue)
;
}
GeneratedField::IsFalse => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isFalse"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsFalse)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsFalse)
;
}
GeneratedField::IsUnknown => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isUnknown"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsUnknown)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsUnknown)
;
}
GeneratedField::IsNotTrue => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isNotTrue"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNotTrue)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNotTrue)
;
}
GeneratedField::IsNotFalse => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isNotFalse"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNotFalse)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNotFalse)
;
}
GeneratedField::IsNotUnknown => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isNotUnknown"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNotUnknown)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::IsNotUnknown)
;
}
GeneratedField::Like => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("like"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Like)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Like)
;
}
GeneratedField::Ilike => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("ilike"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Ilike)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Ilike)
;
}
GeneratedField::SimilarTo => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("similarTo"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::SimilarTo)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::SimilarTo)
;
}
GeneratedField::Placeholder => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("placeholder"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Placeholder)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_expr_node::ExprType::Placeholder)
;
}
}
@@ -11873,18 +11871,18 @@ impl<'de> serde::Deserialize<'de> for LogicalExprNodeCollection {
formatter.write_str("struct datafusion.LogicalExprNodeCollection")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<LogicalExprNodeCollection, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<LogicalExprNodeCollection, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut logical_expr_nodes__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::LogicalExprNodes => {
if logical_expr_nodes__.is_some() {
return Err(serde::de::Error::duplicate_field("logicalExprNodes"));
}
- logical_expr_nodes__ = Some(map.next_value()?);
+ logical_expr_nodes__ = Some(map_.next_value()?);
}
}
}
@@ -11912,6 +11910,7 @@ impl serde::Serialize for LogicalExtensionNode {
}
let mut struct_ser = serializer.serialize_struct("datafusion.LogicalExtensionNode", len)?;
if !self.node.is_empty() {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("node", pbjson::private::base64::encode(&self.node).as_str())?;
}
if !self.inputs.is_empty() {
@@ -11973,27 +11972,27 @@ impl<'de> serde::Deserialize<'de> for LogicalExtensionNode {
formatter.write_str("struct datafusion.LogicalExtensionNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<LogicalExtensionNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<LogicalExtensionNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut node__ = None;
let mut inputs__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Node => {
if node__.is_some() {
return Err(serde::de::Error::duplicate_field("node"));
}
node__ =
- Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
;
}
GeneratedField::Inputs => {
if inputs__.is_some() {
return Err(serde::de::Error::duplicate_field("inputs"));
}
- inputs__ = Some(map.next_value()?);
+ inputs__ = Some(map_.next_value()?);
}
}
}
@@ -12239,193 +12238,193 @@ impl<'de> serde::Deserialize<'de> for LogicalPlanNode {
formatter.write_str("struct datafusion.LogicalPlanNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<LogicalPlanNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<LogicalPlanNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut logical_plan_type__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::ListingScan => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("listingScan"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::ListingScan)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::ListingScan)
;
}
GeneratedField::Projection => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("projection"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Projection)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Projection)
;
}
GeneratedField::Selection => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("selection"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Selection)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Selection)
;
}
GeneratedField::Limit => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("limit"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Limit)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Limit)
;
}
GeneratedField::Aggregate => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("aggregate"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Aggregate)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Aggregate)
;
}
GeneratedField::Join => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("join"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Join)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Join)
;
}
GeneratedField::Sort => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("sort"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Sort)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Sort)
;
}
GeneratedField::Repartition => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("repartition"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Repartition)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Repartition)
;
}
GeneratedField::EmptyRelation => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("emptyRelation"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::EmptyRelation)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::EmptyRelation)
;
}
GeneratedField::CreateExternalTable => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("createExternalTable"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CreateExternalTable)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CreateExternalTable)
;
}
GeneratedField::Explain => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("explain"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Explain)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Explain)
;
}
GeneratedField::Window => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("window"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Window)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Window)
;
}
GeneratedField::Analyze => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("analyze"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Analyze)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Analyze)
;
}
GeneratedField::CrossJoin => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("crossJoin"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CrossJoin)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CrossJoin)
;
}
GeneratedField::Values => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("values"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Values)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Values)
;
}
GeneratedField::Extension => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("extension"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Extension)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Extension)
;
}
GeneratedField::CreateCatalogSchema => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("createCatalogSchema"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CreateCatalogSchema)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CreateCatalogSchema)
;
}
GeneratedField::Union => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("union"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Union)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Union)
;
}
GeneratedField::CreateCatalog => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("createCatalog"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CreateCatalog)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CreateCatalog)
;
}
GeneratedField::SubqueryAlias => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("subqueryAlias"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::SubqueryAlias)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::SubqueryAlias)
;
}
GeneratedField::CreateView => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("createView"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CreateView)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CreateView)
;
}
GeneratedField::Distinct => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("distinct"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Distinct)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Distinct)
;
}
GeneratedField::ViewScan => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("viewScan"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::ViewScan)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::ViewScan)
;
}
GeneratedField::CustomScan => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("customScan"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CustomScan)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::CustomScan)
;
}
GeneratedField::Prepare => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("prepare"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Prepare)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::Prepare)
;
}
GeneratedField::DropView => {
if logical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("dropView"));
}
- logical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::DropView)
+ logical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(logical_plan_node::LogicalPlanType::DropView)
;
}
}
@@ -12517,25 +12516,25 @@ impl<'de> serde::Deserialize<'de> for Map {
formatter.write_str("struct datafusion.Map")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Map, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Map, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut field_type__ = None;
let mut keys_sorted__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ field_type__ = map_.next_value()?;
}
GeneratedField::KeysSorted => {
if keys_sorted__.is_some() {
return Err(serde::de::Error::duplicate_field("keysSorted"));
}
- keys_sorted__ = Some(map.next_value()?);
+ keys_sorted__ = Some(map_.next_value()?);
}
}
}
@@ -12616,18 +12615,18 @@ impl<'de> serde::Deserialize<'de> for MaybeFilter {
formatter.write_str("struct datafusion.MaybeFilter")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<MaybeFilter, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<MaybeFilter, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -12708,18 +12707,18 @@ impl<'de> serde::Deserialize<'de> for MaybePhysicalSortExprs {
formatter.write_str("struct datafusion.MaybePhysicalSortExprs")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<MaybePhysicalSortExprs, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<MaybePhysicalSortExprs, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut sort_expr__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::SortExpr => {
if sort_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("sortExpr"));
}
- sort_expr__ = Some(map.next_value()?);
+ sort_expr__ = Some(map_.next_value()?);
}
}
}
@@ -12799,18 +12798,18 @@ impl<'de> serde::Deserialize<'de> for NamedStructField {
formatter.write_str("struct datafusion.NamedStructField")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<NamedStructField, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<NamedStructField, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut name__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ name__ = map_.next_value()?;
}
}
}
@@ -12890,18 +12889,18 @@ impl<'de> serde::Deserialize<'de> for NamedStructFieldExpr {
formatter.write_str("struct datafusion.NamedStructFieldExpr")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<NamedStructFieldExpr, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<NamedStructFieldExpr, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut name__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ name__ = map_.next_value()?;
}
}
}
@@ -12981,18 +12980,18 @@ impl<'de> serde::Deserialize<'de> for NegativeNode {
formatter.write_str("struct datafusion.NegativeNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<NegativeNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<NegativeNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -13032,8 +13031,8 @@ impl serde::Serialize for NestedLoopJoinExecNode {
struct_ser.serialize_field("right", v)?;
}
if self.join_type != 0 {
- let v = JoinType::from_i32(self.join_type)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
+ let v = JoinType::try_from(self.join_type)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.join_type)))?;
struct_ser.serialize_field("joinType", &v)?;
}
if let Some(v) = self.filter.as_ref() {
@@ -13102,7 +13101,7 @@ impl<'de> serde::Deserialize<'de> for NestedLoopJoinExecNode {
formatter.write_str("struct datafusion.NestedLoopJoinExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<NestedLoopJoinExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<NestedLoopJoinExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -13110,31 +13109,31 @@ impl<'de> serde::Deserialize<'de> for NestedLoopJoinExecNode {
let mut right__ = None;
let mut join_type__ = None;
let mut filter__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ left__ = map_.next_value()?;
}
GeneratedField::Right => {
if right__.is_some() {
return Err(serde::de::Error::duplicate_field("right"));
}
- right__ = map.next_value()?;
+ right__ = map_.next_value()?;
}
GeneratedField::JoinType => {
if join_type__.is_some() {
return Err(serde::de::Error::duplicate_field("joinType"));
}
- join_type__ = Some(map.next_value::<JoinType>()? as i32);
+ join_type__ = Some(map_.next_value::<JoinType>()? as i32);
}
GeneratedField::Filter => {
if filter__.is_some() {
return Err(serde::de::Error::duplicate_field("filter"));
}
- filter__ = map.next_value()?;
+ filter__ = map_.next_value()?;
}
}
}
@@ -13217,18 +13216,18 @@ impl<'de> serde::Deserialize<'de> for Not {
formatter.write_str("struct datafusion.Not")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Not, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Not, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -13309,18 +13308,18 @@ impl<'de> serde::Deserialize<'de> for OptimizedLogicalPlanType {
formatter.write_str("struct datafusion.OptimizedLogicalPlanType")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<OptimizedLogicalPlanType, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<OptimizedLogicalPlanType, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut optimizer_name__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::OptimizerName => {
if optimizer_name__.is_some() {
return Err(serde::de::Error::duplicate_field("optimizerName"));
}
- optimizer_name__ = Some(map.next_value()?);
+ optimizer_name__ = Some(map_.next_value()?);
}
}
}
@@ -13401,18 +13400,18 @@ impl<'de> serde::Deserialize<'de> for OptimizedPhysicalPlanType {
formatter.write_str("struct datafusion.OptimizedPhysicalPlanType")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<OptimizedPhysicalPlanType, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<OptimizedPhysicalPlanType, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut optimizer_name__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::OptimizerName => {
if optimizer_name__.is_some() {
return Err(serde::de::Error::duplicate_field("optimizerName"));
}
- optimizer_name__ = Some(map.next_value()?);
+ optimizer_name__ = Some(map_.next_value()?);
}
}
}
@@ -13508,32 +13507,32 @@ impl<'de> serde::Deserialize<'de> for OwnedTableReference {
formatter.write_str("struct datafusion.OwnedTableReference")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<OwnedTableReference, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<OwnedTableReference, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut table_reference_enum__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Bare => {
if table_reference_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("bare"));
}
- table_reference_enum__ = map.next_value::<::std::option::Option<_>>()?.map(owned_table_reference::TableReferenceEnum::Bare)
+ table_reference_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(owned_table_reference::TableReferenceEnum::Bare)
;
}
GeneratedField::Partial => {
if table_reference_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("partial"));
}
- table_reference_enum__ = map.next_value::<::std::option::Option<_>>()?.map(owned_table_reference::TableReferenceEnum::Partial)
+ table_reference_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(owned_table_reference::TableReferenceEnum::Partial)
;
}
GeneratedField::Full => {
if table_reference_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("full"));
}
- table_reference_enum__ = map.next_value::<::std::option::Option<_>>()?.map(owned_table_reference::TableReferenceEnum::Full)
+ table_reference_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(owned_table_reference::TableReferenceEnum::Full)
;
}
}
@@ -13603,12 +13602,12 @@ impl<'de> serde::Deserialize<'de> for ParquetFormat {
formatter.write_str("struct datafusion.ParquetFormat")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ParquetFormat, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ParquetFormat, V::Error>
where
V: serde::de::MapAccess<'de>,
{
- while map.next_key::<GeneratedField>()?.is_some() {
- let _ = map.next_value::<serde::de::IgnoredAny>()?;
+ while map_.next_key::<GeneratedField>()?.is_some() {
+ let _ = map_.next_value::<serde::de::IgnoredAny>()?;
}
Ok(ParquetFormat {
})
@@ -13695,25 +13694,25 @@ impl<'de> serde::Deserialize<'de> for ParquetScanExecNode {
formatter.write_str("struct datafusion.ParquetScanExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ParquetScanExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ParquetScanExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut base_conf__ = None;
let mut predicate__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ base_conf__ = map_.next_value()?;
}
GeneratedField::Predicate => {
if predicate__.is_some() {
return Err(serde::de::Error::duplicate_field("predicate"));
}
- predicate__ = map.next_value()?;
+ predicate__ = map_.next_value()?;
}
}
}
@@ -13803,25 +13802,25 @@ impl<'de> serde::Deserialize<'de> for PartialTableReference {
formatter.write_str("struct datafusion.PartialTableReference")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PartialTableReference, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PartialTableReference, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut schema__ = None;
let mut table__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = Some(map.next_value()?);
+ schema__ = Some(map_.next_value()?);
}
GeneratedField::Table => {
if table__.is_some() {
return Err(serde::de::Error::duplicate_field("table"));
}
- table__ = Some(map.next_value()?);
+ table__ = Some(map_.next_value()?);
}
}
}
@@ -13902,19 +13901,19 @@ impl<'de> serde::Deserialize<'de> for PartiallySortedPartitionSearchMode {
formatter.write_str("struct datafusion.PartiallySortedPartitionSearchMode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PartiallySortedPartitionSearchMode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PartiallySortedPartitionSearchMode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut columns__ = None;
- while let Some(k) = map.next_key()? {
+ 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::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
+ Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
.into_iter().map(|x| x.0).collect())
;
}
@@ -13967,10 +13966,9 @@ impl<'de> serde::Deserialize<'de> for PartitionMode {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(PartitionMode::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -13980,10 +13978,9 @@ impl<'de> serde::Deserialize<'de> for PartitionMode {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(PartitionMode::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -14026,12 +14023,15 @@ impl serde::Serialize for PartitionStats {
}
let mut struct_ser = serializer.serialize_struct("datafusion.PartitionStats", len)?;
if self.num_rows != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("numRows", ToString::to_string(&self.num_rows).as_str())?;
}
if self.num_batches != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("numBatches", ToString::to_string(&self.num_batches).as_str())?;
}
if self.num_bytes != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("numBytes", ToString::to_string(&self.num_bytes).as_str())?;
}
if !self.column_stats.is_empty() {
@@ -14103,7 +14103,7 @@ impl<'de> serde::Deserialize<'de> for PartitionStats {
formatter.write_str("struct datafusion.PartitionStats")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PartitionStats, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PartitionStats, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -14111,14 +14111,14 @@ impl<'de> serde::Deserialize<'de> for PartitionStats {
let mut num_batches__ = None;
let mut num_bytes__ = None;
let mut column_stats__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::NumRows => {
if num_rows__.is_some() {
return Err(serde::de::Error::duplicate_field("numRows"));
}
num_rows__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::NumBatches => {
@@ -14126,7 +14126,7 @@ impl<'de> serde::Deserialize<'de> for PartitionStats {
return Err(serde::de::Error::duplicate_field("numBatches"));
}
num_batches__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::NumBytes => {
@@ -14134,14 +14134,14 @@ impl<'de> serde::Deserialize<'de> for PartitionStats {
return Err(serde::de::Error::duplicate_field("numBytes"));
}
num_bytes__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::ColumnStats => {
if column_stats__.is_some() {
return Err(serde::de::Error::duplicate_field("columnStats"));
}
- column_stats__ = Some(map.next_value()?);
+ column_stats__ = Some(map_.next_value()?);
}
}
}
@@ -14184,9 +14184,11 @@ impl serde::Serialize for PartitionedFile {
struct_ser.serialize_field("path", &self.path)?;
}
if self.size != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("size", ToString::to_string(&self.size).as_str())?;
}
if self.last_modified_ns != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("lastModifiedNs", ToString::to_string(&self.last_modified_ns).as_str())?;
}
if !self.partition_values.is_empty() {
@@ -14262,7 +14264,7 @@ impl<'de> serde::Deserialize<'de> for PartitionedFile {
formatter.write_str("struct datafusion.PartitionedFile")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PartitionedFile, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PartitionedFile, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -14271,20 +14273,20 @@ impl<'de> serde::Deserialize<'de> for PartitionedFile {
let mut last_modified_ns__ = None;
let mut partition_values__ = None;
let mut range__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Path => {
if path__.is_some() {
return Err(serde::de::Error::duplicate_field("path"));
}
- path__ = Some(map.next_value()?);
+ path__ = Some(map_.next_value()?);
}
GeneratedField::Size => {
if size__.is_some() {
return Err(serde::de::Error::duplicate_field("size"));
}
size__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::LastModifiedNs => {
@@ -14292,20 +14294,20 @@ impl<'de> serde::Deserialize<'de> for PartitionedFile {
return Err(serde::de::Error::duplicate_field("lastModifiedNs"));
}
last_modified_ns__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::PartitionValues => {
if partition_values__.is_some() {
return Err(serde::de::Error::duplicate_field("partitionValues"));
}
- partition_values__ = Some(map.next_value()?);
+ partition_values__ = Some(map_.next_value()?);
}
GeneratedField::Range => {
if range__.is_some() {
return Err(serde::de::Error::duplicate_field("range"));
}
- range__ = map.next_value()?;
+ range__ = map_.next_value()?;
}
}
}
@@ -14354,8 +14356,8 @@ impl serde::Serialize for PhysicalAggregateExprNode {
if let Some(v) = self.aggregate_function.as_ref() {
match v {
physical_aggregate_expr_node::AggregateFunction::AggrFunction(v) => {
- let v = AggregateFunction::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
+ let v = AggregateFunction::try_from(*v)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
struct_ser.serialize_field("aggrFunction", &v)?;
}
physical_aggregate_expr_node::AggregateFunction::UserDefinedAggrFunction(v) => {
@@ -14431,7 +14433,7 @@ impl<'de> serde::Deserialize<'de> for PhysicalAggregateExprNode {
formatter.write_str("struct datafusion.PhysicalAggregateExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalAggregateExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalAggregateExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -14439,37 +14441,37 @@ impl<'de> serde::Deserialize<'de> for PhysicalAggregateExprNode {
let mut ordering_req__ = None;
let mut distinct__ = None;
let mut aggregate_function__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ expr__ = Some(map_.next_value()?);
}
GeneratedField::OrderingReq => {
if ordering_req__.is_some() {
return Err(serde::de::Error::duplicate_field("orderingReq"));
}
- ordering_req__ = Some(map.next_value()?);
+ ordering_req__ = Some(map_.next_value()?);
}
GeneratedField::Distinct => {
if distinct__.is_some() {
return Err(serde::de::Error::duplicate_field("distinct"));
}
- distinct__ = Some(map.next_value()?);
+ distinct__ = Some(map_.next_value()?);
}
GeneratedField::AggrFunction => {
if aggregate_function__.is_some() {
return Err(serde::de::Error::duplicate_field("aggrFunction"));
}
- aggregate_function__ = map.next_value::<::std::option::Option<AggregateFunction>>()?.map(|x| physical_aggregate_expr_node::AggregateFunction::AggrFunction(x as i32));
+ aggregate_function__ = map_.next_value::<::std::option::Option<AggregateFunction>>()?.map(|x| physical_aggregate_expr_node::AggregateFunction::AggrFunction(x as i32));
}
GeneratedField::UserDefinedAggrFunction => {
if aggregate_function__.is_some() {
return Err(serde::de::Error::duplicate_field("userDefinedAggrFunction"));
}
- aggregate_function__ = map.next_value::<::std::option::Option<_>>()?.map(physical_aggregate_expr_node::AggregateFunction::UserDefinedAggrFunction);
+ aggregate_function__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_aggregate_expr_node::AggregateFunction::UserDefinedAggrFunction);
}
}
}
@@ -14561,25 +14563,25 @@ impl<'de> serde::Deserialize<'de> for PhysicalAliasNode {
formatter.write_str("struct datafusion.PhysicalAliasNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalAliasNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalAliasNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut alias__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Alias => {
if alias__.is_some() {
return Err(serde::de::Error::duplicate_field("alias"));
}
- alias__ = Some(map.next_value()?);
+ alias__ = Some(map_.next_value()?);
}
}
}
@@ -14678,32 +14680,32 @@ impl<'de> serde::Deserialize<'de> for PhysicalBinaryExprNode {
formatter.write_str("struct datafusion.PhysicalBinaryExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalBinaryExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalBinaryExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut l__ = None;
let mut r__ = None;
let mut op__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::L => {
if l__.is_some() {
return Err(serde::de::Error::duplicate_field("l"));
}
- l__ = map.next_value()?;
+ l__ = map_.next_value()?;
}
GeneratedField::R => {
if r__.is_some() {
return Err(serde::de::Error::duplicate_field("r"));
}
- r__ = map.next_value()?;
+ r__ = map_.next_value()?;
}
GeneratedField::Op => {
if op__.is_some() {
return Err(serde::de::Error::duplicate_field("op"));
}
- op__ = Some(map.next_value()?);
+ op__ = Some(map_.next_value()?);
}
}
}
@@ -14805,32 +14807,32 @@ impl<'de> serde::Deserialize<'de> for PhysicalCaseNode {
formatter.write_str("struct datafusion.PhysicalCaseNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalCaseNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalCaseNode, 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()? {
+ 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()?;
+ 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()?);
+ 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()?;
+ else_expr__ = map_.next_value()?;
}
}
}
@@ -14922,25 +14924,25 @@ impl<'de> serde::Deserialize<'de> for PhysicalCastNode {
formatter.write_str("struct datafusion.PhysicalCastNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalCastNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalCastNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut arrow_type__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::ArrowType => {
if arrow_type__.is_some() {
return Err(serde::de::Error::duplicate_field("arrowType"));
}
- arrow_type__ = map.next_value()?;
+ arrow_type__ = map_.next_value()?;
}
}
}
@@ -15030,26 +15032,26 @@ impl<'de> serde::Deserialize<'de> for PhysicalColumn {
formatter.write_str("struct datafusion.PhysicalColumn")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalColumn, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalColumn, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut name__ = None;
let mut index__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ name__ = Some(map_.next_value()?);
}
GeneratedField::Index => {
if index__.is_some() {
return Err(serde::de::Error::duplicate_field("index"));
}
index__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -15149,32 +15151,32 @@ impl<'de> serde::Deserialize<'de> for PhysicalDateTimeIntervalExprNode {
formatter.write_str("struct datafusion.PhysicalDateTimeIntervalExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalDateTimeIntervalExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalDateTimeIntervalExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut l__ = None;
let mut r__ = None;
let mut op__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::L => {
if l__.is_some() {
return Err(serde::de::Error::duplicate_field("l"));
}
- l__ = map.next_value()?;
+ l__ = map_.next_value()?;
}
GeneratedField::R => {
if r__.is_some() {
return Err(serde::de::Error::duplicate_field("r"));
}
- r__ = map.next_value()?;
+ r__ = map_.next_value()?;
}
GeneratedField::Op => {
if op__.is_some() {
return Err(serde::de::Error::duplicate_field("op"));
}
- op__ = Some(map.next_value()?);
+ op__ = Some(map_.next_value()?);
}
}
}
@@ -15375,137 +15377,137 @@ impl<'de> serde::Deserialize<'de> for PhysicalExprNode {
formatter.write_str("struct datafusion.PhysicalExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr_type__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Column => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("column"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Column)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Column)
;
}
GeneratedField::Literal => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("literal"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Literal)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Literal)
;
}
GeneratedField::BinaryExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("binaryExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::BinaryExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::BinaryExpr)
;
}
GeneratedField::AggregateExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("aggregateExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::AggregateExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::AggregateExpr)
;
}
GeneratedField::IsNullExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isNullExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::IsNullExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::IsNullExpr)
;
}
GeneratedField::IsNotNullExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("isNotNullExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::IsNotNullExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::IsNotNullExpr)
;
}
GeneratedField::NotExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("notExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::NotExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::NotExpr)
;
}
GeneratedField::Case => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("case"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Case)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Case)
;
}
GeneratedField::Cast => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("cast"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Cast)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Cast)
;
}
GeneratedField::Sort => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("sort"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Sort)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Sort)
;
}
GeneratedField::Negative => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("negative"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Negative)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::Negative)
;
}
GeneratedField::InList => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("inList"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::InList)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::InList)
;
}
GeneratedField::ScalarFunction => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("scalarFunction"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::ScalarFunction)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::ScalarFunction)
;
}
GeneratedField::TryCast => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("tryCast"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::TryCast)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::TryCast)
;
}
GeneratedField::WindowExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("windowExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::WindowExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::WindowExpr)
;
}
GeneratedField::ScalarUdf => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("scalarUdf"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::ScalarUdf)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::ScalarUdf)
;
}
GeneratedField::LikeExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("likeExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::LikeExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::LikeExpr)
;
}
GeneratedField::GetIndexedFieldExpr => {
if expr_type__.is_some() {
return Err(serde::de::Error::duplicate_field("getIndexedFieldExpr"));
}
- expr_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::GetIndexedFieldExpr)
+ expr_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_expr_node::ExprType::GetIndexedFieldExpr)
;
}
}
@@ -15534,6 +15536,7 @@ impl serde::Serialize for PhysicalExtensionNode {
}
let mut struct_ser = serializer.serialize_struct("datafusion.PhysicalExtensionNode", len)?;
if !self.node.is_empty() {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("node", pbjson::private::base64::encode(&self.node).as_str())?;
}
if !self.inputs.is_empty() {
@@ -15595,27 +15598,27 @@ impl<'de> serde::Deserialize<'de> for PhysicalExtensionNode {
formatter.write_str("struct datafusion.PhysicalExtensionNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalExtensionNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalExtensionNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut node__ = None;
let mut inputs__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Node => {
if node__.is_some() {
return Err(serde::de::Error::duplicate_field("node"));
}
node__ =
- Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
;
}
GeneratedField::Inputs => {
if inputs__.is_some() {
return Err(serde::de::Error::duplicate_field("inputs"));
}
- inputs__ = Some(map.next_value()?);
+ inputs__ = Some(map_.next_value()?);
}
}
}
@@ -15724,39 +15727,39 @@ impl<'de> serde::Deserialize<'de> for PhysicalGetIndexedFieldExprNode {
formatter.write_str("struct datafusion.PhysicalGetIndexedFieldExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalGetIndexedFieldExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalGetIndexedFieldExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut arg__ = None;
let mut field__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Arg => {
if arg__.is_some() {
return Err(serde::de::Error::duplicate_field("arg"));
}
- arg__ = map.next_value()?;
+ arg__ = map_.next_value()?;
}
GeneratedField::NamedStructFieldExpr => {
if field__.is_some() {
return Err(serde::de::Error::duplicate_field("namedStructFieldExpr"));
}
- field__ = map.next_value::<::std::option::Option<_>>()?.map(physical_get_indexed_field_expr_node::Field::NamedStructFieldExpr)
+ field__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_get_indexed_field_expr_node::Field::NamedStructFieldExpr)
;
}
GeneratedField::ListIndexExpr => {
if field__.is_some() {
return Err(serde::de::Error::duplicate_field("listIndexExpr"));
}
- field__ = map.next_value::<::std::option::Option<_>>()?.map(physical_get_indexed_field_expr_node::Field::ListIndexExpr)
+ field__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_get_indexed_field_expr_node::Field::ListIndexExpr)
;
}
GeneratedField::ListRangeExpr => {
if field__.is_some() {
return Err(serde::de::Error::duplicate_field("listRangeExpr"));
}
- field__ = map.next_value::<::std::option::Option<_>>()?.map(physical_get_indexed_field_expr_node::Field::ListRangeExpr)
+ field__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_get_indexed_field_expr_node::Field::ListRangeExpr)
;
}
}
@@ -15789,6 +15792,7 @@ impl serde::Serialize for PhysicalHashRepartition {
struct_ser.serialize_field("hashExpr", &self.hash_expr)?;
}
if self.partition_count != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("partitionCount", ToString::to_string(&self.partition_count).as_str())?;
}
struct_ser.end()
@@ -15849,26 +15853,26 @@ impl<'de> serde::Deserialize<'de> for PhysicalHashRepartition {
formatter.write_str("struct datafusion.PhysicalHashRepartition")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalHashRepartition, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalHashRepartition, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut hash_expr__ = None;
let mut partition_count__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::HashExpr => {
if hash_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("hashExpr"));
}
- hash_expr__ = Some(map.next_value()?);
+ hash_expr__ = Some(map_.next_value()?);
}
GeneratedField::PartitionCount => {
if partition_count__.is_some() {
return Err(serde::de::Error::duplicate_field("partitionCount"));
}
partition_count__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -15968,32 +15972,32 @@ impl<'de> serde::Deserialize<'de> for PhysicalInListNode {
formatter.write_str("struct datafusion.PhysicalInListNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalInListNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalInListNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut list__ = None;
let mut negated__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::List => {
if list__.is_some() {
return Err(serde::de::Error::duplicate_field("list"));
}
- list__ = Some(map.next_value()?);
+ list__ = Some(map_.next_value()?);
}
GeneratedField::Negated => {
if negated__.is_some() {
return Err(serde::de::Error::duplicate_field("negated"));
}
- negated__ = Some(map.next_value()?);
+ negated__ = Some(map_.next_value()?);
}
}
}
@@ -16075,18 +16079,18 @@ impl<'de> serde::Deserialize<'de> for PhysicalIsNotNull {
formatter.write_str("struct datafusion.PhysicalIsNotNull")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalIsNotNull, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalIsNotNull, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -16166,18 +16170,18 @@ impl<'de> serde::Deserialize<'de> for PhysicalIsNull {
formatter.write_str("struct datafusion.PhysicalIsNull")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalIsNull, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalIsNull, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -16285,7 +16289,7 @@ impl<'de> serde::Deserialize<'de> for PhysicalLikeExprNode {
formatter.write_str("struct datafusion.PhysicalLikeExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalLikeExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalLikeExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -16293,31 +16297,31 @@ impl<'de> serde::Deserialize<'de> for PhysicalLikeExprNode {
let mut case_insensitive__ = None;
let mut expr__ = None;
let mut pattern__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Negated => {
if negated__.is_some() {
return Err(serde::de::Error::duplicate_field("negated"));
}
- negated__ = Some(map.next_value()?);
+ negated__ = Some(map_.next_value()?);
}
GeneratedField::CaseInsensitive => {
if case_insensitive__.is_some() {
return Err(serde::de::Error::duplicate_field("caseInsensitive"));
}
- case_insensitive__ = Some(map.next_value()?);
+ case_insensitive__ = Some(map_.next_value()?);
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = map.next_value()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Pattern => {
if pattern__.is_some() {
return Err(serde::de::Error::duplicate_field("pattern"));
}
- pattern__ = map.next_value()?;
+ pattern__ = map_.next_value()?;
}
}
}
@@ -16400,18 +16404,18 @@ impl<'de> serde::Deserialize<'de> for PhysicalNegativeNode {
formatter.write_str("struct datafusion.PhysicalNegativeNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalNegativeNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalNegativeNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -16491,18 +16495,18 @@ impl<'de> serde::Deserialize<'de> for PhysicalNot {
formatter.write_str("struct datafusion.PhysicalNot")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalNot, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalNot, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -16722,165 +16726,165 @@ impl<'de> serde::Deserialize<'de> for PhysicalPlanNode {
formatter.write_str("struct datafusion.PhysicalPlanNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalPlanNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalPlanNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut physical_plan_type__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::ParquetScan => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("parquetScan"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::ParquetScan)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::ParquetScan)
;
}
GeneratedField::CsvScan => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("csvScan"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::CsvScan)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::CsvScan)
;
}
GeneratedField::Empty => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("empty"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Empty)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Empty)
;
}
GeneratedField::Projection => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("projection"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Projection)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Projection)
;
}
GeneratedField::GlobalLimit => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("globalLimit"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::GlobalLimit)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::GlobalLimit)
;
}
GeneratedField::LocalLimit => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("localLimit"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::LocalLimit)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::LocalLimit)
;
}
GeneratedField::Aggregate => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("aggregate"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Aggregate)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Aggregate)
;
}
GeneratedField::HashJoin => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("hashJoin"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::HashJoin)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::HashJoin)
;
}
GeneratedField::Sort => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("sort"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Sort)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Sort)
;
}
GeneratedField::CoalesceBatches => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("coalesceBatches"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::CoalesceBatches)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::CoalesceBatches)
;
}
GeneratedField::Filter => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("filter"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Filter)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Filter)
;
}
GeneratedField::Merge => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("merge"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Merge)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Merge)
;
}
GeneratedField::Repartition => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("repartition"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Repartition)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Repartition)
;
}
GeneratedField::Window => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("window"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Window)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Window)
;
}
GeneratedField::CrossJoin => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("crossJoin"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::CrossJoin)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::CrossJoin)
;
}
GeneratedField::AvroScan => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("avroScan"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::AvroScan)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::AvroScan)
;
}
GeneratedField::Extension => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("extension"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Extension)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Extension)
;
}
GeneratedField::Union => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("union"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Union)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Union)
;
}
GeneratedField::Explain => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("explain"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Explain)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Explain)
;
}
GeneratedField::SortPreservingMerge => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("sortPreservingMerge"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::SortPreservingMerge)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::SortPreservingMerge)
;
}
GeneratedField::NestedLoopJoin => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("nestedLoopJoin"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::NestedLoopJoin)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::NestedLoopJoin)
;
}
GeneratedField::Analyze => {
if physical_plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("analyze"));
}
- physical_plan_type__ = map.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Analyze)
+ physical_plan_type__ = map_.next_value::<::std::option::Option<_>>()?.map(physical_plan_node::PhysicalPlanType::Analyze)
;
}
}
@@ -16918,8 +16922,8 @@ impl serde::Serialize for PhysicalScalarFunctionNode {
struct_ser.serialize_field("name", &self.name)?;
}
if self.fun != 0 {
- let v = ScalarFunction::from_i32(self.fun)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.fun)))?;
+ let v = ScalarFunction::try_from(self.fun)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.fun)))?;
struct_ser.serialize_field("fun", &v)?;
}
if !self.args.is_empty() {
@@ -16991,7 +16995,7 @@ impl<'de> serde::Deserialize<'de> for PhysicalScalarFunctionNode {
formatter.write_str("struct datafusion.PhysicalScalarFunctionNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalScalarFunctionNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalScalarFunctionNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -16999,31 +17003,31 @@ impl<'de> serde::Deserialize<'de> for PhysicalScalarFunctionNode {
let mut fun__ = None;
let mut args__ = None;
let mut return_type__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ name__ = Some(map_.next_value()?);
}
GeneratedField::Fun => {
if fun__.is_some() {
return Err(serde::de::Error::duplicate_field("fun"));
}
- fun__ = Some(map.next_value::<ScalarFunction>()? as i32);
+ fun__ = Some(map_.next_value::<ScalarFunction>()? as i32);
}
GeneratedField::Args => {
if args__.is_some() {
return Err(serde::de::Error::duplicate_field("args"));
}
- args__ = Some(map.next_value()?);
+ args__ = Some(map_.next_value()?);
}
GeneratedField::ReturnType => {
if return_type__.is_some() {
return Err(serde::de::Error::duplicate_field("returnType"));
}
- return_type__ = map.next_value()?;
+ return_type__ = map_.next_value()?;
}
}
}
@@ -17125,32 +17129,32 @@ impl<'de> serde::Deserialize<'de> for PhysicalScalarUdfNode {
formatter.write_str("struct datafusion.PhysicalScalarUdfNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalScalarUdfNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalScalarUdfNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut name__ = None;
let mut args__ = None;
let mut return_type__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ name__ = Some(map_.next_value()?);
}
GeneratedField::Args => {
if args__.is_some() {
return Err(serde::de::Error::duplicate_field("args"));
}
- args__ = Some(map.next_value()?);
+ args__ = Some(map_.next_value()?);
}
GeneratedField::ReturnType => {
if return_type__.is_some() {
return Err(serde::de::Error::duplicate_field("returnType"));
}
- return_type__ = map.next_value()?;
+ return_type__ = map_.next_value()?;
}
}
}
@@ -17251,32 +17255,32 @@ impl<'de> serde::Deserialize<'de> for PhysicalSortExprNode {
formatter.write_str("struct datafusion.PhysicalSortExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalSortExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalSortExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut asc__ = None;
let mut nulls_first__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Asc => {
if asc__.is_some() {
return Err(serde::de::Error::duplicate_field("asc"));
}
- asc__ = Some(map.next_value()?);
+ asc__ = Some(map_.next_value()?);
}
GeneratedField::NullsFirst => {
if nulls_first__.is_some() {
return Err(serde::de::Error::duplicate_field("nullsFirst"));
}
- nulls_first__ = Some(map.next_value()?);
+ nulls_first__ = Some(map_.next_value()?);
}
}
}
@@ -17359,18 +17363,18 @@ impl<'de> serde::Deserialize<'de> for PhysicalSortExprNodeCollection {
formatter.write_str("struct datafusion.PhysicalSortExprNodeCollection")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalSortExprNodeCollection, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalSortExprNodeCollection, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut physical_sort_expr_nodes__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::PhysicalSortExprNodes => {
if physical_sort_expr_nodes__.is_some() {
return Err(serde::de::Error::duplicate_field("physicalSortExprNodes"));
}
- physical_sort_expr_nodes__ = Some(map.next_value()?);
+ physical_sort_expr_nodes__ = Some(map_.next_value()?);
}
}
}
@@ -17460,25 +17464,25 @@ impl<'de> serde::Deserialize<'de> for PhysicalTryCastNode {
formatter.write_str("struct datafusion.PhysicalTryCastNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalTryCastNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalTryCastNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut arrow_type__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::ArrowType => {
if arrow_type__.is_some() {
return Err(serde::de::Error::duplicate_field("arrowType"));
}
- arrow_type__ = map.next_value()?;
+ arrow_type__ = map_.next_value()?;
}
}
}
@@ -17570,25 +17574,25 @@ impl<'de> serde::Deserialize<'de> for PhysicalWhenThen {
formatter.write_str("struct datafusion.PhysicalWhenThen")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalWhenThen, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalWhenThen, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut when_expr__ = None;
let mut then_expr__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::WhenExpr => {
if when_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("whenExpr"));
}
- when_expr__ = map.next_value()?;
+ when_expr__ = map_.next_value()?;
}
GeneratedField::ThenExpr => {
if then_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("thenExpr"));
}
- then_expr__ = map.next_value()?;
+ then_expr__ = map_.next_value()?;
}
}
}
@@ -17646,13 +17650,13 @@ impl serde::Serialize for PhysicalWindowExprNode {
if let Some(v) = self.window_function.as_ref() {
match v {
physical_window_expr_node::WindowFunction::AggrFunction(v) => {
- let v = AggregateFunction::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
+ let v = AggregateFunction::try_from(*v)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
struct_ser.serialize_field("aggrFunction", &v)?;
}
physical_window_expr_node::WindowFunction::BuiltInFunction(v) => {
- let v = BuiltInWindowFunction::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
+ let v = BuiltInWindowFunction::try_from(*v)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
struct_ser.serialize_field("builtInFunction", &v)?;
}
}
@@ -17733,7 +17737,7 @@ impl<'de> serde::Deserialize<'de> for PhysicalWindowExprNode {
formatter.write_str("struct datafusion.PhysicalWindowExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PhysicalWindowExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PhysicalWindowExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -17743,49 +17747,49 @@ impl<'de> serde::Deserialize<'de> for PhysicalWindowExprNode {
let mut window_frame__ = None;
let mut name__ = None;
let mut window_function__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Args => {
if args__.is_some() {
return Err(serde::de::Error::duplicate_field("args"));
}
- args__ = Some(map.next_value()?);
+ args__ = Some(map_.next_value()?);
}
GeneratedField::PartitionBy => {
if partition_by__.is_some() {
return Err(serde::de::Error::duplicate_field("partitionBy"));
}
- partition_by__ = Some(map.next_value()?);
+ partition_by__ = Some(map_.next_value()?);
}
GeneratedField::OrderBy => {
if order_by__.is_some() {
return Err(serde::de::Error::duplicate_field("orderBy"));
}
- order_by__ = Some(map.next_value()?);
+ order_by__ = Some(map_.next_value()?);
}
GeneratedField::WindowFrame => {
if window_frame__.is_some() {
return Err(serde::de::Error::duplicate_field("windowFrame"));
}
- window_frame__ = map.next_value()?;
+ window_frame__ = map_.next_value()?;
}
GeneratedField::Name => {
if name__.is_some() {
return Err(serde::de::Error::duplicate_field("name"));
}
- name__ = Some(map.next_value()?);
+ name__ = Some(map_.next_value()?);
}
GeneratedField::AggrFunction => {
if window_function__.is_some() {
return Err(serde::de::Error::duplicate_field("aggrFunction"));
}
- window_function__ = map.next_value::<::std::option::Option<AggregateFunction>>()?.map(|x| physical_window_expr_node::WindowFunction::AggrFunction(x as i32));
+ window_function__ = map_.next_value::<::std::option::Option<AggregateFunction>>()?.map(|x| physical_window_expr_node::WindowFunction::AggrFunction(x as i32));
}
GeneratedField::BuiltInFunction => {
if window_function__.is_some() {
return Err(serde::de::Error::duplicate_field("builtInFunction"));
}
- window_function__ = map.next_value::<::std::option::Option<BuiltInWindowFunction>>()?.map(|x| physical_window_expr_node::WindowFunction::BuiltInFunction(x as i32));
+ window_function__ = map_.next_value::<::std::option::Option<BuiltInWindowFunction>>()?.map(|x| physical_window_expr_node::WindowFunction::BuiltInFunction(x as i32));
}
}
}
@@ -17880,25 +17884,25 @@ impl<'de> serde::Deserialize<'de> for PlaceholderNode {
formatter.write_str("struct datafusion.PlaceholderNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PlaceholderNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PlaceholderNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut id__ = None;
let mut data_type__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Id => {
if id__.is_some() {
return Err(serde::de::Error::duplicate_field("id"));
}
- id__ = Some(map.next_value()?);
+ id__ = Some(map_.next_value()?);
}
GeneratedField::DataType => {
if data_type__.is_some() {
return Err(serde::de::Error::duplicate_field("dataType"));
}
- data_type__ = map.next_value()?;
+ data_type__ = map_.next_value()?;
}
}
}
@@ -18025,67 +18029,67 @@ impl<'de> serde::Deserialize<'de> for PlanType {
formatter.write_str("struct datafusion.PlanType")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PlanType, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PlanType, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut plan_type_enum__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::InitialLogicalPlan => {
if plan_type_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("InitialLogicalPlan"));
}
- plan_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::InitialLogicalPlan)
+ plan_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::InitialLogicalPlan)
;
}
GeneratedField::AnalyzedLogicalPlan => {
if plan_type_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("AnalyzedLogicalPlan"));
}
- plan_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::AnalyzedLogicalPlan)
+ plan_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::AnalyzedLogicalPlan)
;
}
GeneratedField::FinalAnalyzedLogicalPlan => {
if plan_type_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("FinalAnalyzedLogicalPlan"));
}
- plan_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::FinalAnalyzedLogicalPlan)
+ plan_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::FinalAnalyzedLogicalPlan)
;
}
GeneratedField::OptimizedLogicalPlan => {
if plan_type_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("OptimizedLogicalPlan"));
}
- plan_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::OptimizedLogicalPlan)
+ plan_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::OptimizedLogicalPlan)
;
}
GeneratedField::FinalLogicalPlan => {
if plan_type_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("FinalLogicalPlan"));
}
- plan_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::FinalLogicalPlan)
+ plan_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::FinalLogicalPlan)
;
}
GeneratedField::InitialPhysicalPlan => {
if plan_type_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("InitialPhysicalPlan"));
}
- plan_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::InitialPhysicalPlan)
+ plan_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::InitialPhysicalPlan)
;
}
GeneratedField::OptimizedPhysicalPlan => {
if plan_type_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("OptimizedPhysicalPlan"));
}
- plan_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::OptimizedPhysicalPlan)
+ plan_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::OptimizedPhysicalPlan)
;
}
GeneratedField::FinalPhysicalPlan => {
if plan_type_enum__.is_some() {
return Err(serde::de::Error::duplicate_field("FinalPhysicalPlan"));
}
- plan_type_enum__ = map.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::FinalPhysicalPlan)
+ plan_type_enum__ = map_.next_value::<::std::option::Option<_>>()?.map(plan_type::PlanTypeEnum::FinalPhysicalPlan)
;
}
}
@@ -18185,32 +18189,32 @@ impl<'de> serde::Deserialize<'de> for PrepareNode {
formatter.write_str("struct datafusion.PrepareNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<PrepareNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<PrepareNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut name__ = None;
let mut data_types__ = None;
let mut input__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ name__ = Some(map_.next_value()?);
}
GeneratedField::DataTypes => {
if data_types__.is_some() {
return Err(serde::de::Error::duplicate_field("dataTypes"));
}
- data_types__ = Some(map.next_value()?);
+ data_types__ = Some(map_.next_value()?);
}
GeneratedField::Input => {
if input__.is_some() {
return Err(serde::de::Error::duplicate_field("input"));
}
- input__ = map.next_value()?;
+ input__ = map_.next_value()?;
}
}
}
@@ -18292,18 +18296,18 @@ impl<'de> serde::Deserialize<'de> for ProjectionColumns {
formatter.write_str("struct datafusion.ProjectionColumns")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ProjectionColumns, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProjectionColumns, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut columns__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ columns__ = Some(map_.next_value()?);
}
}
}
@@ -18402,32 +18406,32 @@ impl<'de> serde::Deserialize<'de> for ProjectionExecNode {
formatter.write_str("struct datafusion.ProjectionExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ProjectionExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProjectionExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut expr__ = None;
let mut expr_name__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = Some(map.next_value()?);
+ expr__ = Some(map_.next_value()?);
}
GeneratedField::ExprName => {
if expr_name__.is_some() {
return Err(serde::de::Error::duplicate_field("exprName"));
}
- expr_name__ = Some(map.next_value()?);
+ expr_name__ = Some(map_.next_value()?);
}
}
}
@@ -18531,32 +18535,32 @@ impl<'de> serde::Deserialize<'de> for ProjectionNode {
formatter.write_str("struct datafusion.ProjectionNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ProjectionNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ProjectionNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut expr__ = None;
let mut optional_alias__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = Some(map.next_value()?);
+ expr__ = Some(map_.next_value()?);
}
GeneratedField::Alias => {
if optional_alias__.is_some() {
return Err(serde::de::Error::duplicate_field("alias"));
}
- optional_alias__ = map.next_value::<::std::option::Option<_>>()?.map(projection_node::OptionalAlias::Alias);
+ optional_alias__ = map_.next_value::<::std::option::Option<_>>()?.map(projection_node::OptionalAlias::Alias);
}
}
}
@@ -18591,12 +18595,14 @@ impl serde::Serialize for RepartitionExecNode {
if let Some(v) = self.partition_method.as_ref() {
match v {
repartition_exec_node::PartitionMethod::RoundRobin(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("roundRobin", ToString::to_string(&v).as_str())?;
}
repartition_exec_node::PartitionMethod::Hash(v) => {
struct_ser.serialize_field("hash", v)?;
}
repartition_exec_node::PartitionMethod::Unknown(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("unknown", ToString::to_string(&v).as_str())?;
}
}
@@ -18664,38 +18670,38 @@ impl<'de> serde::Deserialize<'de> for RepartitionExecNode {
formatter.write_str("struct datafusion.RepartitionExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<RepartitionExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<RepartitionExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut partition_method__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::RoundRobin => {
if partition_method__.is_some() {
return Err(serde::de::Error::duplicate_field("roundRobin"));
}
- partition_method__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| repartition_exec_node::PartitionMethod::RoundRobin(x.0));
+ partition_method__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| repartition_exec_node::PartitionMethod::RoundRobin(x.0));
}
GeneratedField::Hash => {
if partition_method__.is_some() {
return Err(serde::de::Error::duplicate_field("hash"));
}
- partition_method__ = map.next_value::<::std::option::Option<_>>()?.map(repartition_exec_node::PartitionMethod::Hash)
+ partition_method__ = map_.next_value::<::std::option::Option<_>>()?.map(repartition_exec_node::PartitionMethod::Hash)
;
}
GeneratedField::Unknown => {
if partition_method__.is_some() {
return Err(serde::de::Error::duplicate_field("unknown"));
}
- partition_method__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| repartition_exec_node::PartitionMethod::Unknown(x.0));
+ partition_method__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| repartition_exec_node::PartitionMethod::Unknown(x.0));
}
}
}
@@ -18729,6 +18735,7 @@ impl serde::Serialize for RepartitionNode {
if let Some(v) = self.partition_method.as_ref() {
match v {
repartition_node::PartitionMethod::RoundRobin(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("roundRobin", ToString::to_string(&v).as_str())?;
}
repartition_node::PartitionMethod::Hash(v) => {
@@ -18796,31 +18803,31 @@ impl<'de> serde::Deserialize<'de> for RepartitionNode {
formatter.write_str("struct datafusion.RepartitionNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<RepartitionNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<RepartitionNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut partition_method__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::RoundRobin => {
if partition_method__.is_some() {
return Err(serde::de::Error::duplicate_field("roundRobin"));
}
- partition_method__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| repartition_node::PartitionMethod::RoundRobin(x.0));
+ partition_method__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| repartition_node::PartitionMethod::RoundRobin(x.0));
}
GeneratedField::Hash => {
if partition_method__.is_some() {
return Err(serde::de::Error::duplicate_field("hash"));
}
- partition_method__ = map.next_value::<::std::option::Option<_>>()?.map(repartition_node::PartitionMethod::Hash)
+ partition_method__ = map_.next_value::<::std::option::Option<_>>()?.map(repartition_node::PartitionMethod::Hash)
;
}
}
@@ -18902,18 +18909,18 @@ impl<'de> serde::Deserialize<'de> for RollupNode {
formatter.write_str("struct datafusion.RollupNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<RollupNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<RollupNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ expr__ = Some(map_.next_value()?);
}
}
}
@@ -19003,25 +19010,25 @@ impl<'de> serde::Deserialize<'de> for ScalarDictionaryValue {
formatter.write_str("struct datafusion.ScalarDictionaryValue")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarDictionaryValue, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarDictionaryValue, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut index_type__ = None;
let mut value__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::IndexType => {
if index_type__.is_some() {
return Err(serde::de::Error::duplicate_field("indexType"));
}
- index_type__ = map.next_value()?;
+ index_type__ = map_.next_value()?;
}
GeneratedField::Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("value"));
}
- value__ = map.next_value()?;
+ value__ = map_.next_value()?;
}
}
}
@@ -19050,6 +19057,7 @@ impl serde::Serialize for ScalarFixedSizeBinary {
}
let mut struct_ser = serializer.serialize_struct("datafusion.ScalarFixedSizeBinary", len)?;
if !self.values.is_empty() {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("values", pbjson::private::base64::encode(&self.values).as_str())?;
}
if self.length != 0 {
@@ -19111,20 +19119,20 @@ impl<'de> serde::Deserialize<'de> for ScalarFixedSizeBinary {
formatter.write_str("struct datafusion.ScalarFixedSizeBinary")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarFixedSizeBinary, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarFixedSizeBinary, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut values__ = None;
let mut length__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Values => {
if values__.is_some() {
return Err(serde::de::Error::duplicate_field("values"));
}
values__ =
- Some(map.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::BytesDeserialize<_>>()?.0)
;
}
GeneratedField::Length => {
@@ -19132,7 +19140,7 @@ impl<'de> serde::Deserialize<'de> for ScalarFixedSizeBinary {
return Err(serde::de::Error::duplicate_field("length"));
}
length__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -19415,10 +19423,9 @@ impl<'de> serde::Deserialize<'de> for ScalarFunction {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(ScalarFunction::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -19428,10 +19435,9 @@ impl<'de> serde::Deserialize<'de> for ScalarFunction {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(ScalarFunction::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -19583,8 +19589,8 @@ impl serde::Serialize for ScalarFunctionNode {
}
let mut struct_ser = serializer.serialize_struct("datafusion.ScalarFunctionNode", len)?;
if self.fun != 0 {
- let v = ScalarFunction::from_i32(self.fun)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.fun)))?;
+ let v = ScalarFunction::try_from(self.fun)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.fun)))?;
struct_ser.serialize_field("fun", &v)?;
}
if !self.args.is_empty() {
@@ -19646,25 +19652,25 @@ impl<'de> serde::Deserialize<'de> for ScalarFunctionNode {
formatter.write_str("struct datafusion.ScalarFunctionNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarFunctionNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarFunctionNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut fun__ = None;
let mut args__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Fun => {
if fun__.is_some() {
return Err(serde::de::Error::duplicate_field("fun"));
}
- fun__ = Some(map.next_value::<ScalarFunction>()? as i32);
+ fun__ = Some(map_.next_value::<ScalarFunction>()? as i32);
}
GeneratedField::Args => {
if args__.is_some() {
return Err(serde::de::Error::duplicate_field("args"));
}
- args__ = Some(map.next_value()?);
+ args__ = Some(map_.next_value()?);
}
}
}
@@ -19764,32 +19770,32 @@ impl<'de> serde::Deserialize<'de> for ScalarListValue {
formatter.write_str("struct datafusion.ScalarListValue")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarListValue, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarListValue, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut is_null__ = None;
let mut field__ = None;
let mut values__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::IsNull => {
if is_null__.is_some() {
return Err(serde::de::Error::duplicate_field("isNull"));
}
- is_null__ = Some(map.next_value()?);
+ is_null__ = Some(map_.next_value()?);
}
GeneratedField::Field => {
if field__.is_some() {
return Err(serde::de::Error::duplicate_field("field"));
}
- field__ = map.next_value()?;
+ field__ = map_.next_value()?;
}
GeneratedField::Values => {
if values__.is_some() {
return Err(serde::de::Error::duplicate_field("values"));
}
- values__ = Some(map.next_value()?);
+ values__ = Some(map_.next_value()?);
}
}
}
@@ -19883,24 +19889,24 @@ impl<'de> serde::Deserialize<'de> for ScalarTime32Value {
formatter.write_str("struct datafusion.ScalarTime32Value")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarTime32Value, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarTime32Value, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut value__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Time32SecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("time32SecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_time32_value::Value::Time32SecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_time32_value::Value::Time32SecondValue(x.0));
}
GeneratedField::Time32MillisecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("time32MillisecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_time32_value::Value::Time32MillisecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_time32_value::Value::Time32MillisecondValue(x.0));
}
}
}
@@ -19927,9 +19933,11 @@ impl serde::Serialize for ScalarTime64Value {
if let Some(v) = self.value.as_ref() {
match v {
scalar_time64_value::Value::Time64MicrosecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("time64MicrosecondValue", ToString::to_string(&v).as_str())?;
}
scalar_time64_value::Value::Time64NanosecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("time64NanosecondValue", ToString::to_string(&v).as_str())?;
}
}
@@ -19992,24 +20000,24 @@ impl<'de> serde::Deserialize<'de> for ScalarTime64Value {
formatter.write_str("struct datafusion.ScalarTime64Value")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarTime64Value, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarTime64Value, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut value__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Time64MicrosecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("time64MicrosecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_time64_value::Value::Time64MicrosecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_time64_value::Value::Time64MicrosecondValue(x.0));
}
GeneratedField::Time64NanosecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("time64NanosecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_time64_value::Value::Time64NanosecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_time64_value::Value::Time64NanosecondValue(x.0));
}
}
}
@@ -20042,15 +20050,19 @@ impl serde::Serialize for ScalarTimestampValue {
if let Some(v) = self.value.as_ref() {
match v {
scalar_timestamp_value::Value::TimeMicrosecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("timeMicrosecondValue", ToString::to_string(&v).as_str())?;
}
scalar_timestamp_value::Value::TimeNanosecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("timeNanosecondValue", ToString::to_string(&v).as_str())?;
}
scalar_timestamp_value::Value::TimeSecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("timeSecondValue", ToString::to_string(&v).as_str())?;
}
scalar_timestamp_value::Value::TimeMillisecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("timeMillisecondValue", ToString::to_string(&v).as_str())?;
}
}
@@ -20124,43 +20136,43 @@ impl<'de> serde::Deserialize<'de> for ScalarTimestampValue {
formatter.write_str("struct datafusion.ScalarTimestampValue")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarTimestampValue, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarTimestampValue, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut timezone__ = None;
let mut value__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Timezone => {
if timezone__.is_some() {
return Err(serde::de::Error::duplicate_field("timezone"));
}
- timezone__ = Some(map.next_value()?);
+ timezone__ = Some(map_.next_value()?);
}
GeneratedField::TimeMicrosecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("timeMicrosecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_timestamp_value::Value::TimeMicrosecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_timestamp_value::Value::TimeMicrosecondValue(x.0));
}
GeneratedField::TimeNanosecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("timeNanosecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_timestamp_value::Value::TimeNanosecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_timestamp_value::Value::TimeNanosecondValue(x.0));
}
GeneratedField::TimeSecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("timeSecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_timestamp_value::Value::TimeSecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_timestamp_value::Value::TimeSecondValue(x.0));
}
GeneratedField::TimeMillisecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("timeMillisecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_timestamp_value::Value::TimeMillisecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_timestamp_value::Value::TimeMillisecondValue(x.0));
}
}
}
@@ -20251,25 +20263,25 @@ impl<'de> serde::Deserialize<'de> for ScalarUdfExprNode {
formatter.write_str("struct datafusion.ScalarUDFExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarUdfExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarUdfExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut fun_name__ = None;
let mut args__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ 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()?);
+ args__ = Some(map_.next_value()?);
}
}
}
@@ -20318,6 +20330,7 @@ impl serde::Serialize for ScalarValue {
struct_ser.serialize_field("int32Value", v)?;
}
scalar_value::Value::Int64Value(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("int64Value", ToString::to_string(&v).as_str())?;
}
scalar_value::Value::Uint8Value(v) => {
@@ -20330,6 +20343,7 @@ impl serde::Serialize for ScalarValue {
struct_ser.serialize_field("uint32Value", v)?;
}
scalar_value::Value::Uint64Value(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("uint64Value", ToString::to_string(&v).as_str())?;
}
scalar_value::Value::Float32Value(v) => {
@@ -20354,24 +20368,30 @@ impl serde::Serialize for ScalarValue {
struct_ser.serialize_field("decimal256Value", v)?;
}
scalar_value::Value::Date64Value(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("date64Value", ToString::to_string(&v).as_str())?;
}
scalar_value::Value::IntervalYearmonthValue(v) => {
struct_ser.serialize_field("intervalYearmonthValue", v)?;
}
scalar_value::Value::IntervalDaytimeValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("intervalDaytimeValue", ToString::to_string(&v).as_str())?;
}
scalar_value::Value::DurationSecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("durationSecondValue", ToString::to_string(&v).as_str())?;
}
scalar_value::Value::DurationMillisecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("durationMillisecondValue", ToString::to_string(&v).as_str())?;
}
scalar_value::Value::DurationMicrosecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("durationMicrosecondValue", ToString::to_string(&v).as_str())?;
}
scalar_value::Value::DurationNanosecondValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("durationNanosecondValue", ToString::to_string(&v).as_str())?;
}
scalar_value::Value::TimestampValue(v) => {
@@ -20381,9 +20401,11 @@ impl serde::Serialize for ScalarValue {
struct_ser.serialize_field("dictionaryValue", v)?;
}
scalar_value::Value::BinaryValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("binaryValue", pbjson::private::base64::encode(&v).as_str())?;
}
scalar_value::Value::LargeBinaryValue(v) => {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("largeBinaryValue", pbjson::private::base64::encode(&v).as_str())?;
}
scalar_value::Value::Time64Value(v) => {
@@ -20586,226 +20608,226 @@ impl<'de> serde::Deserialize<'de> for ScalarValue {
formatter.write_str("struct datafusion.ScalarValue")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScalarValue, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScalarValue, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut value__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::NullValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("nullValue"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::NullValue)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::NullValue)
;
}
GeneratedField::BoolValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("boolValue"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::BoolValue);
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::BoolValue);
}
GeneratedField::Utf8Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("utf8Value"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Utf8Value);
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Utf8Value);
}
GeneratedField::LargeUtf8Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("largeUtf8Value"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::LargeUtf8Value);
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::LargeUtf8Value);
}
GeneratedField::Int8Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("int8Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Int8Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Int8Value(x.0));
}
GeneratedField::Int16Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("int16Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Int16Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Int16Value(x.0));
}
GeneratedField::Int32Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("int32Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Int32Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Int32Value(x.0));
}
GeneratedField::Int64Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("int64Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Int64Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Int64Value(x.0));
}
GeneratedField::Uint8Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("uint8Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Uint8Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Uint8Value(x.0));
}
GeneratedField::Uint16Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("uint16Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Uint16Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Uint16Value(x.0));
}
GeneratedField::Uint32Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("uint32Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Uint32Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Uint32Value(x.0));
}
GeneratedField::Uint64Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("uint64Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Uint64Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Uint64Value(x.0));
}
GeneratedField::Float32Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("float32Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Float32Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Float32Value(x.0));
}
GeneratedField::Float64Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("float64Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Float64Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Float64Value(x.0));
}
GeneratedField::Date32Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("date32Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Date32Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Date32Value(x.0));
}
GeneratedField::Time32Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("time32Value"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Time32Value)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Time32Value)
;
}
GeneratedField::ListValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("listValue"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::ListValue)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::ListValue)
;
}
GeneratedField::Decimal128Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("decimal128Value"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Decimal128Value)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Decimal128Value)
;
}
GeneratedField::Decimal256Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("decimal256Value"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Decimal256Value)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Decimal256Value)
;
}
GeneratedField::Date64Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("date64Value"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Date64Value(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::Date64Value(x.0));
}
GeneratedField::IntervalYearmonthValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("intervalYearmonthValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::IntervalYearmonthValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::IntervalYearmonthValue(x.0));
}
GeneratedField::IntervalDaytimeValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("intervalDaytimeValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::IntervalDaytimeValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::IntervalDaytimeValue(x.0));
}
GeneratedField::DurationSecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("durationSecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::DurationSecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::DurationSecondValue(x.0));
}
GeneratedField::DurationMillisecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("durationMillisecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::DurationMillisecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::DurationMillisecondValue(x.0));
}
GeneratedField::DurationMicrosecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("durationMicrosecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::DurationMicrosecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::DurationMicrosecondValue(x.0));
}
GeneratedField::DurationNanosecondValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("durationNanosecondValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::DurationNanosecondValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::NumberDeserialize<_>>>()?.map(|x| scalar_value::Value::DurationNanosecondValue(x.0));
}
GeneratedField::TimestampValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("timestampValue"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::TimestampValue)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::TimestampValue)
;
}
GeneratedField::DictionaryValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("dictionaryValue"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::DictionaryValue)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::DictionaryValue)
;
}
GeneratedField::BinaryValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("binaryValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::BytesDeserialize<_>>>()?.map(|x| scalar_value::Value::BinaryValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::BytesDeserialize<_>>>()?.map(|x| scalar_value::Value::BinaryValue(x.0));
}
GeneratedField::LargeBinaryValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("largeBinaryValue"));
}
- value__ = map.next_value::<::std::option::Option<::pbjson::private::BytesDeserialize<_>>>()?.map(|x| scalar_value::Value::LargeBinaryValue(x.0));
+ value__ = map_.next_value::<::std::option::Option<::pbjson::private::BytesDeserialize<_>>>()?.map(|x| scalar_value::Value::LargeBinaryValue(x.0));
}
GeneratedField::Time64Value => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("time64Value"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Time64Value)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::Time64Value)
;
}
GeneratedField::IntervalMonthDayNano => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("intervalMonthDayNano"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::IntervalMonthDayNano)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::IntervalMonthDayNano)
;
}
GeneratedField::StructValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("structValue"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::StructValue)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::StructValue)
;
}
GeneratedField::FixedSizeBinaryValue => {
if value__.is_some() {
return Err(serde::de::Error::duplicate_field("fixedSizeBinaryValue"));
}
- value__ = map.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::FixedSizeBinaryValue)
+ value__ = map_.next_value::<::std::option::Option<_>>()?.map(scalar_value::Value::FixedSizeBinaryValue)
;
}
}
@@ -20886,19 +20908,19 @@ impl<'de> serde::Deserialize<'de> for ScanLimit {
formatter.write_str("struct datafusion.ScanLimit")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ScanLimit, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ScanLimit, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut limit__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Limit => {
if limit__.is_some() {
return Err(serde::de::Error::duplicate_field("limit"));
}
limit__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -20988,26 +21010,26 @@ impl<'de> serde::Deserialize<'de> for Schema {
formatter.write_str("struct datafusion.Schema")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Schema, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Schema, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut columns__ = None;
let mut metadata__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?);
+ 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<_, _>>()?
+ map_.next_value::<std::collections::HashMap<_, _>>()?
);
}
}
@@ -21089,18 +21111,18 @@ impl<'de> serde::Deserialize<'de> for SelectionExecNode {
formatter.write_str("struct datafusion.SelectionExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<SelectionExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<SelectionExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -21189,25 +21211,25 @@ impl<'de> serde::Deserialize<'de> for SelectionNode {
formatter.write_str("struct datafusion.SelectionNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<SelectionNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<SelectionNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = map.next_value()?;
+ expr__ = map_.next_value()?;
}
}
}
@@ -21316,7 +21338,7 @@ impl<'de> serde::Deserialize<'de> for SimilarToNode {
formatter.write_str("struct datafusion.SimilarToNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<SimilarToNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<SimilarToNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -21324,31 +21346,31 @@ impl<'de> serde::Deserialize<'de> for SimilarToNode {
let mut expr__ = None;
let mut pattern__ = None;
let mut escape_char__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Negated => {
if negated__.is_some() {
return Err(serde::de::Error::duplicate_field("negated"));
}
- negated__ = Some(map.next_value()?);
+ negated__ = Some(map_.next_value()?);
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = map.next_value()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Pattern => {
if pattern__.is_some() {
return Err(serde::de::Error::duplicate_field("pattern"));
}
- pattern__ = map.next_value()?;
+ pattern__ = map_.next_value()?;
}
GeneratedField::EscapeChar => {
if escape_char__.is_some() {
return Err(serde::de::Error::duplicate_field("escapeChar"));
}
- escape_char__ = Some(map.next_value()?);
+ escape_char__ = Some(map_.next_value()?);
}
}
}
@@ -21391,6 +21413,7 @@ impl serde::Serialize for SortExecNode {
struct_ser.serialize_field("expr", &self.expr)?;
}
if self.fetch != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("fetch", ToString::to_string(&self.fetch).as_str())?;
}
if self.preserve_partitioning {
@@ -21459,7 +21482,7 @@ impl<'de> serde::Deserialize<'de> for SortExecNode {
formatter.write_str("struct datafusion.SortExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<SortExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<SortExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -21467,33 +21490,33 @@ impl<'de> serde::Deserialize<'de> for SortExecNode {
let mut expr__ = None;
let mut fetch__ = None;
let mut preserve_partitioning__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = Some(map.next_value()?);
+ expr__ = Some(map_.next_value()?);
}
GeneratedField::Fetch => {
if fetch__.is_some() {
return Err(serde::de::Error::duplicate_field("fetch"));
}
fetch__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::PreservePartitioning => {
if preserve_partitioning__.is_some() {
return Err(serde::de::Error::duplicate_field("preservePartitioning"));
}
- preserve_partitioning__ = Some(map.next_value()?);
+ preserve_partitioning__ = Some(map_.next_value()?);
}
}
}
@@ -21595,32 +21618,32 @@ impl<'de> serde::Deserialize<'de> for SortExprNode {
formatter.write_str("struct datafusion.SortExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<SortExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<SortExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut asc__ = None;
let mut nulls_first__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::Asc => {
if asc__.is_some() {
return Err(serde::de::Error::duplicate_field("asc"));
}
- asc__ = Some(map.next_value()?);
+ asc__ = Some(map_.next_value()?);
}
GeneratedField::NullsFirst => {
if nulls_first__.is_some() {
return Err(serde::de::Error::duplicate_field("nullsFirst"));
}
- nulls_first__ = Some(map.next_value()?);
+ nulls_first__ = Some(map_.next_value()?);
}
}
}
@@ -21659,6 +21682,7 @@ impl serde::Serialize for SortNode {
struct_ser.serialize_field("expr", &self.expr)?;
}
if self.fetch != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("fetch", ToString::to_string(&self.fetch).as_str())?;
}
struct_ser.end()
@@ -21720,33 +21744,33 @@ impl<'de> serde::Deserialize<'de> for SortNode {
formatter.write_str("struct datafusion.SortNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<SortNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<SortNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut expr__ = None;
let mut fetch__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = Some(map.next_value()?);
+ expr__ = Some(map_.next_value()?);
}
GeneratedField::Fetch => {
if fetch__.is_some() {
return Err(serde::de::Error::duplicate_field("fetch"));
}
fetch__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -21786,6 +21810,7 @@ impl serde::Serialize for SortPreservingMergeExecNode {
struct_ser.serialize_field("expr", &self.expr)?;
}
if self.fetch != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("fetch", ToString::to_string(&self.fetch).as_str())?;
}
struct_ser.end()
@@ -21847,33 +21872,33 @@ impl<'de> serde::Deserialize<'de> for SortPreservingMergeExecNode {
formatter.write_str("struct datafusion.SortPreservingMergeExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<SortPreservingMergeExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<SortPreservingMergeExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut expr__ = None;
let mut fetch__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Expr => {
if expr__.is_some() {
return Err(serde::de::Error::duplicate_field("expr"));
}
- expr__ = Some(map.next_value()?);
+ expr__ = Some(map_.next_value()?);
}
GeneratedField::Fetch => {
if fetch__.is_some() {
return Err(serde::de::Error::duplicate_field("fetch"));
}
fetch__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
}
@@ -21910,9 +21935,11 @@ impl serde::Serialize for Statistics {
}
let mut struct_ser = serializer.serialize_struct("datafusion.Statistics", len)?;
if self.num_rows != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("numRows", ToString::to_string(&self.num_rows).as_str())?;
}
if self.total_byte_size != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("totalByteSize", ToString::to_string(&self.total_byte_size).as_str())?;
}
if !self.column_stats.is_empty() {
@@ -21987,7 +22014,7 @@ impl<'de> serde::Deserialize<'de> for Statistics {
formatter.write_str("struct datafusion.Statistics")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Statistics, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Statistics, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -21995,14 +22022,14 @@ impl<'de> serde::Deserialize<'de> for Statistics {
let mut total_byte_size__ = None;
let mut column_stats__ = None;
let mut is_exact__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::NumRows => {
if num_rows__.is_some() {
return Err(serde::de::Error::duplicate_field("numRows"));
}
num_rows__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::TotalByteSize => {
@@ -22010,20 +22037,20 @@ impl<'de> serde::Deserialize<'de> for Statistics {
return Err(serde::de::Error::duplicate_field("totalByteSize"));
}
total_byte_size__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::ColumnStats => {
if column_stats__.is_some() {
return Err(serde::de::Error::duplicate_field("columnStats"));
}
- column_stats__ = Some(map.next_value()?);
+ column_stats__ = Some(map_.next_value()?);
}
GeneratedField::IsExact => {
if is_exact__.is_some() {
return Err(serde::de::Error::duplicate_field("isExact"));
}
- is_exact__ = Some(map.next_value()?);
+ is_exact__ = Some(map_.next_value()?);
}
}
}
@@ -22116,25 +22143,25 @@ impl<'de> serde::Deserialize<'de> for StringifiedPlan {
formatter.write_str("struct datafusion.StringifiedPlan")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<StringifiedPlan, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<StringifiedPlan, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut plan_type__ = None;
let mut plan__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::PlanType => {
if plan_type__.is_some() {
return Err(serde::de::Error::duplicate_field("planType"));
}
- plan_type__ = map.next_value()?;
+ plan_type__ = map_.next_value()?;
}
GeneratedField::Plan => {
if plan__.is_some() {
return Err(serde::de::Error::duplicate_field("plan"));
}
- plan__ = Some(map.next_value()?);
+ plan__ = Some(map_.next_value()?);
}
}
}
@@ -22216,18 +22243,18 @@ impl<'de> serde::Deserialize<'de> for Struct {
formatter.write_str("struct datafusion.Struct")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Struct, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Struct, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut sub_field_types__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::SubFieldTypes => {
if sub_field_types__.is_some() {
return Err(serde::de::Error::duplicate_field("subFieldTypes"));
}
- sub_field_types__ = Some(map.next_value()?);
+ sub_field_types__ = Some(map_.next_value()?);
}
}
}
@@ -22317,25 +22344,25 @@ impl<'de> serde::Deserialize<'de> for StructValue {
formatter.write_str("struct datafusion.StructValue")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<StructValue, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<StructValue, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut field_values__ = None;
let mut fields__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::FieldValues => {
if field_values__.is_some() {
return Err(serde::de::Error::duplicate_field("fieldValues"));
}
- field_values__ = Some(map.next_value()?);
+ field_values__ = Some(map_.next_value()?);
}
GeneratedField::Fields => {
if fields__.is_some() {
return Err(serde::de::Error::duplicate_field("fields"));
}
- fields__ = Some(map.next_value()?);
+ fields__ = Some(map_.next_value()?);
}
}
}
@@ -22425,25 +22452,25 @@ impl<'de> serde::Deserialize<'de> for SubqueryAliasNode {
formatter.write_str("struct datafusion.SubqueryAliasNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<SubqueryAliasNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<SubqueryAliasNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut alias__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Alias => {
if alias__.is_some() {
return Err(serde::de::Error::duplicate_field("alias"));
}
- alias__ = map.next_value()?;
+ alias__ = map_.next_value()?;
}
}
}
@@ -22497,10 +22524,9 @@ impl<'de> serde::Deserialize<'de> for TimeUnit {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(TimeUnit::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -22510,10 +22536,9 @@ impl<'de> serde::Deserialize<'de> for TimeUnit {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(TimeUnit::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -22551,8 +22576,8 @@ impl serde::Serialize for Timestamp {
}
let mut struct_ser = serializer.serialize_struct("datafusion.Timestamp", len)?;
if self.time_unit != 0 {
- let v = TimeUnit::from_i32(self.time_unit)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.time_unit)))?;
+ let v = TimeUnit::try_from(self.time_unit)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.time_unit)))?;
struct_ser.serialize_field("timeUnit", &v)?;
}
if !self.timezone.is_empty() {
@@ -22615,25 +22640,25 @@ impl<'de> serde::Deserialize<'de> for Timestamp {
formatter.write_str("struct datafusion.Timestamp")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Timestamp, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Timestamp, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut time_unit__ = None;
let mut timezone__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::TimeUnit => {
if time_unit__.is_some() {
return Err(serde::de::Error::duplicate_field("timeUnit"));
}
- time_unit__ = Some(map.next_value::<TimeUnit>()? as i32);
+ time_unit__ = Some(map_.next_value::<TimeUnit>()? as i32);
}
GeneratedField::Timezone => {
if timezone__.is_some() {
return Err(serde::de::Error::duplicate_field("timezone"));
}
- timezone__ = Some(map.next_value()?);
+ timezone__ = Some(map_.next_value()?);
}
}
}
@@ -22724,25 +22749,25 @@ impl<'de> serde::Deserialize<'de> for TryCastNode {
formatter.write_str("struct datafusion.TryCastNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<TryCastNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<TryCastNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut expr__ = None;
let mut arrow_type__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::ArrowType => {
if arrow_type__.is_some() {
return Err(serde::de::Error::duplicate_field("arrowType"));
}
- arrow_type__ = map.next_value()?;
+ arrow_type__ = map_.next_value()?;
}
}
}
@@ -22777,8 +22802,8 @@ impl serde::Serialize for Union {
struct_ser.serialize_field("unionTypes", &self.union_types)?;
}
if self.union_mode != 0 {
- let v = UnionMode::from_i32(self.union_mode)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.union_mode)))?;
+ let v = UnionMode::try_from(self.union_mode)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.union_mode)))?;
struct_ser.serialize_field("unionMode", &v)?;
}
if !self.type_ids.is_empty() {
@@ -22846,33 +22871,33 @@ impl<'de> serde::Deserialize<'de> for Union {
formatter.write_str("struct datafusion.Union")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<Union, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<Union, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut union_types__ = None;
let mut union_mode__ = None;
let mut type_ids__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::UnionTypes => {
if union_types__.is_some() {
return Err(serde::de::Error::duplicate_field("unionTypes"));
}
- union_types__ = Some(map.next_value()?);
+ union_types__ = Some(map_.next_value()?);
}
GeneratedField::UnionMode => {
if union_mode__.is_some() {
return Err(serde::de::Error::duplicate_field("unionMode"));
}
- union_mode__ = Some(map.next_value::<UnionMode>()? as i32);
+ union_mode__ = Some(map_.next_value::<UnionMode>()? as i32);
}
GeneratedField::TypeIds => {
if type_ids__.is_some() {
return Err(serde::de::Error::duplicate_field("typeIds"));
}
type_ids__ =
- Some(map.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
+ Some(map_.next_value::<Vec<::pbjson::private::NumberDeserialize<_>>>()?
.into_iter().map(|x| x.0).collect())
;
}
@@ -22956,18 +22981,18 @@ impl<'de> serde::Deserialize<'de> for UnionExecNode {
formatter.write_str("struct datafusion.UnionExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<UnionExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnionExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut inputs__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Inputs => {
if inputs__.is_some() {
return Err(serde::de::Error::duplicate_field("inputs"));
}
- inputs__ = Some(map.next_value()?);
+ inputs__ = Some(map_.next_value()?);
}
}
}
@@ -23016,10 +23041,9 @@ impl<'de> serde::Deserialize<'de> for UnionMode {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(UnionMode::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -23029,10 +23053,9 @@ impl<'de> serde::Deserialize<'de> for UnionMode {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(UnionMode::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -23120,18 +23143,18 @@ impl<'de> serde::Deserialize<'de> for UnionNode {
formatter.write_str("struct datafusion.UnionNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<UnionNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<UnionNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut inputs__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::Inputs => {
if inputs__.is_some() {
return Err(serde::de::Error::duplicate_field("inputs"));
}
- inputs__ = Some(map.next_value()?);
+ inputs__ = Some(map_.next_value()?);
}
}
}
@@ -23159,6 +23182,7 @@ impl serde::Serialize for ValuesNode {
}
let mut struct_ser = serializer.serialize_struct("datafusion.ValuesNode", len)?;
if self.n_cols != 0 {
+ #[allow(clippy::needless_borrow)]
struct_ser.serialize_field("nCols", ToString::to_string(&self.n_cols).as_str())?;
}
if !self.values_list.is_empty() {
@@ -23222,27 +23246,27 @@ impl<'de> serde::Deserialize<'de> for ValuesNode {
formatter.write_str("struct datafusion.ValuesNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ValuesNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ValuesNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut n_cols__ = None;
let mut values_list__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::NCols => {
if n_cols__.is_some() {
return Err(serde::de::Error::duplicate_field("nCols"));
}
n_cols__ =
- Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
+ Some(map_.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0)
;
}
GeneratedField::ValuesList => {
if values_list__.is_some() {
return Err(serde::de::Error::duplicate_field("valuesList"));
}
- values_list__ = Some(map.next_value()?);
+ values_list__ = Some(map_.next_value()?);
}
}
}
@@ -23360,7 +23384,7 @@ impl<'de> serde::Deserialize<'de> for ViewTableScanNode {
formatter.write_str("struct datafusion.ViewTableScanNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<ViewTableScanNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<ViewTableScanNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -23369,37 +23393,37 @@ impl<'de> serde::Deserialize<'de> for ViewTableScanNode {
let mut schema__ = None;
let mut projection__ = None;
let mut definition__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ table_name__ = map_.next_value()?;
}
GeneratedField::Input => {
if input__.is_some() {
return Err(serde::de::Error::duplicate_field("input"));
}
- input__ = map.next_value()?;
+ input__ = map_.next_value()?;
}
GeneratedField::Schema => {
if schema__.is_some() {
return Err(serde::de::Error::duplicate_field("schema"));
}
- schema__ = map.next_value()?;
+ schema__ = map_.next_value()?;
}
GeneratedField::Projection => {
if projection__.is_some() {
return Err(serde::de::Error::duplicate_field("projection"));
}
- projection__ = map.next_value()?;
+ projection__ = map_.next_value()?;
}
GeneratedField::Definition => {
if definition__.is_some() {
return Err(serde::de::Error::duplicate_field("definition"));
}
- definition__ = Some(map.next_value()?);
+ definition__ = Some(map_.next_value()?);
}
}
}
@@ -23494,25 +23518,25 @@ impl<'de> serde::Deserialize<'de> for WhenThen {
formatter.write_str("struct datafusion.WhenThen")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<WhenThen, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<WhenThen, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut when_expr__ = None;
let mut then_expr__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::WhenExpr => {
if when_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("whenExpr"));
}
- when_expr__ = map.next_value()?;
+ when_expr__ = map_.next_value()?;
}
GeneratedField::ThenExpr => {
if then_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("thenExpr"));
}
- then_expr__ = map.next_value()?;
+ then_expr__ = map_.next_value()?;
}
}
}
@@ -23649,7 +23673,7 @@ impl<'de> serde::Deserialize<'de> for WindowAggExecNode {
formatter.write_str("struct datafusion.WindowAggExecNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<WindowAggExecNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<WindowAggExecNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -23658,51 +23682,51 @@ impl<'de> serde::Deserialize<'de> for WindowAggExecNode {
let mut input_schema__ = None;
let mut partition_keys__ = None;
let mut partition_search_mode__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::WindowExpr => {
if window_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("windowExpr"));
}
- window_expr__ = Some(map.next_value()?);
+ window_expr__ = Some(map_.next_value()?);
}
GeneratedField::InputSchema => {
if input_schema__.is_some() {
return Err(serde::de::Error::duplicate_field("inputSchema"));
}
- input_schema__ = map.next_value()?;
+ input_schema__ = map_.next_value()?;
}
GeneratedField::PartitionKeys => {
if partition_keys__.is_some() {
return Err(serde::de::Error::duplicate_field("partitionKeys"));
}
- partition_keys__ = Some(map.next_value()?);
+ partition_keys__ = Some(map_.next_value()?);
}
GeneratedField::Linear => {
if partition_search_mode__.is_some() {
return Err(serde::de::Error::duplicate_field("linear"));
}
- partition_search_mode__ = map.next_value::<::std::option::Option<_>>()?.map(window_agg_exec_node::PartitionSearchMode::Linear)
+ partition_search_mode__ = map_.next_value::<::std::option::Option<_>>()?.map(window_agg_exec_node::PartitionSearchMode::Linear)
;
}
GeneratedField::PartiallySorted => {
if partition_search_mode__.is_some() {
return Err(serde::de::Error::duplicate_field("partiallySorted"));
}
- partition_search_mode__ = map.next_value::<::std::option::Option<_>>()?.map(window_agg_exec_node::PartitionSearchMode::PartiallySorted)
+ partition_search_mode__ = map_.next_value::<::std::option::Option<_>>()?.map(window_agg_exec_node::PartitionSearchMode::PartiallySorted)
;
}
GeneratedField::Sorted => {
if partition_search_mode__.is_some() {
return Err(serde::de::Error::duplicate_field("sorted"));
}
- partition_search_mode__ = map.next_value::<::std::option::Option<_>>()?.map(window_agg_exec_node::PartitionSearchMode::Sorted)
+ partition_search_mode__ = map_.next_value::<::std::option::Option<_>>()?.map(window_agg_exec_node::PartitionSearchMode::Sorted)
;
}
}
@@ -23758,13 +23782,13 @@ impl serde::Serialize for WindowExprNode {
if let Some(v) = self.window_function.as_ref() {
match v {
window_expr_node::WindowFunction::AggrFunction(v) => {
- let v = AggregateFunction::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
+ let v = AggregateFunction::try_from(*v)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
struct_ser.serialize_field("aggrFunction", &v)?;
}
window_expr_node::WindowFunction::BuiltInFunction(v) => {
- let v = BuiltInWindowFunction::from_i32(*v)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
+ let v = BuiltInWindowFunction::try_from(*v)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", *v)))?;
struct_ser.serialize_field("builtInFunction", &v)?;
}
window_expr_node::WindowFunction::Udaf(v) => {
@@ -23854,7 +23878,7 @@ impl<'de> serde::Deserialize<'de> for WindowExprNode {
formatter.write_str("struct datafusion.WindowExprNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<WindowExprNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<WindowExprNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
@@ -23863,55 +23887,55 @@ impl<'de> serde::Deserialize<'de> for WindowExprNode {
let mut order_by__ = None;
let mut window_frame__ = None;
let mut window_function__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ expr__ = map_.next_value()?;
}
GeneratedField::PartitionBy => {
if partition_by__.is_some() {
return Err(serde::de::Error::duplicate_field("partitionBy"));
}
- partition_by__ = Some(map.next_value()?);
+ partition_by__ = Some(map_.next_value()?);
}
GeneratedField::OrderBy => {
if order_by__.is_some() {
return Err(serde::de::Error::duplicate_field("orderBy"));
}
- order_by__ = Some(map.next_value()?);
+ order_by__ = Some(map_.next_value()?);
}
GeneratedField::WindowFrame => {
if window_frame__.is_some() {
return Err(serde::de::Error::duplicate_field("windowFrame"));
}
- window_frame__ = map.next_value()?;
+ window_frame__ = map_.next_value()?;
}
GeneratedField::AggrFunction => {
if window_function__.is_some() {
return Err(serde::de::Error::duplicate_field("aggrFunction"));
}
- window_function__ = map.next_value::<::std::option::Option<AggregateFunction>>()?.map(|x| window_expr_node::WindowFunction::AggrFunction(x as i32));
+ window_function__ = map_.next_value::<::std::option::Option<AggregateFunction>>()?.map(|x| window_expr_node::WindowFunction::AggrFunction(x as i32));
}
GeneratedField::BuiltInFunction => {
if window_function__.is_some() {
return Err(serde::de::Error::duplicate_field("builtInFunction"));
}
- window_function__ = map.next_value::<::std::option::Option<BuiltInWindowFunction>>()?.map(|x| window_expr_node::WindowFunction::BuiltInFunction(x as i32));
+ window_function__ = map_.next_value::<::std::option::Option<BuiltInWindowFunction>>()?.map(|x| window_expr_node::WindowFunction::BuiltInFunction(x as i32));
}
GeneratedField::Udaf => {
if window_function__.is_some() {
return Err(serde::de::Error::duplicate_field("udaf"));
}
- window_function__ = map.next_value::<::std::option::Option<_>>()?.map(window_expr_node::WindowFunction::Udaf);
+ window_function__ = map_.next_value::<::std::option::Option<_>>()?.map(window_expr_node::WindowFunction::Udaf);
}
GeneratedField::Udwf => {
if window_function__.is_some() {
return Err(serde::de::Error::duplicate_field("udwf"));
}
- window_function__ = map.next_value::<::std::option::Option<_>>()?.map(window_expr_node::WindowFunction::Udwf);
+ window_function__ = map_.next_value::<::std::option::Option<_>>()?.map(window_expr_node::WindowFunction::Udwf);
}
}
}
@@ -23946,8 +23970,8 @@ impl serde::Serialize for WindowFrame {
}
let mut struct_ser = serializer.serialize_struct("datafusion.WindowFrame", len)?;
if self.window_frame_units != 0 {
- let v = WindowFrameUnits::from_i32(self.window_frame_units)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.window_frame_units)))?;
+ let v = WindowFrameUnits::try_from(self.window_frame_units)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.window_frame_units)))?;
struct_ser.serialize_field("windowFrameUnits", &v)?;
}
if let Some(v) = self.start_bound.as_ref() {
@@ -24021,32 +24045,32 @@ impl<'de> serde::Deserialize<'de> for WindowFrame {
formatter.write_str("struct datafusion.WindowFrame")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<WindowFrame, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<WindowFrame, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut window_frame_units__ = None;
let mut start_bound__ = None;
let mut end_bound__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::WindowFrameUnits => {
if window_frame_units__.is_some() {
return Err(serde::de::Error::duplicate_field("windowFrameUnits"));
}
- window_frame_units__ = Some(map.next_value::<WindowFrameUnits>()? as i32);
+ window_frame_units__ = Some(map_.next_value::<WindowFrameUnits>()? as i32);
}
GeneratedField::StartBound => {
if start_bound__.is_some() {
return Err(serde::de::Error::duplicate_field("startBound"));
}
- start_bound__ = map.next_value()?;
+ start_bound__ = map_.next_value()?;
}
GeneratedField::Bound => {
if end_bound__.is_some() {
return Err(serde::de::Error::duplicate_field("bound"));
}
- end_bound__ = map.next_value::<::std::option::Option<_>>()?.map(window_frame::EndBound::Bound)
+ end_bound__ = map_.next_value::<::std::option::Option<_>>()?.map(window_frame::EndBound::Bound)
;
}
}
@@ -24077,8 +24101,8 @@ impl serde::Serialize for WindowFrameBound {
}
let mut struct_ser = serializer.serialize_struct("datafusion.WindowFrameBound", len)?;
if self.window_frame_bound_type != 0 {
- let v = WindowFrameBoundType::from_i32(self.window_frame_bound_type)
- .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.window_frame_bound_type)))?;
+ let v = WindowFrameBoundType::try_from(self.window_frame_bound_type)
+ .map_err(|_| serde::ser::Error::custom(format!("Invalid variant {}", self.window_frame_bound_type)))?;
struct_ser.serialize_field("windowFrameBoundType", &v)?;
}
if let Some(v) = self.bound_value.as_ref() {
@@ -24142,25 +24166,25 @@ impl<'de> serde::Deserialize<'de> for WindowFrameBound {
formatter.write_str("struct datafusion.WindowFrameBound")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<WindowFrameBound, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<WindowFrameBound, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut window_frame_bound_type__ = None;
let mut bound_value__ = None;
- while let Some(k) = map.next_key()? {
+ while let Some(k) = map_.next_key()? {
match k {
GeneratedField::WindowFrameBoundType => {
if window_frame_bound_type__.is_some() {
return Err(serde::de::Error::duplicate_field("windowFrameBoundType"));
}
- window_frame_bound_type__ = Some(map.next_value::<WindowFrameBoundType>()? as i32);
+ window_frame_bound_type__ = Some(map_.next_value::<WindowFrameBoundType>()? as i32);
}
GeneratedField::BoundValue => {
if bound_value__.is_some() {
return Err(serde::de::Error::duplicate_field("boundValue"));
}
- bound_value__ = map.next_value()?;
+ bound_value__ = map_.next_value()?;
}
}
}
@@ -24212,10 +24236,9 @@ impl<'de> serde::Deserialize<'de> for WindowFrameBoundType {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(WindowFrameBoundType::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -24225,10 +24248,9 @@ impl<'de> serde::Deserialize<'de> for WindowFrameBoundType {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(WindowFrameBoundType::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -24288,10 +24310,9 @@ impl<'de> serde::Deserialize<'de> for WindowFrameUnits {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(WindowFrameUnits::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
})
@@ -24301,10 +24322,9 @@ impl<'de> serde::Deserialize<'de> for WindowFrameUnits {
where
E: serde::de::Error,
{
- use std::convert::TryFrom;
i32::try_from(v)
.ok()
- .and_then(WindowFrameUnits::from_i32)
+ .and_then(|x| x.try_into().ok())
.ok_or_else(|| {
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
})
@@ -24403,25 +24423,25 @@ impl<'de> serde::Deserialize<'de> for WindowNode {
formatter.write_str("struct datafusion.WindowNode")
}
- fn visit_map<V>(self, mut map: V) -> std::result::Result<WindowNode, V::Error>
+ fn visit_map<V>(self, mut map_: V) -> std::result::Result<WindowNode, V::Error>
where
V: serde::de::MapAccess<'de>,
{
let mut input__ = None;
let mut window_expr__ = None;
- while let Some(k) = map.next_key()? {
+ 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()?;
+ input__ = map_.next_value()?;
}
GeneratedField::WindowExpr => {
if window_expr__.is_some() {
return Err(serde::de::Error::duplicate_field("windowExpr"));
}
- window_expr__ = Some(map.next_value()?);
+ window_expr__ = Some(map_.next_value()?);
}
}
}
diff --git a/datafusion/proto/src/logical_plan/from_proto.rs b/datafusion/proto/src/logical_plan/from_proto.rs
index e13cbd8793..f8746ef4fd 100644
--- a/datafusion/proto/src/logical_plan/from_proto.rs
+++ b/datafusion/proto/src/logical_plan/from_proto.rs
@@ -330,8 +330,8 @@ impl TryFrom<&protobuf::arrow_type::ArrowTypeEnum> for DataType {
.collect::<Result<_, _>>()?,
),
arrow_type::ArrowTypeEnum::Union(union) => {
- let union_mode = protobuf::UnionMode::from_i32(union.union_mode)
- .ok_or_else(|| Error::unknown("UnionMode", union.union_mode))?;
+ let union_mode = protobuf::UnionMode::try_from(union.union_mode)
+ .map_err(|_| Error::unknown("UnionMode", union.union_mode))?;
let union_mode = match union_mode {
protobuf::UnionMode::Dense => UnionMode::Dense,
protobuf::UnionMode::Sparse => UnionMode::Sparse,
@@ -791,8 +791,8 @@ impl TryFrom<protobuf::WindowFrame> for WindowFrame {
type Error = Error;
fn try_from(window: protobuf::WindowFrame) -> Result<Self, Self::Error> {
- let units = protobuf::WindowFrameUnits::from_i32(window.window_frame_units)
- .ok_or_else(|| Error::unknown("WindowFrameUnits", window.window_frame_units))?
+ let units = protobuf::WindowFrameUnits::try_from(window.window_frame_units)
+ .map_err(|_| Error::unknown("WindowFrameUnits", window.window_frame_units))?
.into();
let start_bound = window.start_bound.required("start_bound")?;
let end_bound = window
@@ -817,8 +817,8 @@ impl TryFrom<protobuf::WindowFrameBound> for WindowFrameBound {
fn try_from(bound: protobuf::WindowFrameBound) -> Result<Self, Self::Error> {
let bound_type =
- protobuf::WindowFrameBoundType::from_i32(bound.window_frame_bound_type)
- .ok_or_else(|| {
+ protobuf::WindowFrameBoundType::try_from(bound.window_frame_bound_type)
+ .map_err(|_| {
Error::unknown("WindowFrameBoundType", bound.window_frame_bound_type)
})?;
match bound_type {
@@ -881,21 +881,21 @@ impl From<protobuf::JoinConstraint> for JoinConstraint {
}
pub fn parse_i32_to_time_unit(value: &i32) -> Result<TimeUnit, Error> {
- protobuf::TimeUnit::from_i32(*value)
+ protobuf::TimeUnit::try_from(*value)
.map(|t| t.into())
- .ok_or_else(|| Error::unknown("TimeUnit", *value))
+ .map_err(|_| Error::unknown("TimeUnit", *value))
}
pub fn parse_i32_to_interval_unit(value: &i32) -> Result<IntervalUnit, Error> {
- protobuf::IntervalUnit::from_i32(*value)
+ protobuf::IntervalUnit::try_from(*value)
.map(|t| t.into())
- .ok_or_else(|| Error::unknown("IntervalUnit", *value))
+ .map_err(|_| Error::unknown("IntervalUnit", *value))
}
pub fn parse_i32_to_aggregate_function(value: &i32) -> Result<AggregateFunction, Error> {
- protobuf::AggregateFunction::from_i32(*value)
+ protobuf::AggregateFunction::try_from(*value)
.map(|a| a.into())
- .ok_or_else(|| Error::unknown("AggregateFunction", *value))
+ .map_err(|_| Error::unknown("AggregateFunction", *value))
}
/// Ensures that all `values` are of type DataType::List and have the
@@ -1042,8 +1042,8 @@ pub fn parse_expr(
)))
}
window_expr_node::WindowFunction::BuiltInFunction(i) => {
- let built_in_function = protobuf::BuiltInWindowFunction::from_i32(*i)
- .ok_or_else(|| Error::unknown("BuiltInWindowFunction", *i))?
+ let built_in_function = protobuf::BuiltInWindowFunction::try_from(*i)
+ .map_err(|_| Error::unknown("BuiltInWindowFunction", *i))?
.into();
let args = parse_optional_expr(expr.expr.as_deref(), registry)?
@@ -1255,8 +1255,8 @@ pub fn parse_expr(
))),
ExprType::Wildcard(_) => Ok(Expr::Wildcard),
ExprType::ScalarFunction(expr) => {
- let scalar_function = protobuf::ScalarFunction::from_i32(expr.fun)
- .ok_or_else(|| Error::unknown("ScalarFunction", expr.fun))?;
+ let scalar_function = protobuf::ScalarFunction::try_from(expr.fun)
+ .map_err(|_| Error::unknown("ScalarFunction", expr.fun))?;
let args = &expr.args;
match scalar_function {
diff --git a/datafusion/proto/src/logical_plan/mod.rs b/datafusion/proto/src/logical_plan/mod.rs
index edbcddf34d..55d7270cdc 100644
--- a/datafusion/proto/src/logical_plan/mod.rs
+++ b/datafusion/proto/src/logical_plan/mod.rs
@@ -634,16 +634,16 @@ impl AsLogicalPlan for LogicalPlanNode {
.map(|expr| from_proto::parse_expr(expr, ctx))
.collect::<Result<Vec<_>, _>>()?;
let join_type =
- protobuf::JoinType::from_i32(join.join_type).ok_or_else(|| {
+ protobuf::JoinType::try_from(join.join_type).map_err(|_| {
proto_error(format!(
"Received a JoinNode message with unknown JoinType {}",
join.join_type
))
})?;
- let join_constraint = protobuf::JoinConstraint::from_i32(
+ let join_constraint = protobuf::JoinConstraint::try_from(
join.join_constraint,
)
- .ok_or_else(|| {
+ .map_err(|_| {
proto_error(format!(
"Received a JoinNode message with unknown JoinConstraint {}",
join.join_constraint
diff --git a/datafusion/proto/src/physical_plan/from_proto.rs b/datafusion/proto/src/physical_plan/from_proto.rs
index 6665635d34..bb38116e5d 100644
--- a/datafusion/proto/src/physical_plan/from_proto.rs
+++ b/datafusion/proto/src/physical_plan/from_proto.rs
@@ -287,7 +287,7 @@ pub fn parse_physical_expr(
)),
ExprType::ScalarFunction(e) => {
let scalar_function =
- protobuf::ScalarFunction::from_i32(e.fun).ok_or_else(|| {
+ protobuf::ScalarFunction::try_from(e.fun).map_err(|_| {
proto_error(
format!("Received an unknown scalar function: {}", e.fun,),
)
@@ -415,7 +415,7 @@ impl TryFrom<&protobuf::physical_window_expr_node::WindowFunction> for WindowFun
) -> Result<Self, Self::Error> {
match expr {
protobuf::physical_window_expr_node::WindowFunction::AggrFunction(n) => {
- let f = protobuf::AggregateFunction::from_i32(*n).ok_or_else(|| {
+ let f = protobuf::AggregateFunction::try_from(*n).map_err(|_| {
proto_error(format!(
"Received an unknown window aggregate function: {n}"
))
@@ -424,12 +424,11 @@ impl TryFrom<&protobuf::physical_window_expr_node::WindowFunction> for WindowFun
Ok(WindowFunction::AggregateFunction(f.into()))
}
protobuf::physical_window_expr_node::WindowFunction::BuiltInFunction(n) => {
- let f =
- protobuf::BuiltInWindowFunction::from_i32(*n).ok_or_else(|| {
- proto_error(format!(
- "Received an unknown window builtin function: {n}"
- ))
- })?;
+ let f = protobuf::BuiltInWindowFunction::try_from(*n).map_err(|_| {
+ proto_error(format!(
+ "Received an unknown window builtin function: {n}"
+ ))
+ })?;
Ok(WindowFunction::BuiltInWindowFunction(f.into()))
}
diff --git a/datafusion/proto/src/physical_plan/mod.rs b/datafusion/proto/src/physical_plan/mod.rs
index 417b2af314..61796d9415 100644
--- a/datafusion/proto/src/physical_plan/mod.rs
+++ b/datafusion/proto/src/physical_plan/mod.rs
@@ -353,8 +353,8 @@ impl AsExecutionPlan for PhysicalPlanNode {
runtime,
extension_codec,
)?;
- let mode = protobuf::AggregateMode::from_i32(hash_agg.mode).ok_or_else(
- || {
+ let mode = protobuf::AggregateMode::try_from(hash_agg.mode).map_err(
+ |_| {
proto_error(format!(
"Received a AggregateNode message with unknown AggregateMode {}",
hash_agg.mode
@@ -459,9 +459,9 @@ impl AsExecutionPlan for PhysicalPlanNode {
agg_node.aggregate_function.as_ref().map(|func| {
match func {
AggregateFunction::AggrFunction(i) => {
- let aggr_function = protobuf::AggregateFunction::from_i32(*i)
- .ok_or_else(
- || {
+ let aggr_function = protobuf::AggregateFunction::try_from(*i)
+ .map_err(
+ |_| {
proto_error(format!(
"Received an unknown aggregate function: {i}"
))
@@ -525,8 +525,8 @@ impl AsExecutionPlan for PhysicalPlanNode {
Ok((left, right))
})
.collect::<Result<_>>()?;
- let join_type = protobuf::JoinType::from_i32(hashjoin.join_type)
- .ok_or_else(|| {
+ let join_type = protobuf::JoinType::try_from(hashjoin.join_type)
+ .map_err(|_| {
proto_error(format!(
"Received a HashJoinNode message with unknown JoinType {}",
hashjoin.join_type
@@ -551,8 +551,8 @@ impl AsExecutionPlan for PhysicalPlanNode {
let column_indices = f.column_indices
.iter()
.map(|i| {
- let side = protobuf::JoinSide::from_i32(i.side)
- .ok_or_else(|| proto_error(format!(
+ let side = protobuf::JoinSide::try_from(i.side)
+ .map_err(|_| proto_error(format!(
"Received a HashJoinNode message with JoinSide in Filter {}",
i.side))
)?;
@@ -568,14 +568,15 @@ impl AsExecutionPlan for PhysicalPlanNode {
})
.map_or(Ok(None), |v: Result<JoinFilter>| v.map(Some))?;
- let partition_mode =
- protobuf::PartitionMode::from_i32(hashjoin.partition_mode)
- .ok_or_else(|| {
- proto_error(format!(
+ let partition_mode = protobuf::PartitionMode::try_from(
+ hashjoin.partition_mode,
+ )
+ .map_err(|_| {
+ proto_error(format!(
"Received a HashJoinNode message with unknown PartitionMode {}",
hashjoin.partition_mode
))
- })?;
+ })?;
let partition_mode = match partition_mode {
protobuf::PartitionMode::CollectLeft => PartitionMode::CollectLeft,
protobuf::PartitionMode::Partitioned => PartitionMode::Partitioned,
@@ -734,7 +735,7 @@ impl AsExecutionPlan for PhysicalPlanNode {
let right: Arc<dyn ExecutionPlan> =
into_physical_plan(&join.right, registry, runtime, extension_codec)?;
let join_type =
- protobuf::JoinType::from_i32(join.join_type).ok_or_else(|| {
+ protobuf::JoinType::try_from(join.join_type).map_err(|_| {
proto_error(format!(
"Received a NestedLoopJoinExecNode message with unknown JoinType {}",
join.join_type
@@ -759,8 +760,8 @@ impl AsExecutionPlan for PhysicalPlanNode {
let column_indices = f.column_indices
.iter()
.map(|i| {
- let side = protobuf::JoinSide::from_i32(i.side)
- .ok_or_else(|| proto_error(format!(
+ let side = protobuf::JoinSide::try_from(i.side)
+ .map_err(|_| proto_error(format!(
"Received a NestedLoopJoinExecNode message with JoinSide in Filter {}",
i.side))
)?;