In https://github.com/apache/druid/pull/17433, we had to move the operator-chain-transformation logic to the MSQ worker layer to ensure backward compatibility. But it wasn't ideal since such logic shouldn't be a responsibility of the worker.
On further offline discussion, an alternative was suggested that we can pass a flag from the broker during query execution.
If MSQ controller sees the flag, then it does the operator transformation. Otherwise it doesn't do the operator transformation.
This relies on the upgrade order of the different services. This allows us to achieve backward compatibility since brokers are upgraded after indexers/middlemanagers, so passing a flag is essentially passing info whether all indexers/middlemanagers have been upgraded or not - hence helps us achieve backward compatibility.
This PR has:
[x] been self-reviewed.
[ ] added documentation for new or modified features or behaviors.
[ ] a release note entry in the PR description.
[ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
Description
In https://github.com/apache/druid/pull/17433, we had to move the operator-chain-transformation logic to the MSQ worker layer to ensure backward compatibility. But it wasn't ideal since such logic shouldn't be a responsibility of the worker.
On further offline discussion, an alternative was suggested that we can pass a flag from the broker during query execution.
If MSQ controller sees the flag, then it does the operator transformation. Otherwise it doesn't do the operator transformation.
This relies on the upgrade order of the different services. This allows us to achieve backward compatibility since brokers are upgraded after indexers/middlemanagers, so passing a flag is essentially passing info whether all indexers/middlemanagers have been upgraded or not - hence helps us achieve backward compatibility.
This PR has: