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
1,514 changes: 712 additions & 802 deletions Cargo.lock

Large diffs are not rendered by default.

26 changes: 25 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ liblzma = { version = "0.4.6", features = ["static"] }
log = "^0.4"
memchr = "2.8.1"
num-traits = { version = "0.2" }
object_store = { version = "0.13.2", default-features = false }
object_store = { version = "0.14.1", default-features = false }
parking_lot = "0.12"
parquet = { version = "59.1.0", default-features = false, features = [
"arrow",
Expand Down Expand Up @@ -294,3 +294,27 @@ debug = false
debug-assertions = false
strip = "debuginfo"
incremental = false

# Force all transitive uses of `object_store` (e.g., the `parquet` crate) to
# resolve to the local 0.14.1 checkout while we are transitioning the API.
# Also patch the arrow/parquet crates to arrow-rs revision 30ae8d3 ("chore:
# bump object_store to 0.14.1") so their `parquet` depends on the same
# object_store 0.14.1 rather than 0.13.x from crates.io.
[patch.crates-io]
arrow = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-arith = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-array = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-avro = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-buffer = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-cast = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-csv = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-data = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-flight = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-ipc = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-json = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-ord = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-row = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-schema = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-select = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
arrow-string = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
parquet = { git = "https://github.com/comphead/arrow-rs.git", rev = "30ae8d3ef84207ee184d1f6207d1f6485d02a276" }
8 changes: 4 additions & 4 deletions datafusion-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,14 +842,14 @@ mod tests {
])?
.sort(vec![col("filename").sort(true, false)])?;
let rbs = df.collect().await?;
assert_snapshot!(batches_to_string(&rbs),@r"
assert_snapshot!(batches_to_string(&rbs),@r#"
+---------------------+-----------+-----------------+------+------+
| metadata_size_bytes | filename | file_size_bytes | etag | hits |
+---------------------+-----------+-----------------+------+------+
| 212 | 0.parquet | 3642 | 0 | 2 |
| 212 | 1.parquet | 3642 | 1 | 2 |
| 216 | 0.parquet | 3642 | "0" | 2 |
| 216 | 1.parquet | 3642 | "1" | 2 |
+---------------------+-----------+-----------------+------+------+
");
"#);

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion datafusion-cli/src/object_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async fn get_s3_object_store_builder_inner(
let CredentialsFromConfig {
region,
credentials,
} = CredentialsFromConfig::try_new().await?;
} = Box::pin(CredentialsFromConfig::try_new()).await?;
if let Some(region) = region {
builder = builder.with_region(region);
}
Expand Down
15 changes: 12 additions & 3 deletions datafusion/common/src/nested_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ mod tests {
use arrow::{
array::{
BinaryArray, Int32Array, Int32Builder, Int64Array, ListArray, ListViewArray,
MapArray, MapBuilder, NullArray, StringArray, StringBuilder,
MapArray, MapBuilder, MapFieldNames, NullArray, StringArray, StringBuilder,
},
buffer::{NullBuffer, ScalarBuffer},
datatypes::{DataType, Field, FieldRef, Int32Type},
Expand Down Expand Up @@ -1009,10 +1009,19 @@ mod tests {
None,
])) as ArrayRef;

// Map field with second row null
// Map field with second row null. Use explicit field names matching the
// target schema; arrow's `MapBuilder` default is now `key`/`value`.
let string_builder = StringBuilder::new();
let int_builder = Int32Builder::new();
let mut map_builder = MapBuilder::new(None, string_builder, int_builder);
let mut map_builder = MapBuilder::new(
Some(MapFieldNames {
entry: "entries".to_string(),
key: "keys".to_string(),
value: "values".to_string(),
}),
string_builder,
int_builder,
);
map_builder.keys().append_value("a");
map_builder.values().append_value(1);
map_builder.append(true).unwrap();
Expand Down
1 change: 1 addition & 0 deletions datafusion/core/src/datasource/file_format/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ mod tests {
},
range: Default::default(),
attributes: Attributes::default(),
extensions: Default::default(),
})
}

Expand Down
2 changes: 2 additions & 0 deletions datafusion/core/tests/sql/path_partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ impl ObjectStore for MirroringObjectStore {
payload,
meta,
attributes: Attributes::default(),
extensions: Default::default(),
})
}

Expand Down Expand Up @@ -789,6 +790,7 @@ impl ObjectStore for MirroringObjectStore {
Ok(ListResult {
common_prefixes: common_prefixes.into_iter().collect(),
objects,
extensions: Default::default(),
})
}

Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions/src/core/arrow_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ impl ArrowFieldFunc {
Arc::new(Field::new(
"entries",
DataType::Struct(Fields::from(vec![
Field::new("keys", DataType::Utf8, false),
Field::new("values", DataType::Utf8, true),
Field::new("key", DataType::Utf8, false),
Field::new("value", DataType::Utf8, true),
])),
false,
)),
Expand Down
4 changes: 2 additions & 2 deletions datafusion/functions/src/core/arrow_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ impl ScalarUDFImpl for ArrowMetadataFunc {
Arc::new(Field::new(
"entries",
DataType::Struct(Fields::from(vec![
Field::new("keys", DataType::Utf8, false),
Field::new("values", DataType::Utf8, true),
Field::new("key", DataType::Utf8, false),
Field::new("value", DataType::Utf8, true),
])),
false,
)),
Expand Down
4 changes: 2 additions & 2 deletions datafusion/proto/tests/cases/roundtrip_logical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,7 @@ fn round_trip_scalar_values_and_data_types() {
Arc::new(Field::new(
"entries",
DataType::Struct(Fields::from(vec![
Field::new("key", DataType::Int32, true),
Field::new("key", DataType::Int32, false),
Field::new("value", DataType::Utf8, false),
])),
false,
Expand All @@ -2228,7 +2228,7 @@ fn round_trip_scalar_values_and_data_types() {
Arc::new(Field::new(
"entries",
DataType::Struct(Fields::from(vec![
Field::new("key", DataType::Int32, true),
Field::new("key", DataType::Int32, false),
Field::new("value", DataType::Utf8, true),
])),
false,
Expand Down
Loading