Skip to content

Commit 64f80a8

Browse files
authored
feat(rust): run cloud parquet reader in default engine (pola-rs#11196)
1 parent 7d38fa3 commit 64f80a8

File tree

38 files changed

+167
-108
lines changed

38 files changed

+167
-108
lines changed

.github/workflows/lint-rust.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ jobs:
3838
save-if: ${{ github.ref_name == 'main' }}
3939

4040
- name: Run cargo clippy with all features enabled
41-
# not all features can combine with each other for nano-arrow
42-
run: cargo clippy --workspace --all-targets --exclude nano-arrow --all-features -- -D warnings
41+
run: cargo clippy -p polars --all-features -- -D warnings
4342

4443
# Default feature set should compile on the stable toolchain
4544
clippy-stable:
@@ -59,7 +58,7 @@ jobs:
5958
save-if: ${{ github.ref_name == 'main' }}
6059

6160
- name: Run cargo clippy
62-
run: cargo clippy --workspace --all-targets --exclude nano-arrow -- -D warnings
61+
run: cargo clippy -p polars -- -D warnings
6362

6463
rustfmt:
6564
if: github.ref_name != 'main'

crates/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ check: ## Run cargo check with all features
1414

1515
.PHONY: clippy
1616
clippy: ## Run clippy with all features
17-
cargo clippy --workspace --all-targets --exclude nano-arrow --all-features
17+
cargo clippy -p polars --all-features
1818

1919
.PHONY: clippy-default
2020
clippy-default: ## Run clippy with default features
21-
cargo clippy --workspace --all-targets
21+
cargo clippy -p polars
2222

2323
.PHONY: pre-commit
2424
pre-commit: fmt clippy clippy-default ## Run autoformatting and linting

crates/nano-arrow/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ authors = ["Jorge C. Leitao <[email protected]>", "Apache Arrow <dev@arro
55
edition.workspace = true
66
homepage.workspace = true
77
licence = "Apache 2.0 and MIT"
8-
license.workspace = true
98
repository.workspace = true
109
description = "Minimal implementation of the Arrow specification forked from arrow2."
1110

crates/nano-arrow/src/array/dictionary/typed_iterator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ impl<O: Offset> DictValue for Utf8Array<O> {
3333
array
3434
.as_any()
3535
.downcast_ref::<Self>()
36-
.ok_or(Error::InvalidArgumentError(
37-
"could not convert array to dictionary value".into(),
38-
))
36+
.ok_or_else(|| {
37+
Error::InvalidArgumentError("could not convert array to dictionary value".into())
38+
})
3939
.map(|arr| {
4040
assert_eq!(
4141
arr.null_count(),

crates/polars-core/Cargo.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ indexmap = { workspace = true }
2626
itoap = { version = "1", optional = true, features = ["simd"] }
2727
ndarray = { version = "0.15", optional = true, default_features = false }
2828
num-traits = { workspace = true }
29-
object_store = { workspace = true, optional = true }
3029
once_cell = { workspace = true }
3130
rand = { workspace = true, optional = true, features = ["small_rng", "std"] }
3231
rand_distr = { version = "0.4", optional = true }
@@ -37,7 +36,6 @@ serde = { workspace = true, features = ["derive"], optional = true }
3736
serde_json = { workspace = true, optional = true }
3837
smartstring = { workspace = true }
3938
thiserror = { workspace = true }
40-
url = { workspace = true, optional = true }
4139
xxhash-rust = { workspace = true }
4240

4341
[dev-dependencies]
@@ -182,12 +180,6 @@ docs-selection = [
182180
"algorithm_group_by",
183181
]
184182

185-
# Cloud support.
186-
"async" = ["url", "object_store"]
187-
"aws" = ["async", "object_store/aws"]
188-
"azure" = ["async", "object_store/azure"]
189-
"gcp" = ["async", "object_store/gcp"]
190-
191183
[package.metadata.docs.rs]
192184
# not all because arrow 4.3 does not compile with simd
193185
# all-features = true

crates/polars-core/src/chunked_array/from.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::*;
22

3-
#[allow(clippy::ptr_arg)]
3+
#[allow(clippy::all)]
44
fn from_chunks_list_dtype(chunks: &mut Vec<ArrayRef>, dtype: DataType) -> DataType {
55
// ensure we don't get List<null>
66
let dtype = if let Some(arr) = chunks.get(0) {

crates/polars-core/src/chunked_array/ops/bit_repr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn reinterpret_chunked_array<T: PolarsNumericType, U: PolarsNumericType>(
2424

2525
/// Reinterprets the type of a [`ListChunked`]. T and U must have the same size
2626
/// and alignment.
27+
#[cfg(feature = "reinterpret")]
2728
fn reinterpret_list_chunked<T: PolarsNumericType, U: PolarsNumericType>(
2829
ca: &ListChunked,
2930
) -> ListChunked {

crates/polars-core/src/datatypes/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,3 @@ impl NumericNative for f32 {
270270
impl NumericNative for f64 {
271271
type PolarsType = Float64Type;
272272
}
273-
274-
// Provide options to cloud providers (credentials, region).
275-
pub type CloudOptions = PlHashMap<String, String>;

crates/polars-core/src/frame/asof_join/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use num_traits::Bounded;
88
use serde::{Deserialize, Serialize};
99
use smartstring::alias::String as SmartString;
1010

11+
use crate::frame::hash_join::_finish_join;
1112
use crate::prelude::*;
1213
use crate::utils::{ensure_sorted_arg, slice_slice};
1314

crates/polars-core/src/frame/cross_join.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use smartstring::alias::String as SmartString;
22

3+
use crate::frame::hash_join::_finish_join;
34
use crate::prelude::*;
45
use crate::series::IsSorted;
56
use crate::utils::{concat_df_unchecked, slice_offsets, CustomIterTools, NoNull};

0 commit comments

Comments
 (0)