Skip to content

Commit

Permalink
build(dep): upgrade rustc, arrow, and tarpaulin setting (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiyan authored Jan 30, 2025
1 parent cae9c47 commit ed1dbab
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
os: [ ubuntu-22.04 ]
runs-on: ${{ matrix.os }}
container:
image: xd009642/tarpaulin:0.30.0
image: xd009642/tarpaulin:0.31.5
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
cache: pip
cache-dependency-path: pyproject.toml

Expand Down
28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resolver = "2"
version = "0.3.0"
edition = "2021"
license = "Apache-2.0"
rust-version = "1.79"
rust-version = "1.81"
keywords = ["apachehudi", "hudi", "datalake", "arrow"]
readme = "README.md"
description = "A native Rust library for Apache Hudi"
Expand All @@ -35,19 +35,19 @@ repository = "https://github.com/apache/hudi-rs"

[workspace.dependencies]
# arrow
arrow = { version = "= 53.3.0", features = ["pyarrow"] }
arrow-arith = { version = "= 53.3.0" }
arrow-array = { version = "= 53.3.0" }
arrow-buffer = { version = "= 53.3.0" }
arrow-cast = { version = "= 53.3.0" }
arrow-ipc = { version = "= 53.3.0" }
arrow-json = { version = "= 53.3.0" }
arrow-ord = { version = "= 53.3.0" }
arrow-row = { version = "= 53.3.0" }
arrow-schema = { version = "= 53.3.0", features = ["serde"] }
arrow-select = { version = "= 53.3.0" }
arrow = { version = "= 53.4.0", features = ["pyarrow"] }
arrow-arith = { version = "= 53.4.0" }
arrow-array = { version = "= 53.4.0" }
arrow-buffer = { version = "= 53.4.0" }
arrow-cast = { version = "= 53.4.0" }
arrow-ipc = { version = "= 53.4.0" }
arrow-json = { version = "= 53.4.0" }
arrow-ord = { version = "= 53.4.0" }
arrow-row = { version = "= 53.4.0" }
arrow-schema = { version = "= 53.4.0", features = ["serde"] }
arrow-select = { version = "= 53.4.0" }
object_store = { version = "= 0.11.2", features = ["aws", "azure", "gcp"] }
parquet = { version = "= 53.3.0", features = ["async", "object_store"] }
parquet = { version = "= 53.4.0", features = ["async", "object_store"] }

# datafusion
datafusion = { version = "= 43.0.0" }
Expand All @@ -61,7 +61,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }

# "stdlib"
thiserror = { version = "2.0.10" }
thiserror = { version = "2.0.11" }
bytes = { version = "1" }
chrono = { version = "0.4" }
lazy_static = { version = "1.5.0" }
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
//! }
//! ```
//! 4. get file slice
//! Users can obtain metadata to customize reading methods, read in batches, perform parallel reads, and more.
//! Users can obtain metadata to customize reading methods, read in batches, perform parallel reads, and more.
//! ```rust
//! use url::Url;
//! use hudi_core::table::Table;
Expand Down
2 changes: 1 addition & 1 deletion demo/infra/runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

FROM rust:1.79
FROM rust:1.81

RUN apt-get update && apt-get install -y python3-dev python3-venv

Expand Down
2 changes: 1 addition & 1 deletion demo/table-api-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ edition = "2021"

[dependencies]
tokio = "^1"
arrow = { version = "= 53.3.0", features = ["pyarrow"] }
arrow = { version = "= 53.4.0", features = ["pyarrow"] }

hudi = { path = "../../crates/hudi" }
3 changes: 3 additions & 0 deletions python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ tokio = { workspace = true }
[dependencies.pyo3]
version = "0.22.6"
features = ["extension-module", "abi3", "abi3-py39"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
18 changes: 9 additions & 9 deletions python/src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ impl From<PythonError> for PyErr {
}
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
#[derive(Clone, Debug)]
#[pyclass]
pub struct HudiFileGroupReader {
inner: FileGroupReader,
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
#[pymethods]
impl HudiFileGroupReader {
#[new]
Expand Down Expand Up @@ -113,7 +113,7 @@ impl HudiFileGroupReader {
}
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
#[derive(Clone, Debug)]
#[pyclass]
pub struct HudiFileSlice {
Expand All @@ -135,7 +135,7 @@ pub struct HudiFileSlice {
num_records: i64,
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
#[pymethods]
impl HudiFileSlice {
fn base_file_relative_path(&self) -> PyResult<String> {
Expand Down Expand Up @@ -174,7 +174,7 @@ impl HudiFileSlice {
}
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
impl From<&FileSlice> for HudiFileSlice {
fn from(f: &FileSlice) -> Self {
let file_id = f.file_id().to_string();
Expand All @@ -199,13 +199,13 @@ impl From<&FileSlice> for HudiFileSlice {
}
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
#[pyclass]
pub struct HudiTable {
inner: Table,
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
#[pymethods]
impl HudiTable {
#[new]
Expand Down Expand Up @@ -399,7 +399,7 @@ impl HudiTable {
}
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
#[pyfunction]
#[pyo3(signature = (base_uri, hudi_options=None, storage_options=None, options=None))]
pub fn build_hudi_table(
Expand All @@ -420,7 +420,7 @@ pub fn build_hudi_table(
Ok(HudiTable { inner })
}

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
fn rt() -> &'static Runtime {
static TOKIO_RT: OnceLock<Runtime> = OnceLock::new();
TOKIO_RT.get_or_init(|| Runtime::new().expect("Failed to create a tokio runtime."))
Expand Down
2 changes: 1 addition & 1 deletion python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use pyo3::prelude::*;

mod internal;

#[cfg(not(tarpaulin))]
#[cfg(not(tarpaulin_include))]
#[pymodule]
fn _internal(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add("__version__", env!("CARGO_PKG_VERSION"))?;
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
# under the License.

[toolchain]
channel = "1.79"
channel = "1.81"
components = ["rustfmt", "clippy"]
profile = "minimal"

0 comments on commit ed1dbab

Please sign in to comment.