Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non-selection-only GRPC server request handler #7839

Merged
merged 7 commits into from
Dec 13, 2021

Conversation

walterddr
Copy link
Contributor

Currently GRPCServer only support selection-only queries.

This PR adds support for streaming back all other types of query response from server to broker.
This makes possible for the next step --> stream processing GRPC broker handler that can do partial data reduce in streaming fashion.

@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2021

Codecov Report

Attention: Patch coverage is 2.32558% with 42 lines in your changes missing coverage. Please review.

Project coverage is 68.35%. Comparing base (af2858a) to head (31d3202).
Report is 3868 commits behind head on master.

Files with missing lines Patch % Lines
...re/operator/StreamingInstanceResponseOperator.java 0.00% 13 Missing ⚠️
...e/pinot/core/common/datatable/DataTableImplV3.java 0.00% 7 Missing ⚠️
...pinot/core/plan/maker/InstancePlanMakerImplV2.java 0.00% 7 Missing ⚠️
...e/pinot/core/common/datatable/DataTableImplV2.java 0.00% 6 Missing ⚠️
...t/core/plan/StreamingInstanceResponsePlanNode.java 0.00% 4 Missing ⚠️
...ot/core/operator/blocks/InstanceResponseBlock.java 0.00% 3 Missing ⚠️
...va/org/apache/pinot/core/plan/CombinePlanNode.java 0.00% 0 Missing and 1 partial ⚠️
...query/request/context/utils/QueryContextUtils.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7839      +/-   ##
============================================
- Coverage     71.46%   68.35%   -3.11%     
+ Complexity     4079     4012      -67     
============================================
  Files          1583     1194     -389     
  Lines         81871    59366   -22505     
  Branches      12239     9173    -3066     
============================================
- Hits          58509    40580   -17929     
+ Misses        19393    15922    -3471     
+ Partials       3969     2864    -1105     
Flag Coverage Δ
integration1 ?
integration2 ?
unittests1 68.35% <2.32%> (-0.10%) ⬇️
unittests2 ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@walterddr walterddr marked this pull request as ready for review November 30, 2021 18:20
Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

Suggest adding 2 methods DataTable toMetadataOnlyDataTable() and DataTable toDataOnlyDataTable() to the DataTable interface

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

public DataTable toMetadataOnlyDataTable() {
DataTable destDataTable = DataTableBuilder.getEmptyDataTable();
destDataTable.getMetadata().putAll(this.getMetadata());
if (!this.getExceptions().isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method needs to be implemented in each individual data table implementation as in V2 the exception is stored in _metadata, but in V3 it is stored as a separate map. We don't want to add the exception again if it is already stored in _metadata

Copy link
Contributor Author

Choose a reason for hiding this comment

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

a. good catch.. btw when are we deprecating v2 :-P ?

@Jackie-Jiang Jackie-Jiang merged commit ae443e2 into apache:master Dec 13, 2021
@walterddr walterddr deleted the add_server_grpc branch December 6, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants