-
Notifications
You must be signed in to change notification settings - Fork 249
chore: Refactor operator serde - part 1 #2738
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
Merged
andygrove
merged 17 commits into
apache:main
from
andygrove:refactor-operator-serde-part-1
Nov 8, 2025
Merged
chore: Refactor operator serde - part 1 #2738
andygrove
merged 17 commits into
apache:main
from
andygrove:refactor-operator-serde-part-1
Nov 8, 2025
+1,261
−721
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
|
The diff for the changes to QueryPlanSerde is quite large, but the new code is: op match {
// Fully native scan for V1
case scan: CometScanExec if scan.scanImpl == CometConf.SCAN_NATIVE_DATAFUSION =>
CometNativeScan.convert(scan, builder, childOp: _*)
case filter: FilterExec if CometConf.COMET_EXEC_FILTER_ENABLED.get(conf) =>
CometFilter.convert(filter, builder, childOp: _*)
case limit: LocalLimitExec if CometConf.COMET_EXEC_LOCAL_LIMIT_ENABLED.get(conf) =>
CometLocalLimit.convert(limit, builder, childOp: _*)
case globalLimitExec: GlobalLimitExec
if CometConf.COMET_EXEC_GLOBAL_LIMIT_ENABLED.get(conf) =>
CometGlobalLimit.convert(globalLimitExec, builder, childOp: _*)
case expand: ExpandExec if CometConf.COMET_EXEC_EXPAND_ENABLED.get(conf) =>
CometExpand.convert(expand, builder, childOp: _*)
case _: WindowExec if CometConf.COMET_EXEC_WINDOW_ENABLED.get(conf) =>
withInfo(op, "Window expressions are not supported")
None
case aggregate: HashAggregateExec if CometConf.COMET_EXEC_AGGREGATE_ENABLED.get(conf) =>
CometHashAggregate.convert(aggregate, builder, childOp: _*)
case aggregate: ObjectHashAggregateExec
if CometConf.COMET_EXEC_AGGREGATE_ENABLED.get(conf) =>
CometObjectHashAggregate.convert(aggregate, builder, childOp: _*)
case join: BroadcastHashJoinExec
if CometConf.COMET_EXEC_BROADCAST_HASH_JOIN_ENABLED.get(conf) =>
CometBroadcastHashJoin.convert(join, builder, childOp: _*)
case join: ShuffledHashJoinExec if CometConf.COMET_EXEC_HASH_JOIN_ENABLED.get(conf) =>
CometShuffleHashJoin.convert(join, builder, childOp: _*)
case join: SortMergeJoinExec =>
if (CometConf.COMET_EXEC_SORT_MERGE_JOIN_ENABLED.get(conf)) {
CometSortMergeJoin.convert(join, builder, childOp: _*)
} else {
withInfo(join, "SortMergeJoin is not enabled")
None
} |
comphead
approved these changes
Nov 8, 2025
Contributor
comphead
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks @andygrove
Member
Author
|
Thanks @comphead! Will merge this and rebase the next one, which fixes the bug you ran into with disabling WindowExec via config. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Preparation for fixing #2739 and #2737
Rationale for this change
Partial refactoring of operator serde to use the new framework, similar to what we have done for expressions
What changes are included in this PR?
Created new classes containing operator serde logic. There are no functional changes to this code. It has just been moved out of
QueryPlanSerde. This was entirely manual effort - no AI was used.Note that
operator2protostill has the same match statement and simply delegates to these classes. I am working on using a map lookup approach in #2736 but it has exposed some issues such as #2737 that will take time to figure out.Moved some traits out of
QueryPlanSerdeinto their own files. No code changes made.How are these changes tested?
Existing tests