From 70c325541bf0cbf56f9a334fe78f23ae7fe2e4dd Mon Sep 17 00:00:00 2001 From: Steve Russo <64294847+sjrusso8@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:15:34 -0400 Subject: [PATCH] revert(tonic): move tonic back to 0.11 (#76) --- Cargo.lock | 214 +++++++++++++++++++++---------------- Cargo.toml | 6 +- core/Cargo.toml | 2 +- core/src/readwriter.rs | 111 ++++++------------- examples/src/databricks.rs | 2 +- 5 files changed, 162 insertions(+), 173 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3cc662d..d9ae092 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -338,12 +338,6 @@ version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ae037714f313c1353189ead58ef9eec30a8e8dc101b2622d461418fd59e28a9" -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - [[package]] name = "autocfg" version = "1.1.0" @@ -352,17 +346,18 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.7.5" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", + "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "http-body-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper", "itoa", "matchit", "memchr", @@ -379,20 +374,17 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.4" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6b8ba012a258d63c9adfa28b9ddcf66149da6f986c5b5452e629d5ee64bf00" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", - "http-body-util", + "http 0.2.12", + "http-body 0.4.6", "mime", - "pin-project-lite", "rustversion", - "sync_wrapper", "tower-layer", "tower-service", ] @@ -696,7 +688,7 @@ dependencies = [ "half", "hashbrown 0.14.5", "indexmap 2.0.0", - "itertools", + "itertools 0.13.0", "log", "num_cpus", "object_store", @@ -828,7 +820,7 @@ dependencies = [ "datafusion-expr", "hashbrown 0.14.5", "hex", - "itertools", + "itertools 0.13.0", "log", "rand", "regex", @@ -897,7 +889,7 @@ dependencies = [ "datafusion-physical-expr", "hashbrown 0.14.5", "indexmap 2.0.0", - "itertools", + "itertools 0.13.0", "log", "paste", "regex-syntax 0.8.2", @@ -928,7 +920,7 @@ dependencies = [ "hashbrown 0.14.5", "hex", "indexmap 2.0.0", - "itertools", + "itertools 0.13.0", "log", "paste", "petgraph", @@ -960,7 +952,7 @@ dependencies = [ "datafusion-execution", "datafusion-physical-expr", "datafusion-physical-plan", - "itertools", + "itertools 0.13.0", ] [[package]] @@ -989,7 +981,7 @@ dependencies = [ "half", "hashbrown 0.14.5", "indexmap 2.0.0", - "itertools", + "itertools 0.13.0", "log", "once_cell", "parking_lot", @@ -1233,16 +1225,16 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.4.6" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ - "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http", + "futures-util", + "http 0.2.12", "indexmap 2.0.0", "slab", "tokio", @@ -1297,6 +1289,17 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http" version = "1.1.0" @@ -1308,6 +1311,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" version = "1.0.1" @@ -1315,7 +1329,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http", + "http 1.1.0", ] [[package]] @@ -1326,8 +1340,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http", - "http-body", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -1351,55 +1365,38 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.1" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", + "futures-core", "futures-util", "h2", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "smallvec", + "socket2", "tokio", + "tower-service", + "tracing", "want", ] [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ "hyper", - "hyper-util", "pin-project-lite", "tokio", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", + "tokio-io-timeout", ] [[package]] @@ -1468,6 +1465,15 @@ dependencies = [ "web-sys", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -1788,7 +1794,7 @@ dependencies = [ "chrono", "futures", "humantime", - "itertools", + "itertools 0.13.0", "parking_lot", "percent-encoding", "snafu", @@ -2157,9 +2163,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", @@ -2167,13 +2173,13 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" +checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" dependencies = [ "bytes", "heck", - "itertools", + "itertools 0.12.1", "log", "multimap", "once_cell", @@ -2188,12 +2194,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools", + "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.57", @@ -2201,9 +2207,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ "prost", ] @@ -2383,12 +2389,11 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.7" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", - "once_cell", "ring", "rustls-pki-types", "rustls-webpki", @@ -2607,7 +2612,7 @@ dependencies = [ "rand", "serde_json", "tokio", - "tonic", + "tonic 0.11.0", "tonic-build", "tonic-web-wasm-client", "url", @@ -2741,9 +2746,9 @@ dependencies = [ [[package]] name = "sync_wrapper" -version = "1.0.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "target-features" @@ -2824,6 +2829,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.4.0" @@ -2837,9 +2852,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ "rustls", "rustls-pki-types", @@ -2873,28 +2888,26 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.22.0", + "base64 0.21.7", "bytes", "h2", - "http", - "http-body", - "http-body-util", + "http 0.2.12", + "http-body 0.4.6", "hyper", "hyper-timeout", - "hyper-util", "percent-encoding", "pin-project", "prost", "rustls-native-certs", "rustls-pemfile", - "socket2", + "rustls-pki-types", "tokio", "tokio-rustls", "tokio-stream", @@ -2905,10 +2918,29 @@ dependencies = [ ] [[package]] -name = "tonic-build" +name = "tonic" version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4ee8877250136bd7e3d2331632810a4df4ea5e004656990d8d66d2f5ee8a67" +checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" +dependencies = [ + "base64 0.22.0", + "bytes", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "percent-encoding", + "pin-project", + "tokio-stream", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" dependencies = [ "prettyplease", "proc-macro2", @@ -2927,14 +2959,14 @@ dependencies = [ "byteorder", "bytes", "futures-util", - "http", - "http-body", + "http 1.1.0", + "http-body 1.0.1", "http-body-util", "httparse", "js-sys", "pin-project", "thiserror", - "tonic", + "tonic 0.12.2", "tower-service", "wasm-bindgen", "wasm-bindgen-futures", diff --git a/Cargo.toml b/Cargo.toml index 67f8c4e..1446394 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ repository = "https://github.com/sjrusso8/spark-connect-rs" rust-version = "1.81" [workspace.dependencies] -tonic = { version ="0.12", default-features = false } +tonic = { version ="0.11", default-features = false } tonic-web-wasm-client = { version = "0.6" } tokio = { version = "1.40", default-features = false, features = ["macros"] } @@ -25,8 +25,8 @@ arrow-ipc = { version = "53" } serde_json = { version = "1" } -prost = { version = "0.13" } -prost-types = { version = "0.13" } +prost = { version = "0.12" } +prost-types = { version = "0.12" } rand = { version = "0.8" } uuid = { version = "1.8", features = ["v4"] } diff --git a/core/Cargo.toml b/core/Cargo.toml index ead80e6..5e08984 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -49,7 +49,7 @@ futures = "0.3" tokio = { workspace = true, features = ["rt-multi-thread"] } [build-dependencies] -tonic-build = "0.12" +tonic-build = "0.11" [lib] doctest = false diff --git a/core/src/readwriter.rs b/core/src/readwriter.rs index 8542aa1..2d18677 100644 --- a/core/src/readwriter.rs +++ b/core/src/readwriter.rs @@ -86,8 +86,8 @@ pub struct CommonFileOptions { pub ignore_missing_files: Option, } -impl CommonFileOptions { - pub fn new() -> Self { +impl Default for CommonFileOptions { + fn default() -> Self { Self { path_glob_filter: None, recursive_file_lookup: Some(false), @@ -183,7 +183,7 @@ impl ConfigOpts for CommonFileOptions { /// - `line_sep`: Line separator character in the CSV file. /// - `unescaped_quote_handling`: How to handle unescaped quotes in quoted fields. Options are "STOP_AT_CLOSING_QUOTE" and "BACK_TO_DELIMITER". /// - `common` - Common file options that are shared across multiple file formats. -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct CsvOptions { pub schema: Option, pub sep: Option, @@ -224,47 +224,6 @@ pub struct CsvOptions { } impl CsvOptions { - pub fn new() -> Self { - Self { - schema: None, - sep: None, - delimiter: None, - encoding: None, - quote: None, - quote_all: None, - escape: None, - comment: None, - header: None, - infer_schema: None, - ignore_leading_white_space: None, - ignore_trailing_white_space: None, - null_value: None, - nan_value: None, - positive_inf: None, - negative_inf: None, - date_format: None, - timestamp_format: None, - timestamp_ntz_format: None, - enable_datetime_parsing_fallback: None, - max_columns: None, - max_chars_per_column: None, - max_malformed_log_per_partition: None, - mode: None, - column_name_of_corrupt_record: None, - multi_line: None, - char_to_escape_quote_escaping: None, - sampling_ratio: None, - prefer_date: None, - enforce_schema: None, - empty_value: None, - locale: None, - line_sep: None, - unescaped_quote_handling: None, - escape_quotes: None, - common: CommonFileOptions::new(), - } - } - pub fn schema(mut self, value: &str) -> Self { self.schema = Some(value.to_string()); self @@ -696,8 +655,8 @@ pub struct JsonOptions { pub common: CommonFileOptions, } -impl JsonOptions { - pub fn new() -> Self { +impl Default for JsonOptions { + fn default() -> Self { Self { schema: None, compression: Some("gzip".to_string()), @@ -724,10 +683,12 @@ impl JsonOptions { timestamp_ntz_format: None, enable_datetime_parsing_fallback: None, ignore_null_fields: None, - common: CommonFileOptions::new(), + common: CommonFileOptions::default(), } } +} +impl JsonOptions { pub fn schema(mut self, value: &str) -> Self { self.schema = Some(value.to_string()); self @@ -1026,15 +987,17 @@ pub struct OrcOptions { pub common: CommonFileOptions, } -impl OrcOptions { - pub fn new() -> Self { +impl Default for OrcOptions { + fn default() -> Self { OrcOptions { compression: Some("snappy".to_string()), merge_schema: None, - common: CommonFileOptions::new(), + common: CommonFileOptions::default(), } } +} +impl OrcOptions { pub fn compression(mut self, value: &str) -> Self { self.compression = Some(value.to_string()); self @@ -1091,17 +1054,19 @@ pub struct ParquetOptions { pub common: CommonFileOptions, } -impl ParquetOptions { - pub fn new() -> Self { +impl Default for ParquetOptions { + fn default() -> Self { Self { compression: Some("snappy".to_string()), merge_schema: None, datetime_rebase_mode: None, int96_rebase_mode: None, - common: CommonFileOptions::new(), + common: CommonFileOptions::default(), } } +} +impl ParquetOptions { pub fn compression(mut self, value: &str) -> Self { self.compression = Some(value.to_string()); self @@ -1169,7 +1134,7 @@ impl ConfigOpts for ParquetOptions { /// /// let df = spark.read().text(["/path/to/text"], options)?; /// ``` -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct TextOptions { pub whole_text: Option, pub line_sep: Option, @@ -1177,14 +1142,6 @@ pub struct TextOptions { } impl TextOptions { - pub fn new() -> Self { - Self { - whole_text: None, - line_sep: None, - common: CommonFileOptions::new(), - } - } - pub fn whole_text(mut self, value: bool) -> Self { self.whole_text = Some(value); self @@ -1753,7 +1710,7 @@ mod tests { let path = ["/opt/spark/work-dir/datasets/people.csv"]; - let mut opts = CsvOptions::new(); + let mut opts = CsvOptions::default(); opts.header = Some(true); opts.null_value = Some("NULL".to_string()); @@ -1783,7 +1740,7 @@ mod tests { let path = ["/opt/spark/work-dir/datasets/employees.json"]; - let mut opts = JsonOptions::new(); + let mut opts = JsonOptions::default(); opts.schema = Some("name STRING, salary INT".to_string()); opts.multi_line = Some(false); @@ -1807,7 +1764,7 @@ mod tests { let path = ["/opt/spark/work-dir/datasets/users.orc"]; - let mut opts = OrcOptions::new(); + let mut opts = OrcOptions::default(); opts.compression = Some("snappy".to_string()); opts.merge_schema = Some(true); @@ -1828,7 +1785,7 @@ mod tests { let path = ["/opt/spark/work-dir/datasets/users.parquet"]; - let mut opts = ParquetOptions::new(); + let mut opts = ParquetOptions::default(); opts.compression = Some("snappy".to_string()); opts.common.path_glob_filter = Some("*.parquet".to_string()); @@ -1848,7 +1805,7 @@ mod tests { let path = ["/opt/spark/work-dir/datasets/people.txt"]; - let mut opts = TextOptions::new(); + let mut opts = TextOptions::default(); // If true, read each file from input path(s) as a single row. opts.whole_text = Some(false); @@ -1981,7 +1938,7 @@ mod tests { let path = "/tmp/csv_with_options_rande_id/"; - let mut write_opts = CsvOptions::new(); + let mut write_opts = CsvOptions::default(); write_opts.header = Some(true); write_opts.null_value = Some("NULL".to_string()); @@ -1994,7 +1951,7 @@ mod tests { let path = ["/tmp/csv_with_options_rande_id/"]; - let mut read_opts = CsvOptions::new(); + let mut read_opts = CsvOptions::default(); read_opts.header = Some(true); @@ -2016,7 +1973,7 @@ mod tests { let path = "/tmp/json_with_options_rande_id/"; - let mut write_opts = JsonOptions::new(); + let mut write_opts = JsonOptions::default(); write_opts.multi_line = Some(true); write_opts.allow_comments = Some(false); @@ -2031,7 +1988,7 @@ mod tests { let path = ["/tmp/json_with_options_rande_id/"]; - let read_opts = JsonOptions::new(); + let read_opts = JsonOptions::default(); let df = spark.read().json(path, read_opts)?; @@ -2051,7 +2008,7 @@ mod tests { let path = "/tmp/orc_with_options_rande_id/"; - let write_opts = OrcOptions::new(); + let write_opts = OrcOptions::default(); let _ = df .write() @@ -2061,7 +2018,7 @@ mod tests { let path = ["/tmp/orc_with_options_rande_id/"]; - let mut read_opts = OrcOptions::new(); + let mut read_opts = OrcOptions::default(); read_opts.merge_schema = Some(true); read_opts.common.path_glob_filter = Some("*.orc".to_string()); @@ -2085,7 +2042,7 @@ mod tests { let path = "/tmp/parquet_with_options_rande_id/"; - let mut write_opts = ParquetOptions::new(); + let mut write_opts = ParquetOptions::default(); // Configure datetime rebase mode (options could be "EXCEPTION", "LEGACY", or "CORRECTED"). write_opts.datetime_rebase_mode = Some("CORRECTED".to_string()); @@ -2101,7 +2058,7 @@ mod tests { let path = ["/tmp/parquet_with_options_rande_id/"]; - let mut read_opts = ParquetOptions::new(); + let mut read_opts = ParquetOptions::default(); read_opts.merge_schema = Some(false); read_opts.common.path_glob_filter = Some("*.parquet".to_string()); @@ -2131,7 +2088,7 @@ mod tests { let path = "/tmp/text_with_options_rande_id/"; - let mut write_opts = TextOptions::new(); + let mut write_opts = TextOptions::default(); write_opts.whole_text = Some(true); @@ -2146,7 +2103,7 @@ mod tests { let path = ["/tmp/text_with_options_rande_id/"]; - let mut read_opts = TextOptions::new(); + let mut read_opts = TextOptions::default(); read_opts.whole_text = Some(true); read_opts.line_sep = Some("\n".to_string()); diff --git a/examples/src/databricks.rs b/examples/src/databricks.rs index 7a5cbf3..40b4836 100644 --- a/examples/src/databricks.rs +++ b/examples/src/databricks.rs @@ -29,7 +29,7 @@ async fn main() -> Result<(), Box> { // groupby the pickup let df = df .select(["pickup_zip", "fare_amount"]) - .group_by(Some([col("pickup_zip")])); + .group_by(Some(["pickup_zip"])); // average the fare amount and order by the top 10 zip codes let df = df