We currently have 20 duplicate structs defined in protobuf for binary expressions, such as:
message Equal {
Expr left = 1;
Expr right = 2;
}
message NotEqual {
Expr left = 1;
Expr right = 2;
}
message EqualNullSafe {
Expr left = 1;
Expr right = 2;
}
As a result, we have a lot of duplicate code in QueryPlanSerde for serializing binary expressions that cannot easily be refactored because each code block references a different (but identical) generated class.
What changes are included in this PR?
Use a single definition of BinaryExpr
Refactor QueryPlanSerde to remove a lot of duplicate boilerplate code
Which issue does this PR close?
N/A
Rationale for this change
We currently have 20 duplicate structs defined in protobuf for binary expressions, such as:
As a result, we have a lot of duplicate code in QueryPlanSerde for serializing binary expressions that cannot easily be refactored because each code block references a different (but identical) generated class.
What changes are included in this PR?
How are these changes tested?
Existing tests