Skip to content

Conversation

@romainfrancois
Copy link
Collaborator

@romainfrancois romainfrancois commented Nov 21, 2024

We can't actually use UnaryExecutor because of the way it deals with nulls, but we can take inspiration from it and have two separate paths for flat and unified.

wip: I'll add some tests.

closes #113

@krlmlr
Copy link
Collaborator

krlmlr commented Dec 14, 2024

Thanks, missed that. Is there perhaps a better UnaryExecutor that would process NULLs the way we need it? Or perhaps a template argument that we need to set?

@romainfrancois
Copy link
Collaborator Author

I don't think I've seen any. We could try to generalise what we have here into a variant of Un|Bi|*|naryExecutor that would have an additional path for when it sees a NULL. That would perhaps be easy for Unary but then I'm afraid things will get exponentially more complicated as there are more inputs.

I might have missed an already existing solution though cc @hannes ?

@krlmlr
Copy link
Collaborator

krlmlr commented Jan 6, 2025

Perhaps to rephrase: is there a UnaryExecutor and BinaryExecutor that treats NULL like any other value, and computes the result for both NULL and non-NULL inputs by calling some lambda? (Is NULL even representable in a Value object?)

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.

is.na() and %in% must use BinaryExecutor

3 participants