Skip to content

Refactor: Pass context instead on individual arguments to operator#10413

Merged
walterddr merged 12 commits intoapache:masterfrom
KKcorps:query_operator_refactor_context
Mar 16, 2023
Merged

Refactor: Pass context instead on individual arguments to operator#10413
walterddr merged 12 commits intoapache:masterfrom
KKcorps:query_operator_refactor_context

Conversation

@KKcorps
Copy link
Contributor

@KKcorps KKcorps commented Mar 13, 2023

This will allow us to easily add more params to operators constructors in the future without major refactoring.

@KKcorps KKcorps requested a review from walterddr March 13, 2023 08:32
@KKcorps
Copy link
Contributor Author

KKcorps commented Mar 13, 2023

@walterddr I have changed test classes as well and removed the older constructor. Let me know if you want me to revert that.

@codecov-commenter
Copy link

codecov-commenter commented Mar 13, 2023

Codecov Report

Merging #10413 (f87d991) into master (d475712) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master   #10413      +/-   ##
============================================
- Coverage     64.25%   64.23%   -0.02%     
- Complexity     6059     6094      +35     
============================================
  Files          1997     2000       +3     
  Lines        108768   108966     +198     
  Branches      16620    16646      +26     
============================================
+ Hits          69888    69994     +106     
- Misses        33816    33877      +61     
- Partials       5064     5095      +31     
Flag Coverage Δ
unittests1 68.00% <100.00%> (-0.01%) ⬇️
unittests2 13.85% <0.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...va/org/apache/pinot/query/runtime/QueryRunner.java 80.53% <100.00%> (+0.17%) ⬆️
...inot/query/runtime/operator/AggregateOperator.java 92.30% <100.00%> (ø)
...e/pinot/query/runtime/operator/FilterOperator.java 92.59% <100.00%> (ø)
...pinot/query/runtime/operator/HashJoinOperator.java 95.00% <100.00%> (ø)
...e/operator/LeafStageTransferableBlockOperator.java 77.88% <100.00%> (ø)
...t/query/runtime/operator/LiteralValueOperator.java 100.00% <100.00%> (ø)
...query/runtime/operator/MailboxReceiveOperator.java 96.25% <100.00%> (+0.25%) ⬆️
...ot/query/runtime/operator/MailboxSendOperator.java 74.57% <100.00%> (+2.35%) ⬆️
...not/query/runtime/operator/MultiStageOperator.java 79.54% <100.00%> (ø)
...g/apache/pinot/query/runtime/operator/OpChain.java 100.00% <100.00%> (ø)
... and 8 more

... and 80 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@KKcorps KKcorps force-pushed the query_operator_refactor_context branch from 2943150 to a28ebbb Compare March 13, 2023 19:33
Copy link
Contributor

@walterddr walterddr left a comment

Choose a reason for hiding this comment

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

lgtm mostly. please address the comments

Copy link
Contributor

@walterddr walterddr left a comment

Choose a reason for hiding this comment

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

lgtm mostly. please kindly take a look at the comments.
also several general points.

  1. let's not auto-reformat just to make the PR easier to review
  2. for the context object. can we put it as first argument?

@KKcorps KKcorps force-pushed the query_operator_refactor_context branch from 5820651 to f87d991 Compare March 15, 2023 07:58
@KKcorps KKcorps requested review from somandal and walterddr and removed request for somandal March 15, 2023 08:02
Comment on lines +90 to +91
// OpChainExecutionContext context =
// OperatorTestUtil.getContext(1, DEFAULT_SENDER_STAGE_ID, new VirtualServerAddress(_server));
Copy link
Contributor

@somandal somandal Mar 15, 2023

Choose a reason for hiding this comment

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

looks like commented out code. can you clean this up?

@somandal
Copy link
Contributor

@KKcorps can you address this:

for the context object. can we put it as first argument?

@KKcorps
Copy link
Contributor Author

KKcorps commented Mar 16, 2023

@KKcorps can you address this:

for the context object. can we put it as first argument?

@somandal completed. Please take a look again.

Copy link
Contributor

@somandal somandal left a comment

Choose a reason for hiding this comment

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

lgtm!

@walterddr walterddr merged commit 00284b9 into apache:master Mar 16, 2023
@Jackie-Jiang Jackie-Jiang added multi-stage Related to the multi-stage query engine refactor labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multi-stage Related to the multi-stage query engine refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants