Skip to content

MSQ WF: Pass a flag from broker to determine operator chain transformation#17443

Merged
cryptoe merged 7 commits intoapache:masterfrom
Akshat-Jain:msq-wf-pass-flag-from-broker-for-operator-transformation
Nov 12, 2024
Merged

MSQ WF: Pass a flag from broker to determine operator chain transformation#17443
cryptoe merged 7 commits intoapache:masterfrom
Akshat-Jain:msq-wf-pass-flag-from-broker-for-operator-transformation

Conversation

@Akshat-Jain
Copy link
Copy Markdown
Contributor

Description

In #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:

  • 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.
  • added integration tests.
  • been tested in a test Druid cluster.

@github-actions github-actions Bot added Area - Batch Ingestion Area - Querying Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Nov 4, 2024
Copy link
Copy Markdown
Contributor

@cryptoe cryptoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest changes LGTM.

@cryptoe cryptoe merged commit 3f56b57 into apache:master Nov 12, 2024
jtuglu1 pushed a commit to jtuglu1/druid that referenced this pull request Nov 20, 2024
@adarshsanjeev adarshsanjeev added this to the 32.0.0 milestone Jan 16, 2025
gianm added a commit to gianm/druid that referenced this pull request Jan 13, 2026
PR apache#18875 caused a regression in WindowOperatorQuery planning, by
causing non-outermost WindowOperatorQuery to be planned without
windowFunctionOperatorTransformation (see apache#17443). This happened because
only the outermost query has the windowFunctionOperatorTransformation
parameter.

This patch fixes the problem by propagating the context parameter from
the outermost queries to any inner WindowOperatorQuery instances.
gianm added a commit that referenced this pull request Jan 13, 2026
PR #18875 caused a regression in WindowOperatorQuery planning, by
causing non-outermost WindowOperatorQuery to be planned without
windowFunctionOperatorTransformation (see #17443). This happened because
only the outermost query has the windowFunctionOperatorTransformation
parameter.

This patch fixes the problem by propagating the context parameter from
the outermost queries to any inner WindowOperatorQuery instances.
kgyrtkirk pushed a commit that referenced this pull request Jan 20, 2026
PR #18875 caused a regression in WindowOperatorQuery planning, by
causing non-outermost WindowOperatorQuery to be planned without
windowFunctionOperatorTransformation (see #17443). This happened because
only the outermost query has the windowFunctionOperatorTransformation
parameter.

This patch fixes the problem by propagating the context parameter from
the outermost queries to any inner WindowOperatorQuery instances.

(cherry picked from commit 07de2ff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 Area - Querying

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants