Fix backward compatibility issues in WindowOperatorQueryFrameProcessorFactory and WindowOperatorQueryFrameProcessor#17433
Merged
cryptoe merged 1 commit intoapache:masterfrom Oct 30, 2024
Conversation
…rFactory and WindowOperatorQueryFrameProcessor
cryptoe
approved these changes
Oct 29, 2024
9 tasks
jtuglu1
pushed a commit
to jtuglu1/druid
that referenced
this pull request
Nov 20, 2024
…rFactory and WindowOperatorQueryFrameProcessor (apache#17433)
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
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.
Description
As part of the GlueingPartitioningOperator changes in #17038, we removed 2 fields from

WindowOperatorQueryFrameProcessorFactory:maxRowsMaterializedInWindowandpartitionColumnNames. This introduces backward incompatibility when the MSQ controller has the Glueing PR changes, but the worker doesn't:This PR adds those fields back to ensure backward compatibility.
Even after adding the 2 fields back, if controller has the Glueing PR changes, but workers don't - then we run into another issue where the controller sends the operatorFactoryList with the new operators, but the workers aren't aware of the new operators (GlueingPartitioningOperator and PartitionSortOperator). This causes the following issue:
This PR handles this by moving the operator transformation logic (
NaiveSortOperator -> NaivePartitioningOperator -> WindowOperatortoGlueingPartitioningOperator -> PartitionSortOperator -> WindowOperator) fromWindowOperatorQueryKitlayer to theWindowOperatorQueryFrameProcessorlayer. This would allow the worker to either run the older operator chain (if they are on older version, not having the Glueing PR changes), or run the new operator chain (if they have the Glueing PR changes).Test Plan
To test out the compatibility scenarios, I ran 2 indexers on my local setup, and validated queries for following cases:
Release note
We are marking 2 fields deprecated for window query execution for MSQ task engine. These will be removed in future releases of Druid, so the upgrade plan should involve this intermediate upgrade stage with these backward compatibility code changes.
This PR has: