Skip to content

Commit a984f08

Browse files
authored
Update arrow 49.0.0 and object_store 0.8.0 (#8029)
* 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
1 parent 2e3f434 commit a984f08

File tree

27 files changed

+132
-102
lines changed

27 files changed

+132
-102
lines changed

Cargo.toml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ rust-version = "1.70"
4949
version = "33.0.0"
5050

5151
[workspace.dependencies]
52-
arrow = { version = "~48.0.1", features = ["prettyprint"] }
53-
arrow-array = { version = "~48.0.1", default-features = false, features = ["chrono-tz"] }
54-
arrow-buffer = { version = "~48.0.1", default-features = false }
55-
arrow-flight = { version = "~48.0.1", features = ["flight-sql-experimental"] }
56-
arrow-ord = { version = "~48.0.1", default-features = false }
57-
arrow-schema = { version = "~48.0.1", default-features = false }
52+
arrow = { version = "49.0.0", features = ["prettyprint"] }
53+
arrow-array = { version = "49.0.0", default-features = false, features = ["chrono-tz"] }
54+
arrow-buffer = { version = "49.0.0", default-features = false }
55+
arrow-flight = { version = "49.0.0", features = ["flight-sql-experimental"] }
56+
arrow-ord = { version = "49.0.0", default-features = false }
57+
arrow-schema = { version = "49.0.0", default-features = false }
5858
async-trait = "0.1.73"
5959
bigdecimal = "0.4.1"
6060
bytes = "1.4"
@@ -79,9 +79,9 @@ indexmap = "2.0.0"
7979
itertools = "0.12"
8080
log = "^0.4"
8181
num_cpus = "1.13.0"
82-
object_store = { version = "0.7.0", default-features = false }
82+
object_store = { version = "0.8.0", default-features = false }
8383
parking_lot = "0.12"
84-
parquet = { version = "~48.0.1", default-features = false, features = ["arrow", "async", "object_store"] }
84+
parquet = { version = "49.0.0", default-features = false, features = ["arrow", "async", "object_store"] }
8585
rand = "0.8"
8686
rstest = "0.18.0"
8787
serde_json = "1"
@@ -108,4 +108,3 @@ opt-level = 3
108108
overflow-checks = false
109109
panic = 'unwind'
110110
rpath = false
111-

datafusion-cli/Cargo.lock

Lines changed: 36 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion-cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rust-version = "1.70"
2929
readme = "README.md"
3030

3131
[dependencies]
32-
arrow = "~48.0.1"
32+
arrow = "49.0.0"
3333
async-trait = "0.1.41"
3434
aws-config = "0.55"
3535
aws-credential-types = "0.55"
@@ -38,7 +38,7 @@ datafusion = { path = "../datafusion/core", version = "33.0.0", features = ["avr
3838
dirs = "4.0.0"
3939
env_logger = "0.9"
4040
mimalloc = { version = "0.1", default-features = false }
41-
object_store = { version = "0.7.0", features = ["aws", "gcp"] }
41+
object_store = { version = "0.8.0", features = ["aws", "gcp"] }
4242
parking_lot = { version = "0.12" }
4343
regex = "1.8"
4444
rustyline = "11.0"

datafusion-cli/src/exec.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ mod tests {
350350
async fn create_object_store_table_gcs() -> Result<()> {
351351
let service_account_path = "fake_service_account_path";
352352
let service_account_key =
353-
"{\"private_key\": \"fake_private_key.pem\",\"client_email\":\"fake_client_email\"}";
353+
"{\"private_key\": \"fake_private_key.pem\",\"client_email\":\"fake_client_email\", \"private_key_id\":\"id\"}";
354354
let application_credentials_path = "fake_application_credentials_path";
355355
let location = "gcs://bucket/path/file.parquet";
356356

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

372373
// for application_credentials_path
373374
let sql = format!("CREATE EXTERNAL TABLE test STORED AS PARQUET

datafusion/core/src/catalog/listing_schema.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,7 @@ impl ListingSchemaProvider {
9292

9393
/// Reload table information from ObjectStore
9494
pub async fn refresh(&self, state: &SessionState) -> datafusion_common::Result<()> {
95-
let entries: Vec<_> = self
96-
.store
97-
.list(Some(&self.path))
98-
.await?
99-
.try_collect()
100-
.await?;
95+
let entries: Vec<_> = self.store.list(Some(&self.path)).try_collect().await?;
10196
let base = Path::new(self.path.as_ref());
10297
let mut tables = HashSet::new();
10398
for file in entries.iter() {

datafusion/core/src/datasource/file_format/arrow.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ mod tests {
214214
last_modified: DateTime::default(),
215215
size: usize::MAX,
216216
e_tag: None,
217+
version: None,
217218
};
218219

219220
let arrow_format = ArrowFormat {};
@@ -256,6 +257,7 @@ mod tests {
256257
last_modified: DateTime::default(),
257258
size: usize::MAX,
258259
e_tag: None,
260+
version: None,
259261
};
260262

261263
let arrow_format = ArrowFormat {};

datafusion/core/src/datasource/file_format/csv.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ mod tests {
673673
last_modified: DateTime::default(),
674674
size: usize::MAX,
675675
e_tag: None,
676+
version: None,
676677
};
677678

678679
let num_rows_to_read = 100;

datafusion/core/src/datasource/file_format/mod.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ pub(crate) mod test_util {
124124
use object_store::local::LocalFileSystem;
125125
use object_store::path::Path;
126126
use object_store::{
127-
GetOptions, GetResult, GetResultPayload, ListResult, MultipartId,
127+
GetOptions, GetResult, GetResultPayload, ListResult, MultipartId, PutOptions,
128+
PutResult,
128129
};
129130
use tokio::io::AsyncWrite;
130131

@@ -189,7 +190,12 @@ pub(crate) mod test_util {
189190

190191
#[async_trait]
191192
impl ObjectStore for VariableStream {
192-
async fn put(&self, _location: &Path, _bytes: Bytes) -> object_store::Result<()> {
193+
async fn put_opts(
194+
&self,
195+
_location: &Path,
196+
_bytes: Bytes,
197+
_opts: PutOptions,
198+
) -> object_store::Result<PutResult> {
193199
unimplemented!()
194200
}
195201

@@ -228,6 +234,7 @@ pub(crate) mod test_util {
228234
last_modified: Default::default(),
229235
size: range.end,
230236
e_tag: None,
237+
version: None,
231238
},
232239
range: Default::default(),
233240
})
@@ -257,11 +264,10 @@ pub(crate) mod test_util {
257264
unimplemented!()
258265
}
259266

260-
async fn list(
267+
fn list(
261268
&self,
262269
_prefix: Option<&Path>,
263-
) -> object_store::Result<BoxStream<'_, object_store::Result<ObjectMeta>>>
264-
{
270+
) -> BoxStream<'_, object_store::Result<ObjectMeta>> {
265271
unimplemented!()
266272
}
267273

0 commit comments

Comments
 (0)