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

[core] Refactor NullFalseLeafFunction #3018

Closed
wants to merge 2 commits into from

Conversation

Zouxxyy
Copy link
Contributor

@Zouxxyy Zouxxyy commented Mar 15, 2024

Purpose

  • Currently In and NotIn predicate are null false, this PR extract a common parent class NullFalseLeafFunction for them
  • fix when all stats is null, equal(0, null) still should be false

Tests

  • All original UT passed
  • New case
PredicateBuilder builder = new PredicateBuilder(RowType.of(new IntType()));
Predicate predicate = builder.equal(0, null);
// new
assertThat(test(predicate, 1, new FieldStats[] {new FieldStats(null, null, null)})).isEqualTo(false);

API and Format

Documentation

@Zouxxyy Zouxxyy marked this pull request as draft March 15, 2024 07:18
@Zouxxyy Zouxxyy force-pushed the dev/refeact-predicet branch from 4f31b1b to bbd83df Compare March 15, 2024 07:42
@Zouxxyy Zouxxyy force-pushed the dev/refeact-predicet branch from bbd83df to 5fdb0cd Compare March 15, 2024 08:14
@Zouxxyy Zouxxyy changed the title [core] Fix in and not in predicate [core] Refactor NullFalseLeafFunction Mar 15, 2024
@Zouxxyy Zouxxyy marked this pull request as ready for review March 15, 2024 08:16
@JingsongLi
Copy link
Contributor

I think this is a good improvement, but this code is very prone to bugs, so we don't need to refactor it when there are no requirements.

@Zouxxyy
Copy link
Contributor Author

Zouxxyy commented Mar 15, 2024

close it currently

@Zouxxyy Zouxxyy closed this Mar 15, 2024
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.

2 participants