Skip to content

Commit

Permalink
Update arrow 49.0.0 and object_store 0.8.0 (#8029)
Browse files Browse the repository at this point in the history
* POC: Remove ListingTable Append Support (#7994)

* Prepare object_store 0.8.0

* Fix datafusion-cli test

* Update arrow version

* Update tests

* Update pin

* Unignore fifo test

* Update lockfile
  • Loading branch information
tustvold authored Nov 18, 2023
1 parent 2e3f434 commit a984f08
Show file tree
Hide file tree
Showing 27 changed files with 132 additions and 102 deletions.
17 changes: 8 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ rust-version = "1.70"
version = "33.0.0"

[workspace.dependencies]
arrow = { version = "~48.0.1", features = ["prettyprint"] }
arrow-array = { version = "~48.0.1", default-features = false, features = ["chrono-tz"] }
arrow-buffer = { version = "~48.0.1", default-features = false }
arrow-flight = { version = "~48.0.1", features = ["flight-sql-experimental"] }
arrow-ord = { version = "~48.0.1", default-features = false }
arrow-schema = { version = "~48.0.1", default-features = false }
arrow = { version = "49.0.0", features = ["prettyprint"] }
arrow-array = { version = "49.0.0", default-features = false, features = ["chrono-tz"] }
arrow-buffer = { version = "49.0.0", default-features = false }
arrow-flight = { version = "49.0.0", features = ["flight-sql-experimental"] }
arrow-ord = { version = "49.0.0", default-features = false }
arrow-schema = { version = "49.0.0", default-features = false }
async-trait = "0.1.73"
bigdecimal = "0.4.1"
bytes = "1.4"
Expand All @@ -79,9 +79,9 @@ indexmap = "2.0.0"
itertools = "0.12"
log = "^0.4"
num_cpus = "1.13.0"
object_store = { version = "0.7.0", default-features = false }
object_store = { version = "0.8.0", default-features = false }
parking_lot = "0.12"
parquet = { version = "~48.0.1", default-features = false, features = ["arrow", "async", "object_store"] }
parquet = { version = "49.0.0", default-features = false, features = ["arrow", "async", "object_store"] }
rand = "0.8"
rstest = "0.18.0"
serde_json = "1"
Expand All @@ -108,4 +108,3 @@ opt-level = 3
overflow-checks = false
panic = 'unwind'
rpath = false

71 changes: 36 additions & 35 deletions datafusion-cli/Cargo.lock

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

4 changes: 2 additions & 2 deletions datafusion-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rust-version = "1.70"
readme = "README.md"

[dependencies]
arrow = "~48.0.1"
arrow = "49.0.0"
async-trait = "0.1.41"
aws-config = "0.55"
aws-credential-types = "0.55"
Expand All @@ -38,7 +38,7 @@ datafusion = { path = "../datafusion/core", version = "33.0.0", features = ["avr
dirs = "4.0.0"
env_logger = "0.9"
mimalloc = { version = "0.1", default-features = false }
object_store = { version = "0.7.0", features = ["aws", "gcp"] }
object_store = { version = "0.8.0", features = ["aws", "gcp"] }
parking_lot = { version = "0.12" }
regex = "1.8"
rustyline = "11.0"
Expand Down
7 changes: 4 additions & 3 deletions datafusion-cli/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ mod tests {
async fn create_object_store_table_gcs() -> Result<()> {
let service_account_path = "fake_service_account_path";
let service_account_key =
"{\"private_key\": \"fake_private_key.pem\",\"client_email\":\"fake_client_email\"}";
"{\"private_key\": \"fake_private_key.pem\",\"client_email\":\"fake_client_email\", \"private_key_id\":\"id\"}";
let application_credentials_path = "fake_application_credentials_path";
let location = "gcs://bucket/path/file.parquet";

Expand All @@ -366,8 +366,9 @@ mod tests {
let sql = format!("CREATE EXTERNAL TABLE test STORED AS PARQUET OPTIONS('service_account_key' '{service_account_key}') LOCATION '{location}'");
let err = create_external_table_test(location, &sql)
.await
.unwrap_err();
assert!(err.to_string().contains("No RSA key found in pem file"));
.unwrap_err()
.to_string();
assert!(err.contains("No RSA key found in pem file"), "{err}");

// for application_credentials_path
let sql = format!("CREATE EXTERNAL TABLE test STORED AS PARQUET
Expand Down
7 changes: 1 addition & 6 deletions datafusion/core/src/catalog/listing_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ impl ListingSchemaProvider {

/// Reload table information from ObjectStore
pub async fn refresh(&self, state: &SessionState) -> datafusion_common::Result<()> {
let entries: Vec<_> = self
.store
.list(Some(&self.path))
.await?
.try_collect()
.await?;
let entries: Vec<_> = self.store.list(Some(&self.path)).try_collect().await?;
let base = Path::new(self.path.as_ref());
let mut tables = HashSet::new();
for file in entries.iter() {
Expand Down
2 changes: 2 additions & 0 deletions datafusion/core/src/datasource/file_format/arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ mod tests {
last_modified: DateTime::default(),
size: usize::MAX,
e_tag: None,
version: None,
};

let arrow_format = ArrowFormat {};
Expand Down Expand Up @@ -256,6 +257,7 @@ mod tests {
last_modified: DateTime::default(),
size: usize::MAX,
e_tag: None,
version: None,
};

let arrow_format = ArrowFormat {};
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 @@ -673,6 +673,7 @@ mod tests {
last_modified: DateTime::default(),
size: usize::MAX,
e_tag: None,
version: None,
};

let num_rows_to_read = 100;
Expand Down
16 changes: 11 additions & 5 deletions datafusion/core/src/datasource/file_format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ pub(crate) mod test_util {
use object_store::local::LocalFileSystem;
use object_store::path::Path;
use object_store::{
GetOptions, GetResult, GetResultPayload, ListResult, MultipartId,
GetOptions, GetResult, GetResultPayload, ListResult, MultipartId, PutOptions,
PutResult,
};
use tokio::io::AsyncWrite;

Expand Down Expand Up @@ -189,7 +190,12 @@ pub(crate) mod test_util {

#[async_trait]
impl ObjectStore for VariableStream {
async fn put(&self, _location: &Path, _bytes: Bytes) -> object_store::Result<()> {
async fn put_opts(
&self,
_location: &Path,
_bytes: Bytes,
_opts: PutOptions,
) -> object_store::Result<PutResult> {
unimplemented!()
}

Expand Down Expand Up @@ -228,6 +234,7 @@ pub(crate) mod test_util {
last_modified: Default::default(),
size: range.end,
e_tag: None,
version: None,
},
range: Default::default(),
})
Expand Down Expand Up @@ -257,11 +264,10 @@ pub(crate) mod test_util {
unimplemented!()
}

async fn list(
fn list(
&self,
_prefix: Option<&Path>,
) -> object_store::Result<BoxStream<'_, object_store::Result<ObjectMeta>>>
{
) -> BoxStream<'_, object_store::Result<ObjectMeta>> {
unimplemented!()
}

Expand Down
Loading

0 comments on commit a984f08

Please sign in to comment.