Skip to content

Commit

Permalink
improvements / comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgazelka committed Oct 4, 2024
1 parent 3b5b397 commit e0ec7e0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/daft-core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ impl<T> DataArray<T> {
);

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\
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pub mod pylib {
#[pymodule]
fn daft(py: Python, m: &Bound<PyModule>) -> PyResult<()> {
refresh_logger(py)?;

init_tracing(crate::should_enable_chrome_trace());

common_daft_config::register_modules(m)?;
Expand Down
2 changes: 1 addition & 1 deletion tests/expressions/test_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down

0 comments on commit e0ec7e0

Please sign in to comment.