You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The QueryPlanSerde class in Comet currently contains a huge match statement that handles the logic for translating Spark expressions into protobuf.
Each match arm:
Performs type-checking to determine if the expression is supported.
Contains the code for converting the expression into its protobuf representation.
While functional, this approach has limitations:
Readability: The large match statement makes the code harder to navigate and maintain.
Testability: Testing specific expression logic requires interacting with the entire QueryPlanSerde implementation.
Extensibility: Adding support for new expressions or customizing behavior for specific expressions is non-trivial.
I would like to refactor QueryPlanSerde to move the logic for each expression into individual classes or objects. Each expression type would have its own class or object that performs type-checking and conversion to protobuf.
This would help with unit testing since we can write tests to interact with these new classes or objects without having to use the full QueryPlanSerde implementation.
Describe the potential solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
What is the problem the feature request solves?
The QueryPlanSerde class in Comet currently contains a huge match statement that handles the logic for translating Spark expressions into protobuf.
Each match arm:
While functional, this approach has limitations:
I would like to refactor QueryPlanSerde to move the logic for each expression into individual classes or objects. Each expression type would have its own class or object that performs type-checking and conversion to protobuf.
This would help with unit testing since we can write tests to interact with these new classes or objects without having to use the full QueryPlanSerde implementation.
Describe the potential solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: