From 2f3379559fa57f0e2664c173841c84fe91cd1c9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 14:50:18 +0100 Subject: [PATCH 1/4] Update quick-xml requirement from 0.30.0 to 0.31.0 in /object_store (#4983) Updates the requirements on [quick-xml](https://github.com/tafia/quick-xml) to permit the latest version. - [Release notes](https://github.com/tafia/quick-xml/releases) - [Changelog](https://github.com/tafia/quick-xml/blob/master/Changelog.md) - [Commits](https://github.com/tafia/quick-xml/compare/v0.30.0...v0.31.0) --- updated-dependencies: - dependency-name: quick-xml dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- object_store/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object_store/Cargo.toml b/object_store/Cargo.toml index 7928648d170..cb820b509ad 100644 --- a/object_store/Cargo.toml +++ b/object_store/Cargo.toml @@ -46,7 +46,7 @@ walkdir = "2" # Cloud storage support base64 = { version = "0.21", default-features = false, features = ["std"], optional = true } hyper = { version = "0.14", default-features = false, optional = true } -quick-xml = { version = "0.30.0", features = ["serialize", "overlapped-lists"], optional = true } +quick-xml = { version = "0.31.0", features = ["serialize", "overlapped-lists"], optional = true } serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } serde_json = { version = "1.0", default-features = false, optional = true } rand = { version = "0.8", default-features = false, features = ["std", "std_rng"], optional = true } From 4748b6187a0215b8a04fbd53184074c1e4e9ef32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 14:50:32 +0100 Subject: [PATCH 2/4] Bump actions/setup-node from 3 to 4 (#4982) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 9871f8b7d29..1447d72a53b 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -51,7 +51,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: "14" - name: Prettier check From c90aff3cc9c7f21dc7dd77000eeea8d2ceb0412d Mon Sep 17 00:00:00 2001 From: fan <75058860+fansehep@users.noreply.github.com> Date: Wed, 25 Oct 2023 15:18:52 +0800 Subject: [PATCH 3/4] feat: support schema change by idx and reverse (#4985) * feat: support schema change by idx and reverse Signed-off-by: fan * follow reviews Signed-off-by: fan --------- Signed-off-by: fan --- arrow-schema/src/schema.rs | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arrow-schema/src/schema.rs b/arrow-schema/src/schema.rs index 43bbffd0652..b05cfbe3d95 100644 --- a/arrow-schema/src/schema.rs +++ b/arrow-schema/src/schema.rs @@ -57,6 +57,17 @@ impl SchemaBuilder { self.fields.remove(idx) } + /// Get mut FieldRef as index `idx` + /// if index out of bounds, will panic + pub fn field_mut(&mut self, idx: usize) -> &mut FieldRef { + &mut self.fields[idx] + } + + /// Reverse the fileds + pub fn reverse(&mut self) { + self.fields.reverse(); + } + /// Appends a [`FieldRef`] to this [`SchemaBuilder`] checking for collision /// /// If an existing field exists with the same name, calls [`Field::try_merge`] @@ -837,4 +848,34 @@ mod tests { "Could not find expected string '{expected}' in '{res}'" ); } + + #[test] + fn test_schemabuilder_change_field() { + let mut builder = SchemaBuilder::new(); + builder.push(Field::new("a", DataType::Int32, false)); + builder.push(Field::new("b", DataType::Utf8, false)); + *builder.field_mut(1) = Arc::new(Field::new("c", DataType::Int32, false)); + assert_eq!( + builder.fields, + vec![ + Arc::new(Field::new("a", DataType::Int32, false)), + Arc::new(Field::new("c", DataType::Int32, false)) + ] + ); + } + + #[test] + fn test_schemabuilder_reverse() { + let mut builder = SchemaBuilder::new(); + builder.push(Field::new("a", DataType::Int32, false)); + builder.push(Field::new("b", DataType::Utf8, true)); + builder.reverse(); + assert_eq!( + builder.fields, + vec![ + Arc::new(Field::new("b", DataType::Utf8, true)), + Arc::new(Field::new("a", DataType::Int32, false)) + ] + ); + } } From a33d42f59189e8f5d880f4e7a557531d2d55ddb3 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com> Date: Wed, 25 Oct 2023 11:20:46 +0100 Subject: [PATCH 4/4] Increase default timeout to 30 seconds (#4989) --- object_store/src/client/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/object_store/src/client/mod.rs b/object_store/src/client/mod.rs index 3c968f11be2..77eee7fc92f 100644 --- a/object_store/src/client/mod.rs +++ b/object_store/src/client/mod.rs @@ -193,6 +193,9 @@ impl Default for ClientOptions { // // // Which recommend a connection timeout of 3.1s and a request timeout of 2s + // + // As object store requests may involve the transfer of non-trivial volumes of data + // we opt for a slightly higher default timeout of 30 seconds Self { user_agent: None, content_type_map: Default::default(), @@ -203,7 +206,7 @@ impl Default for ClientOptions { proxy_excludes: None, allow_http: Default::default(), allow_insecure: Default::default(), - timeout: Some(Duration::from_secs(5).into()), + timeout: Some(Duration::from_secs(30).into()), connect_timeout: Some(Duration::from_secs(5).into()), pool_idle_timeout: None, pool_max_idle_per_host: None,