nuno-faria commented on code in PR #1826: URL: https://github.com/apache/datafusion-python/pull/1826#discussion_r4502718892
########## crates/core/src/expr/drop_catalog.rs: ########## Review Comment: https://github.com/apache/datafusion/pull/25112 ########## crates/core/src/expr/asof_join.rs: ########## Review Comment: https://github.com/apache/datafusion/pull/23829 ########## crates/core/src/expr/join.rs: ########## @@ -156,7 +156,7 @@ impl PyJoin { Ok(self.join.right.as_ref().clone().into()) } - /// Retrieves the right input `LogicalPlan` to this `Join` node + /// Retrieves the equality keys of this `Join` node Review Comment: Noticed when creating the ASOF join that the prev comment was wrong. ########## crates/core/src/expr/materialized_cte.rs: ########## Review Comment: https://github.com/apache/datafusion/pull/26269 ########## crates/core/src/context.rs: ########## @@ -22,7 +22,7 @@ use std::str::FromStr; use std::sync::Arc; use arrow::array::RecordBatchReader; -use arrow::ffi_stream::ArrowArrayStreamReader; +use arrow::ffi_stream::RecordBatchStreamReader; Review Comment: https://github.com/apache/arrow-rs/pull/11161 ########## python/datafusion/functions/__init__.py: ########## @@ -5385,7 +5385,7 @@ def map_entries(map: Expr) -> Expr: def element_at(map: Expr, key: Expr) -> Expr: """Returns the value for a given key in the map. - Returns ``[None]`` if the key is absent. + Returns ``[]`` if the key is absent. Review Comment: https://github.com/apache/datafusion/pull/24999 ########## crates/core/src/expr/show.rs: ########## Review Comment: https://github.com/apache/datafusion/pull/26057 ########## python/tests/test_dataframe.py: ########## @@ -2719,7 +2719,9 @@ def test_write_parquet_with_options_compression(df, tmp_path, compression): def test_write_parquet_with_options_wrong_compression_level(df, tmp_path, compression): path = tmp_path - with pytest.raises(Exception, match=r"valid compression range .*? exceeded."): + with pytest.raises( + Exception, match=r"Invalid compression level \d+ for \w+\. Expected a level" + ): Review Comment: https://github.com/apache/datafusion/pull/25626 ########## crates/core/src/expr/create_external_catalog.rs: ########## Review Comment: https://github.com/apache/datafusion/pull/25112 ########## crates/core/src/dataset.rs: ########## @@ -89,7 +89,7 @@ impl TableProvider for Dataset { async fn scan( &self, _ctx: &dyn Session, - projection: Option<&Vec<usize>>, + projection: Option<&[usize]>, Review Comment: https://github.com/apache/datafusion/pull/24376 ########## crates/core/src/dataframe.rs: ########## @@ -229,8 +232,22 @@ impl PyParquetWriterOptions { maximum_buffered_record_batches_per_stream: usize, ) -> PyResult<Self> { let writer_version = - datafusion::common::parquet_config::DFParquetWriterVersion::from_str(writer_version) - .map_err(py_datafusion_err)?; + DFParquetWriterVersion::from_str(writer_version).map_err(py_datafusion_err)?; + let compression = compression + .as_deref() + .map(DFParquetCompression::from_str) + .transpose() + .map_err(py_datafusion_err)?; + let statistics_enabled = statistics_enabled + .as_deref() + .map(DFParquetStatistics::from_str) + .transpose() + .map_err(py_datafusion_err)?; + let encoding = encoding + .as_deref() + .map(DFParquetEncoding::from_str) + .transpose() + .map_err(py_datafusion_err)?; Review Comment: These params are now enums. ########## python/tests/test_context.py: ########## @@ -1811,7 +1811,7 @@ def test_read_csv_with_options(tmp_path, as_read, global_ctx): [ pa.array(["Alice", "Bob", "Phil", "Karin"]), pa.array([30.0, 25.0, 75.0, 50.0]), - pa.array(["New York; NY", None, "Detroit' MI", "Stockholm\nSweden"]), + pa.array(["New York; NY", "", "Detroit' MI", "Stockholm\nSweden"]), Review Comment: This now appears as an empty string since it does not match the null_regex. From https://github.com/apache/datafusion/pull/25254 ########## python/tests/test_context.py: ########## @@ -1669,7 +1669,7 @@ def test_sql_with_options_no_dml(ctx): def test_sql_with_options_no_statements(ctx): - sql = "SET time zone = 1;" + sql = "SET time zone = 'UTC';" Review Comment: Timezone is now validated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
