Skip to content

Conversation

@andygrove
Copy link
Member

This PR adds the binary expression to the new physical execution plan, with support for comparison operators (<, <=, >, >=, ==, !=) and boolean operators AND and OR.

Other binary expressions, such as math expressions will be added in a future PR.

Copy link
Contributor

@paddyhoran paddyhoran left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just one question.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to check that left.data_type() is boolean before using the boolean_op macro. If you pass an array with another data type though here it will downcast to a boolean array but, of course, would be incorrect.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, thanks. I think the current code would have failed on the downcast resulting in a panic if the types were wrong (not great), and explicit checks make sense. I pushed this change and also rebased.

Copy link
Contributor

@paddyhoran paddyhoran left a comment

Choose a reason for hiding this comment

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

LGTM

)));
}
}
Operator::Or => {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a shame this has to be repeated instead of using Operator::And | Operator::Or

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants