Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to object_store 0.9.0 and arrow 50.0.0 #8758

Merged
merged 14 commits into from
Jan 14, 2024
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ opt-level = 3
overflow-checks = false
panic = 'unwind'
rpath = false

[patch.crates-io]
object_store = { git = "https://github.com/apache/arrow-rs.git", rev = "f7101ec3a2b37c436f4554c28fa2d0a05de533ff" }
35 changes: 22 additions & 13 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ assert_cmd = "2.0"
ctor = "0.2.0"
predicates = "3.0"
rstest = "0.17"

[patch.crates-io]
object_store = { git = "https://github.com/apache/arrow-rs.git", rev = "f7101ec3a2b37c436f4554c28fa2d0a05de533ff" }
8 changes: 0 additions & 8 deletions datafusion-cli/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,6 @@ mod tests {
let session_token = "fake_session_token";
let location = "s3://bucket/path/file.parquet";

// Missing region
alamb marked this conversation as resolved.
Show resolved Hide resolved
let sql = format!("CREATE EXTERNAL TABLE test STORED AS PARQUET
OPTIONS('access_key_id' '{access_key_id}', 'secret_access_key' '{secret_access_key}') LOCATION '{location}'");
let err = create_external_table_test(location, &sql)
.await
.unwrap_err();
assert!(err.to_string().contains("Missing region"));

// Should be OK
let sql = format!("CREATE EXTERNAL TABLE test STORED AS PARQUET
OPTIONS('access_key_id' '{access_key_id}', 'secret_access_key' '{secret_access_key}', 'region' '{region}', 'session_token' '{session_token}') LOCATION '{location}'");
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/datasource/physical_plan/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ impl FileOpener for CsvOpener {

let range = match calculated_range {
RangeCalculation::Range(None) => None,
RangeCalculation::Range(Some(range)) => Some(range),
RangeCalculation::Range(Some(range)) => Some(range.into()),
RangeCalculation::TerminateEarly => {
return Ok(
futures::stream::poll_fn(move |_| Poll::Ready(None)).boxed()
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/datasource/physical_plan/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl FileOpener for JsonOpener {

let range = match calculated_range {
RangeCalculation::Range(None) => None,
RangeCalculation::Range(Some(range)) => Some(range),
RangeCalculation::Range(Some(range)) => Some(range.into()),
RangeCalculation::TerminateEarly => {
return Ok(
futures::stream::poll_fn(move |_| Poll::Ready(None)).boxed()
Expand Down
6 changes: 2 additions & 4 deletions datafusion/core/src/datasource/physical_plan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ use datafusion_physical_plan::ExecutionPlan;

use log::debug;
use object_store::ObjectMeta;
use object_store::{path::Path, GetOptions, ObjectStore};
use object_store::{path::Path, GetOptions, GetRange, ObjectStore};

/// The base configurations to provide when creating a physical plan for
/// writing to any given file format.
Expand Down Expand Up @@ -604,10 +604,8 @@ async fn find_first_newline(
start: usize,
end: usize,
) -> Result<usize> {
let range = Some(Range { start, end });

let options = GetOptions {
range,
range: Some(GetRange::Bounded(start..end)),
..Default::default()
};

Expand Down