Skip to content

Chore: refactor Comparison out of QueryPlanSerde #2028

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

CuteChuanChuan
Copy link

@CuteChuanChuan CuteChuanChuan commented Jul 15, 2025

Which issue does this PR close?
Part of #2019

Rationale for this change
See #2019 for rationale.

What changes are included in this PR?
Moved comparison expressions to separate file (comparison.scala)

How are these changes tested?
There are no functional changes, so it relies on existing tests.

Details:

  • Add ComparisonBase trait with reusable helper methods
  • Move GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual to CometComparison*
  • Move IsNull, IsNotNull, IsNaN to CometIs* classes
  • Move In expression to CometIn class
  • Update exprSerdeMap to use new comparison classes
  • Remove corresponding case statements from exprToProtoInternal

- Create comparisons.scala following the pattern from math/array expressions.
- Implements CometGreaterThan as proof of concept for issue apache#2019.
@CuteChuanChuan CuteChuanChuan force-pushed the raymond/refactor-expressions-in-QueryPlanSerde branch from 56ddd51 to 202556d Compare July 17, 2025 15:03
- Add ComparisonBase trait with reusable helper methods
- Move GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual to CometComparison*
- Move IsNull, IsNotNull, IsNaN to CometIs* classes
- Move In expression to CometIn class
- Update exprSerdeMap to use new comparison classes
- Remove corresponding case statements from exprToProtoInternal
@CuteChuanChuan CuteChuanChuan changed the title [WIP] chore: refactor Comparison out of QueryPlanSerde Chore: refactor Comparison out of QueryPlanSerde Jul 17, 2025
@CuteChuanChuan CuteChuanChuan marked this pull request as ready for review July 17, 2025 15:16
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.

1 participant