From e0ec7e07bec2e3b1cd0aa13e80a9a5f689c659e7 Mon Sep 17 00:00:00 2001 From: Andrew Gazelka Date: Fri, 4 Oct 2024 15:58:14 -0700 Subject: [PATCH] improvements / comments --- src/daft-core/src/array/mod.rs | 3 +-- src/lib.rs | 1 - tests/expressions/test_expressions.py | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/daft-core/src/array/mod.rs b/src/daft-core/src/array/mod.rs index 6698b59eae..367b7eb095 100644 --- a/src/daft-core/src/array/mod.rs +++ b/src/daft-core/src/array/mod.rs @@ -53,11 +53,10 @@ impl DataArray { ); if let Ok(expected_arrow_physical_type) = physical_field.dtype.to_arrow() - // For instance Int32 -> Int 32 { let arrow_data_type = arrow_array.data_type(); // logical type - if !expected_arrow_physical_type.eq(arrow_data_type) { + if &expected_arrow_physical_type != arrow_data_type { panic!( "Mismatch between expected and actual Arrow types for DataArray.\n\ Field name: {}\n\ diff --git a/src/lib.rs b/src/lib.rs index 51560322fa..a7a1382538 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -96,7 +96,6 @@ pub mod pylib { #[pymodule] fn daft(py: Python, m: &Bound) -> PyResult<()> { refresh_logger(py)?; - init_tracing(crate::should_enable_chrome_trace()); common_daft_config::register_modules(m)?; diff --git a/tests/expressions/test_expressions.py b/tests/expressions/test_expressions.py index fceb121e3e..4b37c0a101 100644 --- a/tests/expressions/test_expressions.py +++ b/tests/expressions/test_expressions.py @@ -516,7 +516,7 @@ def test_list_value_counts(): {"list_col": [["a", "b", "a", "c"], ["b", "b", "c"], ["a", "a", "a"], [], ["d", None, "d"]]} ) - # # Apply list_value_counts operation + # Apply list_value_counts operation result = mp.eval_expression_list([col("list_col").list.value_counts().alias("value_counts")]) value_counts = result.to_pydict()["value_counts"]