Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHORE] Refactor Binary Ops #2876

Merged
merged 20 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ parquet2 = {path = "src/parquet2"}
debug = true

[profile.dev]
debug = "line-tables-only"
opt-level = 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need opt-level=1 in dev? That seems like it'll greatly slow down the build times

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left that artifact in by mistake, I meant to push up the optimization level change for build macros

overflow-checks = false

[profile.dev-bench]
Expand Down
4 changes: 1 addition & 3 deletions src/daft-core/src/array/ops/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ where
let opt_lhs = lhs.get(0);
match opt_lhs {
None => Ok(DataArray::full_null(rhs.name(), lhs.data_type(), rhs.len())),
// NOTE: naming logic here is wrong, and assigns the rhs name. However, renaming is handled at the Series level so this
// error is obfuscated.
Some(lhs) => rhs.apply(|rhs| operation(lhs, rhs)),
Some(scalar) => Ok(rhs.apply(|rhs| operation(scalar, rhs))?.rename(lhs.name())),
}
}
(a, b) => Err(DaftError::ValueError(format!(
Expand Down
Loading
Loading