Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions arrow-flight/src/sql/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ use crate::{
};
use futures::{Stream, StreamExt, stream::Peekable};
use prost::Message;
use prost_types::field_descriptor_proto::Type::Message;
use tonic::{Request, Response, Status, Streaming};

pub(crate) static CREATE_PREPARED_STATEMENT: &str = "CreatePreparedStatement";
Expand Down Expand Up @@ -623,7 +624,7 @@ where
}),
request,
)
.await
.await;
}
};

Expand Down Expand Up @@ -700,7 +701,7 @@ where
value: bytes::Bytes::new(),
},
)
.await
.await;
}
};

Expand Down Expand Up @@ -760,23 +761,21 @@ where
.do_put_error_callback(request, DoPutError::MissingFlightDescriptor)
.await;
};
let message = Any::decode(flight_descriptor.cmd).map_err(decode_error_to_status)?;
let message = match Any::decode(&*cmd.flight_descriptor.unwrap().cmd)
.map_err(decode_error_to_status)
{
Ok(msg) => msg,
Err(_) => {
return self
.do_put_fallback(
request,
Any {
type_url: "".to_string(),
value: bytes::Bytes::new(),
},
)
.await
}
};
let message = Any =
match Message::decode(flight_descriptor.cmd).map_err(decode_error_to_status) {
Ok(msg) => msg,
Err(_) => {
return self
.do_put_fallback(
request,
Any {
type_url: "".to_string(),
value: bytes::Bytes::new(),
},
)
.await;
}
};
match Command::try_from(message).map_err(arrow_error_to_status)? {
Command::CommandStatementUpdate(command) => {
let record_count = self.do_put_statement_update(command, request).await?;
Expand Down
1 change: 1 addition & 0 deletions arrow-row/src/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub const NON_EMPTY_SENTINEL: u8 = 2;

/// Returns the length of the encoded representation of a byte array, including the null byte
#[inline]
#[allow(dead_code)]
pub fn encoded_len(a: Option<&[u8]>) -> usize {
padded_length(a.map(|x| x.len()))
}
Expand Down
1 change: 1 addition & 0 deletions parquet/src/arrow/array_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ mod test_util;

// Note that this crate is public under the `experimental` feature flag.
use crate::file::metadata::RowGroupMetaData;
#[allow(unused_imports)]
pub use builder::{ArrayReaderBuilder, CacheOptions, CacheOptionsBuilder};
pub use byte_array::make_byte_array_reader;
pub use byte_array_dictionary::make_byte_array_dictionary_reader;
Expand Down
6 changes: 4 additions & 2 deletions parquet/src/arrow/schema/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use crate::basic::LogicalType;
use crate::errors::ParquetError;
use crate::schema::types::Type;
use arrow_schema::Field;
#[allow(unused_imports)]
use arrow_schema::extension::ExtensionType;

/// Adds extension type metadata, if necessary, based on the Parquet field's
Expand All @@ -35,6 +36,7 @@ use arrow_schema::extension::ExtensionType;
/// Some Parquet logical types, such as Variant, do not map directly to an
/// Arrow DataType, and instead are represented by an Arrow ExtensionType.
/// Extension types are attached to Arrow Fields via metadata.
#[allow(unused_mut)]
pub(crate) fn try_add_extension_type(
mut arrow_field: Field,
parquet_type: &Type,
Expand Down Expand Up @@ -172,7 +174,7 @@ pub(crate) fn logical_type_for_binary(field: &Field) -> Option<LogicalType> {
}

#[cfg(not(feature = "geospatial"))]
pub(crate) fn logical_type_for_binary(field: &Field) -> Option<LogicalType> {
pub(crate) fn logical_type_for_binary(_field: &Field) -> Option<LogicalType> {
None
}

Expand All @@ -182,6 +184,6 @@ pub(crate) fn logical_type_for_binary_view(field: &Field) -> Option<LogicalType>
}

#[cfg(not(feature = "geospatial"))]
pub(crate) fn logical_type_for_binary_view(field: &Field) -> Option<LogicalType> {
pub(crate) fn logical_type_for_binary_view(_field: &Field) -> Option<LogicalType> {
None
}
Loading