1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![cfg_attr(feature = "simd", feature(portable_simd))]
3#![cfg_attr(
4 feature = "allow_unused",
5 allow(unused, dead_code, irrefutable_let_patterns)
6)] #![allow(ambiguous_glob_reexports)]
8extern crate core;
9
10#[cfg(feature = "avro")]
11pub mod avro;
12#[cfg(feature = "catalog")]
13pub mod catalog;
14pub mod cloud;
15#[cfg(any(feature = "csv", feature = "json"))]
16pub mod csv;
17#[cfg(feature = "file_cache")]
18pub mod file_cache;
19#[cfg(any(feature = "ipc", feature = "ipc_streaming"))]
20pub mod ipc;
21#[cfg(feature = "json")]
22pub mod json;
23pub mod mmap;
24#[cfg(feature = "json")]
25pub mod ndjson;
26mod options;
27#[cfg(feature = "parquet")]
28pub mod parquet;
29#[cfg(feature = "parquet")]
30pub mod partition;
31pub mod path_utils;
32#[cfg(feature = "async")]
33pub mod pl_async;
34pub mod predicates;
35pub mod prelude;
36#[cfg(feature = "scan_lines")]
37pub mod scan_lines;
38mod shared;
39pub mod utils;
40
41#[cfg(feature = "cloud")]
42pub use cloud::glob as async_glob;
43pub use options::*;
44pub use path_utils::*;
45pub use shared::*;
46
47pub mod hive;
48
49pub fn get_upload_chunk_size() -> usize {
50 use std::sync::LazyLock;
51
52 return *UPLOAD_CHUNK_SIZE;
53
54 static UPLOAD_CHUNK_SIZE: LazyLock<usize> = LazyLock::new(|| {
55 let v = std::env::var("POLARS_UPLOAD_CHUNK_SIZE")
56 .map(|x| {
57 x.parse::<usize>()
58 .ok()
59 .filter(|x| *x > 0)
60 .unwrap_or_else(|| panic!("invalid value for POLARS_UPLOAD_CHUNK_SIZE: {x}"))
61 })
62 .unwrap_or(64 * 1024 * 1024);
63
64 if polars_core::config::verbose() {
65 eprintln!("async upload_chunk_size: {v}")
66 }
67
68 v
69 });
70}