Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(rust): improve json_extract #8858

Merged
merged 7 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ members = [
"polars/polars-sql",
"polars/polars-error",
"polars/polars-row",
"polars/polars-json",
"examples/read_csv",
"examples/read_parquet",
"examples/read_parquet_cloud",
Expand Down Expand Up @@ -44,7 +45,7 @@ package = "arrow2"
git = "https://github.com/ritchie46/arrow2"
# rev = "1491c6e8f4fd100f53c358e4f3ef1536d9e75090"
# path = "../arrow2"
branch = "polars_2023-05-09"
branch = "polars_2023-05-16"
version = "0.17"
default-features = false
features = [
Expand Down
6 changes: 4 additions & 2 deletions polars/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ check:
-p polars-time \
-p polars-error \
-p polars-ops \
-p polars-sql
-p polars-sql \
-p polars-json

clippy:
cargo clippy --all-features \
Expand All @@ -34,7 +35,8 @@ clippy:
-p polars-error \
-p polars-row \
-p polars-time \
-p polars-sql
-p polars-sql \
-p polars-json

clippy-default:
cargo clippy
Expand Down
6 changes: 0 additions & 6 deletions polars/polars-core/src/datatypes/aliases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,11 @@ pub type IdxType = UInt32Type;
#[cfg(feature = "bigidx")]
pub type IdxType = UInt64Type;

#[cfg(feature = "private")]
pub type PlHashMap<K, V> = hashbrown::HashMap<K, V, RandomState>;
#[cfg(feature = "private")]

/// This hashmap has the uses an IdHasher
pub type PlIdHashMap<K, V> = hashbrown::HashMap<K, V, IdBuildHasher>;
#[cfg(feature = "private")]
pub type PlHashSet<V> = hashbrown::HashSet<V, RandomState>;
#[cfg(feature = "private")]
pub type PlIndexMap<K, V> = indexmap::IndexMap<K, V, RandomState>;
#[cfg(feature = "private")]
pub type PlIndexSet<K> = indexmap::IndexSet<K, RandomState>;

pub trait InitHashMaps {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion polars/polars-io/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub mod ipc;
#[cfg(feature = "json")]
pub mod json;
#[cfg(feature = "json")]
pub mod ndjson_core;
pub mod ndjson;
#[cfg(feature = "cloud")]
pub use crate::cloud::glob as async_glob;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use rayon::prelude::*;

use crate::csv::utils::*;
use crate::mmap::{MmapBytesReader, ReaderBytes};
use crate::ndjson_core::buffer::*;
use crate::ndjson::buffer::*;
use crate::prelude::*;
const NEWLINE: u8 = b'\n';
const RETURN: u8 = b'\r';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub(crate) mod buffer;
pub mod ndjson;
pub mod core;
2 changes: 1 addition & 1 deletion polars/polars-io/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub use crate::ipc::*;
#[cfg(feature = "json")]
pub use crate::json::*;
#[cfg(feature = "json")]
pub use crate::ndjson_core::ndjson::*;
pub use crate::ndjson::core::*;
#[cfg(feature = "parquet")]
pub use crate::parquet::*;
pub use crate::utils::*;
Expand Down
16 changes: 16 additions & 0 deletions polars/polars-json/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "polars-json"
version = "0.29.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ahash.workspace = true
arrow.workspace = true
hashbrown.workspace = true
num-traits.workspace = true
polars-arrow = { version = "0.29.0", path = "../polars-arrow", default-features = false }
polars-error = { version = "0.29.0", path = "../polars-error" }
polars-utils = { version = "0.29.0", path = "../polars-utils" }
simd-json = { version = "0.9", features = ["allow-non-simd", "known-key"] }
Loading