Skip to content

Conversation

@romeoscript
Copy link

Does this PR closes an open issue or discussion?

What changes are included in this PR?

fn split_inner(expr: &Expression, exprs: &mut Vec<Expression>) {
match expr.as_opt::<Binary>() {
Some(operator) if *operator == Operator::And => {
Some(operator) if *operator == Operator::KleeneAnd => {
Copy link
Contributor

@joseph-isaacs joseph-isaacs Feb 12, 2026

Choose a reason for hiding this comment

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

What is the reason for changing this?

Copy link
Author

Choose a reason for hiding this comment

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

The reason is that Operator::And now represents Standard logic , but Vortex’s query engine was built assuming Kleene logic

Copy link
Contributor

Choose a reason for hiding this comment

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

What about regular and?

Comment on lines +118 to +120
pub fn not_kleene(operand: Expression) -> Expression {
Not.new_expr(EmptyOptions, vec![operand])
}
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not correct?

Copy link
Author

Choose a reason for hiding this comment

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

aparently this is redundant

Copy link
Contributor

Choose a reason for hiding this comment

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

Then why include it?

@joseph-isaacs
Copy link
Contributor

Mind explain the change you made?

@romeoscript
Copy link
Author

Mind explain the change you made?

I'm just separating standard boolean logic from Kleene logic to make things explicit. And/Or now follow standard null propagation while KleeneAnd/KleeneOr handle the Kleene-style logic we were using implicitly before.

.chain(rhs.stat_falsification(catalog))
.reduce(or),
Operator::Or => Some(and(
.reduce(or_kleene),
Copy link
Contributor

@joseph-isaacs joseph-isaacs Feb 12, 2026

Choose a reason for hiding this comment

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

Why does or map to or kleene here?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, since or() now defaults to strict null handling, we have to use or_kleene() here to keep the current behavior. Plus, Kleene is actually better for stats since it's more aggressive with pruning when there are nulls

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.

expr::Operator::{And/Or/Not} is actually Kleene{And/Or/No}

2 participants