Skip to content

WindowOperatorQueryFrameProcessorFactory: Pass QueryContext instead of WindowOperatorQuery to WindowOperatorQueryFrameProcessor#17405

Merged
cryptoe merged 6 commits intoapache:masterfrom
Akshat-Jain:msq-wf-pass-querycontext-instead-of-windowoperatorquery
Nov 7, 2024
Merged

WindowOperatorQueryFrameProcessorFactory: Pass QueryContext instead of WindowOperatorQuery to WindowOperatorQueryFrameProcessor#17405
cryptoe merged 6 commits intoapache:masterfrom
Akshat-Jain:msq-wf-pass-querycontext-instead-of-windowoperatorquery

Conversation

@Akshat-Jain
Copy link
Copy Markdown
Contributor

@Akshat-Jain Akshat-Jain commented Oct 24, 2024

Description

Currently, WindowOperatorQueryKit was passing WindowOperatorQuery to the frame processor layers. It was suggested in #17158 (comment) that we should pass only the stuff that's needed in the frame processor layer.

Changing the WindowOperatorQueryFrameProcessorFactory's signature is backwards incompatible, so we are avoiding that. But we can make the change for WindowOperatorQueryFrameProcessor atleast.

Hence, this PR makes the change to pass QueryContext instead of WindowOperatorQuery to WindowOperatorQueryFrameProcessor.


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 - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Oct 24, 2024
@Akshat-Jain
Copy link
Copy Markdown
Contributor Author

@cryptoe As discussed offline, closing this PR as the change doesn't offer us any benefits (like performance etc), and isn't worth the backward compatibility efforts.

@Akshat-Jain Akshat-Jain reopened this Oct 29, 2024
@Akshat-Jain Akshat-Jain changed the title WindowOperatorQueryKit: Pass QueryContext instead of WindowOperatorQuery to subsequent layers WindowOperatorQueryFrameProcessorFactory: Pass QueryContext instead of WindowOperatorQuery to WindowOperatorQueryFrameProcessor Oct 29, 2024
}

@Nullable
public static VirtualColumn makeSegmentGranularityVirtualColumn(final ObjectMapper jsonMapper, final Query<?> query)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

note: there are only 2 callsites; inline?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Have made the change.

@cryptoe cryptoe merged commit 73cbce9 into apache:master Nov 7, 2024
jtuglu1 pushed a commit to jtuglu1/druid that referenced this pull request Nov 20, 2024
…f WindowOperatorQuery to WindowOperatorQueryFrameProcessor (apache#17405)

* WindowOperatorQueryKit: Pass QueryContext instead of WindowOperatorQuery to subsequent layers

* Add serializer for QueryContext class

* Revert changes of WindowOperatorQueryFrameProcessorFactory json param

* Fix checkstyle

* Address review comment: Remove older method in favor of calling new method inline
@adarshsanjeev adarshsanjeev added this to the 32.0.0 milestone Jan 16, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants