apache / datafusion-comet

Apache DataFusion Comet Spark Accelerator
https://datafusion.apache.org/comet
Apache License 2.0
823 stars 163 forks source link

minor: refactor UnaryExpr handling to make code more concise #1065

Closed andygrove closed 1 week ago

andygrove commented 2 weeks ago

Which issue does this PR close?

N/A

Rationale for this change

Following up from this comment in a recent PR, I wanted to explore the suggestion some more.

What changes are included in this PR?

Refactor UnaryExpr handling in QueryPlanSerde to make it more concise, but at the cost of increased complexity.

I am looking for feedback if this is a good direction or not (I do not have a strong opinion either way). If we do like this approach then I can follow up to apply this to BinaryExpr and MathExpr as well.

How are these changes tested?

Existing tests

viirya commented 1 week ago

Thanks @andygrove @kazuyukitanimura