This is an automated email from the ASF dual-hosted git repository.
jiayuliu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new f4fdc9c 2018 -> 2021 (#591)
f4fdc9c is described below
commit f4fdc9cfde4f5d3746cb3f57bb4fb3d18a987187
Author: Jiayu Liu <[email protected]>
AuthorDate: Mon Nov 1 09:13:45 2021 +0800
2018 -> 2021 (#591)
---
.github/workflows/rust.yml | 2 ++
arrow-flight/Cargo.toml | 3 ++-
arrow-pyarrow-integration-testing/Cargo.toml | 3 ++-
arrow/Cargo.toml | 3 ++-
arrow/src/array/transform/mod.rs | 2 --
arrow/test/dependency/default-features/Cargo.toml | 3 ++-
arrow/test/dependency/no-default-features/Cargo.toml | 3 ++-
arrow/test/dependency/simd/Cargo.toml | 3 ++-
integration-testing/Cargo.toml | 3 ++-
parquet/Cargo.toml | 3 ++-
parquet_derive/Cargo.toml | 3 ++-
parquet_derive/README.md | 14 +++++++++++---
parquet_derive/src/lib.rs | 4 ++--
parquet_derive/test/dependency/default-features/Cargo.toml | 3 ++-
parquet_derive_test/Cargo.toml | 5 +++--
rustfmt.toml | 3 ++-
16 files changed, 40 insertions(+), 20 deletions(-)
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 20392ef..86fef7e 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -287,6 +287,8 @@ jobs:
export ARROW_TEST_DATA=$(pwd)/testing/data
export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
+ rustup toolchain install stable
+ rustup default stable
cargo install --version 0.18.2 cargo-tarpaulin
cargo tarpaulin --all --out Xml
- name: Report coverage
diff --git a/arrow-flight/Cargo.toml b/arrow-flight/Cargo.toml
index 4b50f4e..856ea3b 100644
--- a/arrow-flight/Cargo.toml
+++ b/arrow-flight/Cargo.toml
@@ -19,7 +19,8 @@
name = "arrow-flight"
description = "Apache Arrow Flight"
version = "7.0.0-SNAPSHOT"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
authors = ["Apache Arrow <[email protected]>"]
homepage = "https://github.com/apache/arrow-rs"
repository = "https://github.com/apache/arrow-rs"
diff --git a/arrow-pyarrow-integration-testing/Cargo.toml
b/arrow-pyarrow-integration-testing/Cargo.toml
index c0c20f6..afb38f2 100644
--- a/arrow-pyarrow-integration-testing/Cargo.toml
+++ b/arrow-pyarrow-integration-testing/Cargo.toml
@@ -24,7 +24,8 @@ repository = "https://github.com/apache/arrow-rs"
authors = ["Apache Arrow <[email protected]>"]
license = "Apache-2.0"
keywords = [ "arrow" ]
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[lib]
name = "arrow_pyarrow_integration_testing"
diff --git a/arrow/Cargo.toml b/arrow/Cargo.toml
index 8862321..c88826f 100644
--- a/arrow/Cargo.toml
+++ b/arrow/Cargo.toml
@@ -29,7 +29,8 @@ include = [
"src/**/*.rs",
"Cargo.toml",
]
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[lib]
name = "arrow"
diff --git a/arrow/src/array/transform/mod.rs b/arrow/src/array/transform/mod.rs
index a598f0d..2c18848 100644
--- a/arrow/src/array/transform/mod.rs
+++ b/arrow/src/array/transform/mod.rs
@@ -182,8 +182,6 @@ fn build_extend_dictionary(
max: usize,
) -> Option<Extend> {
use crate::datatypes::*;
- use std::convert::TryInto;
-
match array.data_type() {
DataType::Dictionary(child_data_type, _) => match
child_data_type.as_ref() {
DataType::UInt8 => {
diff --git a/arrow/test/dependency/default-features/Cargo.toml
b/arrow/test/dependency/default-features/Cargo.toml
index 425a891..127fe21 100644
--- a/arrow/test/dependency/default-features/Cargo.toml
+++ b/arrow/test/dependency/default-features/Cargo.toml
@@ -19,7 +19,8 @@
name = "defeault-features"
description = "Models a user application of arrow that uses default features
of arrow"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
# See more keys and their definitions at
https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/arrow/test/dependency/no-default-features/Cargo.toml
b/arrow/test/dependency/no-default-features/Cargo.toml
index 6c7f065..6c12a9c 100644
--- a/arrow/test/dependency/no-default-features/Cargo.toml
+++ b/arrow/test/dependency/no-default-features/Cargo.toml
@@ -19,7 +19,8 @@
name = "no-default-features"
description = "Models a user application of arrow that specifies
no-default-features=true"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
# See more keys and their definitions at
https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/arrow/test/dependency/simd/Cargo.toml
b/arrow/test/dependency/simd/Cargo.toml
index 22d411a..8898548 100644
--- a/arrow/test/dependency/simd/Cargo.toml
+++ b/arrow/test/dependency/simd/Cargo.toml
@@ -19,7 +19,8 @@
name = "defeault-features"
description = "Models a user application of arrow that uses the simd feature
of arrow"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
# See more keys and their definitions at
https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/integration-testing/Cargo.toml b/integration-testing/Cargo.toml
index 7ee23a9..98a4ed6 100644
--- a/integration-testing/Cargo.toml
+++ b/integration-testing/Cargo.toml
@@ -23,8 +23,9 @@ homepage = "https://github.com/apache/arrow-rs"
repository = "https://github.com/apache/arrow-rs"
authors = ["Apache Arrow <[email protected]>"]
license = "Apache-2.0"
-edition = "2018"
+edition = "2021"
publish = false
+rust-version = "1.56"
[features]
logging = ["tracing-subscriber"]
diff --git a/parquet/Cargo.toml b/parquet/Cargo.toml
index 289513f..664f74b 100644
--- a/parquet/Cargo.toml
+++ b/parquet/Cargo.toml
@@ -26,7 +26,8 @@ authors = ["Apache Arrow <[email protected]>"]
keywords = [ "arrow", "parquet", "hadoop" ]
readme = "README.md"
build = "build.rs"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[dependencies]
# update note: pin `parquet-format` to specific version until it does not
break at minor
diff --git a/parquet_derive/Cargo.toml b/parquet_derive/Cargo.toml
index 31ccba4..ac8d497 100644
--- a/parquet_derive/Cargo.toml
+++ b/parquet_derive/Cargo.toml
@@ -25,7 +25,8 @@ repository = "https://github.com/apache/arrow-rs"
authors = ["Apache Arrow <[email protected]>"]
keywords = [ "parquet" ]
readme = "README.md"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
[lib]
proc-macro = true
diff --git a/parquet_derive/README.md b/parquet_derive/README.md
index d0804db..437b1ce 100644
--- a/parquet_derive/README.md
+++ b/parquet_derive/README.md
@@ -27,7 +27,9 @@ supported.
Derive also has some support for the chrono time library. You must must enable
the `chrono` feature to get this support.
## Usage
+
Add this to your Cargo.toml:
+
```toml
[dependencies]
parquet = "7.0.0-SNAPSHOT"
@@ -35,6 +37,7 @@ parquet_derive = "7.0.0-SNAPSHOT"
```
and this to your crate root:
+
```rust
extern crate parquet;
#[macro_use] extern crate parquet_derive;
@@ -75,24 +78,29 @@ writer.close().unwrap();
```
## Features
-- [X] Support writing `String`, `&str`, `bool`, `i32`, `f32`, `f64`, `Vec<u8>`
+
+- [x] Support writing `String`, `&str`, `bool`, `i32`, `f32`, `f64`, `Vec<u8>`
- [ ] Support writing dictionaries
-- [X] Support writing logical types like timestamp
-- [X] Derive definition_levels for `Option`
+- [x] Support writing logical types like timestamp
+- [x] Derive definition_levels for `Option`
- [ ] Derive definition levels for nested structures
- [ ] Derive writing tuple struct
- [ ] Derive writing `tuple` container types
## Requirements
+
- Same as `parquet-rs`
## Test
+
Testing a `*_derive` crate requires an intermediate crate. Go to
`parquet_derive_test` and run `cargo test` for
unit tests.
## Docs
+
To build documentation, run `cargo doc --no-deps`.
To compile and view in the browser, run `cargo doc --no-deps --open`.
## License
+
Licensed under the Apache License, Version 2.0:
http://www.apache.org/licenses/LICENSE-2.0.
diff --git a/parquet_derive/src/lib.rs b/parquet_derive/src/lib.rs
index 6d75150..0578720 100644
--- a/parquet_derive/src/lib.rs
+++ b/parquet_derive/src/lib.rs
@@ -25,7 +25,7 @@ extern crate quote;
extern crate parquet;
-use syn::{parse_macro_input, Data, DataStruct, DeriveInput};
+use ::syn::{parse_macro_input, Data, DataStruct, DeriveInput};
mod parquet_field;
@@ -103,7 +103,7 @@ pub fn parquet_record_writer(input:
proc_macro::TokenStream) -> proc_macro::Toke
impl #generics RecordWriter<#derived_for #generics> for &[#derived_for
#generics] {
fn write_to_row_group(
&self,
- row_group_writer: &mut Box<parquet::file::writer::RowGroupWriter>
+ row_group_writer: &mut Box<dyn parquet::file::writer::RowGroupWriter>
) -> Result<(), parquet::errors::ParquetError> {
let mut row_group_writer = row_group_writer;
let records = &self; // Used by all the writer snippets to be more
clear
diff --git a/parquet_derive/test/dependency/default-features/Cargo.toml
b/parquet_derive/test/dependency/default-features/Cargo.toml
index 2a98dd4..48d86d9 100644
--- a/parquet_derive/test/dependency/default-features/Cargo.toml
+++ b/parquet_derive/test/dependency/default-features/Cargo.toml
@@ -19,7 +19,8 @@
name = "defeault-features"
description = "Models a user application of parquet_derive that uses no
additional features of arrow"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
# See more keys and their definitions at
https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/parquet_derive_test/Cargo.toml b/parquet_derive_test/Cargo.toml
index f48530b..af3f586 100644
--- a/parquet_derive_test/Cargo.toml
+++ b/parquet_derive_test/Cargo.toml
@@ -24,10 +24,11 @@ homepage = "https://github.com/apache/arrow-rs"
repository = "https://github.com/apache/arrow-rs"
authors = ["Apache Arrow <[email protected]>"]
keywords = [ "parquet" ]
-edition = "2018"
+edition = "2021"
publish = false
+rust-version = "1.56"
[dependencies]
parquet = { path = "../parquet", version = "7.0.0-SNAPSHOT" }
parquet_derive = { path = "../parquet_derive", version = "7.0.0-SNAPSHOT" }
-chrono = "0.4.19"
\ No newline at end of file
+chrono = "0.4.19"
diff --git a/rustfmt.toml b/rustfmt.toml
index c49cccd..5c27f46 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -15,7 +15,8 @@
# specific language governing permissions and limitations
# under the License.
-edition = "2018"
+edition = "2021"
+rust-version = "1.56"
max_width = 90
# ignore generated files