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

Fix null coercion of scalars #2172

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Fix null coercion of scalars #2172

wants to merge 10 commits into from

Conversation

gatesn
Copy link
Contributor

@gatesn gatesn commented Jan 31, 2025

Fixes #2171

@gatesn gatesn requested a review from joseph-isaacs January 31, 2025 16:09
@gatesn gatesn enabled auto-merge (squash) January 31, 2025 16:09
vortex-array/src/builders/mod.rs Show resolved Hide resolved
vortex_bail!("Boolean operations are only supported on boolean arrays")
if !lhs.dtype().is_boolean()
|| !rhs.dtype().is_boolean()
|| !lhs.dtype().eq_ignore_nullability(rhs.dtype())
Copy link
Member

Choose a reason for hiding this comment

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

nit: could simplify as !matches!(lhs.dtype(), DType::Boolean(_)) || ...

To maximise compatibility with compute engines, Vortex does not perform any implicit type coercion in its compute
functions or expressions. The exception to this is upcasting the nullability of input data types. For example,
it is valid to compare a `u32` and `u32?` array, resulting in a `bool?` array.
Copy link
Member

Choose a reason for hiding this comment

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

What about list(u32)? compared to list(u32?).

@gatesn
Copy link
Contributor Author

gatesn commented Jan 31, 2025

I think this is blocked on #2174

@gatesn
Copy link
Contributor Author

gatesn commented Jan 31, 2025

Nope.. this seems like it's a DataFusion bug? apache/datafusion#14394

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vortex / DataFusion null casting
3 participants