Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ include = [
"LICENSE.txt",
"NOTICE.txt",
]
edition = "2021"
edition = "2024"
rust-version = "1.85"

[workspace.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion arrow-arith/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-array/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-avro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-buffer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-cast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-csv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-data/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-flight/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
name = "arrow-flight"
description = "Apache Arrow Flight"
version = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }
authors = { workspace = true }
homepage = { workspace = true }
Expand Down
14 changes: 7 additions & 7 deletions arrow-integration-test/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub fn field_from_json(json: &serde_json::Value) -> Result<Field> {
Some(_) => {
return Err(ArrowError::ParseError(
"Field 'children' must be an array".to_string(),
))
));
}
None => {
return Err(ArrowError::ParseError(
Expand All @@ -158,7 +158,7 @@ pub fn field_from_json(json: &serde_json::Value) -> Result<Field> {
Some(_) => {
return Err(ArrowError::ParseError(
"Field 'children' must be an array".to_string(),
))
));
}
None => {
return Err(ArrowError::ParseError(
Expand All @@ -177,15 +177,15 @@ pub fn field_from_json(json: &serde_json::Value) -> Result<Field> {
}
t => {
return Err(ArrowError::ParseError(format!(
"Map children should be a struct with 2 fields, found {t:?}"
)))
"Map children should be a struct with 2 fields, found {t:?}"
)));
}
}
}
Some(_) => {
return Err(ArrowError::ParseError(
"Field 'children' must be an array with 1 element".to_string(),
))
));
}
None => {
return Err(ArrowError::ParseError(
Expand All @@ -207,7 +207,7 @@ pub fn field_from_json(json: &serde_json::Value) -> Result<Field> {
Some(_) => {
return Err(ArrowError::ParseError(
"Field 'children' must be an array".to_string(),
))
));
}
None => {
return Err(ArrowError::ParseError(
Expand Down Expand Up @@ -275,7 +275,7 @@ pub fn field_to_json(field: &Field) -> serde_json::Value {
};

match field.data_type() {
DataType::Dictionary(ref index_type, ref value_type) => {
DataType::Dictionary(index_type, value_type) => {
#[allow(deprecated)]
let dict_id = field.dict_id().unwrap();
serde_json::json!({
Expand Down
2 changes: 1 addition & 1 deletion arrow-integration-test/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn schema_from_json(json: &serde_json::Value) -> Result<Schema> {
_ => {
return Err(ArrowError::ParseError(
"Schema fields should be an array".to_string(),
))
));
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

use crate::{AUTH_PASSWORD, AUTH_USERNAME};

use arrow_flight::{flight_service_client::FlightServiceClient, BasicAuth, HandshakeRequest};
use futures::{stream, StreamExt};
use arrow_flight::{BasicAuth, HandshakeRequest, flight_service_client::FlightServiceClient};
use futures::{StreamExt, stream};
use prost::Message;
use tonic::{metadata::MetadataValue, transport::Endpoint, Request, Status};
use tonic::{Request, Status, metadata::MetadataValue, transport::Endpoint};

type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
type Result<T = (), E = Error> = std::result::Result<T, E>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ use arrow::{
record_batch::RecordBatch,
};
use arrow_flight::{
flight_descriptor::DescriptorType, flight_service_client::FlightServiceClient,
utils::flight_data_to_arrow_batch, FlightData, FlightDescriptor, IpcMessage, Location, Ticket,
FlightData, FlightDescriptor, IpcMessage, Location, Ticket, flight_descriptor::DescriptorType,
flight_service_client::FlightServiceClient, utils::flight_data_to_arrow_batch,
};
use futures::{channel::mpsc, sink::SinkExt, stream, StreamExt};
use tonic::{transport::Endpoint, Request, Streaming};
use futures::{StreamExt, channel::mpsc, sink::SinkExt, stream};
use tonic::{Request, Streaming, transport::Endpoint};

use arrow::datatypes::Schema;
use std::sync::Arc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! Scenario for testing middleware.

use arrow_flight::{
flight_descriptor::DescriptorType, flight_service_client::FlightServiceClient, FlightDescriptor,
FlightDescriptor, flight_descriptor::DescriptorType, flight_service_client::FlightServiceClient,
};
use prost::bytes::Bytes;
use tonic::{Request, Status};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ use std::pin::Pin;
use std::sync::Arc;

use arrow_flight::{
flight_service_server::FlightService, flight_service_server::FlightServiceServer, Action,
ActionType, BasicAuth, Criteria, Empty, FlightData, FlightDescriptor, FlightInfo,
Action, ActionType, BasicAuth, Criteria, Empty, FlightData, FlightDescriptor, FlightInfo,
HandshakeRequest, HandshakeResponse, PollInfo, PutResult, SchemaResult, Ticket,
flight_service_server::FlightService, flight_service_server::FlightServiceServer,
};
use futures::{channel::mpsc, sink::SinkExt, Stream, StreamExt};
use futures::{Stream, StreamExt, channel::mpsc, sink::SinkExt};
use tokio::sync::Mutex;
use tonic::{metadata::MetadataMap, transport::Server, Request, Response, Status, Streaming};
use tonic::{Request, Response, Status, Streaming, metadata::MetadataMap, transport::Server};
type TonicStream<T> = Pin<Box<dyn Stream<Item = T> + Send + Sync + 'static>>;

type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ use arrow::{
record_batch::RecordBatch,
};
use arrow_flight::{
flight_descriptor::DescriptorType, flight_service_server::FlightService,
flight_service_server::FlightServiceServer, Action, ActionType, Criteria, Empty, FlightData,
FlightDescriptor, FlightEndpoint, FlightInfo, HandshakeRequest, HandshakeResponse, IpcMessage,
PollInfo, PutResult, SchemaAsIpc, SchemaResult, Ticket,
Action, ActionType, Criteria, Empty, FlightData, FlightDescriptor, FlightEndpoint, FlightInfo,
HandshakeRequest, HandshakeResponse, IpcMessage, PollInfo, PutResult, SchemaAsIpc,
SchemaResult, Ticket, flight_descriptor::DescriptorType, flight_service_server::FlightService,
flight_service_server::FlightServiceServer,
};
use futures::{channel::mpsc, sink::SinkExt, Stream, StreamExt};
use futures::{Stream, StreamExt, channel::mpsc, sink::SinkExt};
use tokio::sync::Mutex;
use tonic::{transport::Server, Request, Response, Status, Streaming};
use tonic::{Request, Response, Status, Streaming, transport::Server};

type TonicStream<T> = Pin<Box<dyn Stream<Item = T> + Send + Sync + 'static>>;

Expand Down Expand Up @@ -383,7 +383,7 @@ async fn save_uploaded_chunks(
ipc::MessageHeader::Schema => {
return Err(Status::internal(
"Not expecting a schema when messages are read",
))
));
}
ipc::MessageHeader::RecordBatch => {
send_app_metadata(&mut response_tx, &data.app_metadata).await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
use std::pin::Pin;

use arrow_flight::{
Action, ActionType, Criteria, Empty, FlightData, FlightDescriptor, FlightInfo,
HandshakeRequest, HandshakeResponse, PollInfo, PutResult, SchemaResult, Ticket,
flight_descriptor::DescriptorType, flight_service_server::FlightService,
flight_service_server::FlightServiceServer, Action, ActionType, Criteria, Empty, FlightData,
FlightDescriptor, FlightInfo, HandshakeRequest, HandshakeResponse, PollInfo, PutResult,
SchemaResult, Ticket,
flight_service_server::FlightServiceServer,
};
use futures::Stream;
use tonic::{transport::Server, Request, Response, Status, Streaming};
use tonic::{Request, Response, Status, Streaming, transport::Server};

type TonicStream<T> = Pin<Box<dyn Stream<Item = T> + Send + Sync + 'static>>;

Expand Down
14 changes: 7 additions & 7 deletions arrow-integration-testing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ use serde_json::Value;
use arrow::array::{Array, StructArray};
use arrow::datatypes::{DataType, Field, Fields, Schema};
use arrow::error::{ArrowError, Result};
use arrow::ffi::{from_ffi_and_data_type, FFI_ArrowArray, FFI_ArrowSchema};
use arrow::ffi::{FFI_ArrowArray, FFI_ArrowSchema, from_ffi_and_data_type};
use arrow::record_batch::RecordBatch;
use arrow::util::test_util::arrow_test_data;
use arrow_integration_test::*;
use std::collections::HashMap;
use std::ffi::{c_char, c_int, CStr, CString};
use std::ffi::{CStr, CString, c_char, c_int};
use std::fs::File;
use std::io::BufReader;
use std::iter::zip;
Expand Down Expand Up @@ -261,15 +261,15 @@ fn result_to_c_error<T, E: std::fmt::Display>(result: &std::result::Result<T, E>
/// # Safety
///
/// The pointer is assumed to have been obtained using CString::into_raw.
#[no_mangle]
#[unsafe(no_mangle)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL why this is marked unsafe: https://doc.rust-lang.org/reference/abi.html#the-no_mangle-attribute

(I don't think the actual safety is affected, just that rustc got more pedantic)

pub unsafe extern "C" fn arrow_rs_free_error(c_error: *mut c_char) {
if !c_error.is_null() {
drop(unsafe { CString::from_raw(c_error) });
}
}

/// A C-ABI for exporting an Arrow schema from a JSON file
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn arrow_rs_cdata_integration_export_schema_from_json(
c_json_name: *const c_char,
out: *mut FFI_ArrowSchema,
Expand All @@ -279,7 +279,7 @@ pub extern "C" fn arrow_rs_cdata_integration_export_schema_from_json(
}

/// A C-ABI to compare an Arrow schema against a JSON file
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn arrow_rs_cdata_integration_import_schema_and_compare_to_json(
c_json_name: *const c_char,
c_schema: *mut FFI_ArrowSchema,
Expand All @@ -289,7 +289,7 @@ pub extern "C" fn arrow_rs_cdata_integration_import_schema_and_compare_to_json(
}

/// A C-ABI for exporting a RecordBatch from a JSON file
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn arrow_rs_cdata_integration_export_batch_from_json(
c_json_name: *const c_char,
batch_num: c_int,
Expand All @@ -300,7 +300,7 @@ pub extern "C" fn arrow_rs_cdata_integration_export_batch_from_json(
}

/// A C-ABI to compare a RecordBatch against a JSON file
#[no_mangle]
#[unsafe(no_mangle)]
pub extern "C" fn arrow_rs_cdata_integration_import_batch_and_compare_to_json(
c_json_name: *const c_char,
batch_num: c_int,
Expand Down
2 changes: 1 addition & 1 deletion arrow-ipc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-ord/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-pyarrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-row/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-schema/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-select/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow-string/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ authors = { workspace = true }
license = { workspace = true }
keywords = { workspace = true }
include = { workspace = true }
edition = "2024"
edition = { workspace = true }
rust-version = { workspace = true }

[lib]
Expand Down
2 changes: 1 addition & 1 deletion arrow/benches/aggregate_kernels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern crate arrow;
use arrow::compute::kernels::aggregate::*;
use arrow::util::bench_util::*;
use arrow::{array::*, datatypes::Float32Type};
use arrow_array::types::{Float64Type, Int16Type, Int32Type, Int64Type, Int8Type};
use arrow_array::types::{Float64Type, Int8Type, Int16Type, Int32Type, Int64Type};

const BATCH_SIZE: usize = 64 * 1024;

Expand Down
Loading
Loading