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

[pinot-spark-connector] Fix empty data table handling in GRPC reader #9837

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

cbalci
Copy link
Contributor

@cbalci cbalci commented Nov 21, 2022

Fixes a bug where an exception is thrown when all of the data tables retuned in a Spark 'split' is empty.

When the Spark reader pushes down a filter which effectively reduces the returned data for all the segments to zero, GRPC data fetcher (PinotGrpcServerDataFetcher) wrongly assumes that there was an error. This behavior was introduced when porting logic from the non-GRPC fetcher (PinotServerDataFetcher) where the assumption is correct. Http and GRPC interfaces differ in behavior where the HTTP interface will return empty instances of datatables whereas with GRPC you only get metadata.

I'm updating the error handling to remove this assumption and record an error when there is actual exception thrown by the GRPC server.

bugfix

@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2022

Codecov Report

Merging #9837 (abc8c65) into master (3724ba2) will increase coverage by 35.60%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master    #9837       +/-   ##
=============================================
+ Coverage     34.69%   70.29%   +35.60%     
- Complexity      190     5000     +4810     
=============================================
  Files          1965     1965               
  Lines        105115   105115               
  Branches      15909    15909               
=============================================
+ Hits          36474    73895    +37421     
+ Misses        65542    26079    -39463     
- Partials       3099     5141     +2042     
Flag Coverage Δ
integration1 25.32% <ø> (+0.19%) ⬆️
integration2 24.53% <ø> (?)
unittests1 67.96% <ø> (?)
unittests2 15.82% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...lix/core/realtime/PinotRealtimeSegmentManager.java 76.43% <0.00%> (-1.58%) ⬇️
...pache/pinot/core/query/utils/idset/EmptyIdSet.java 25.00% <0.00%> (ø)
...anager/realtime/SegmentBuildTimeLeaseExtender.java 63.23% <0.00%> (ø)
.../helix/core/realtime/SegmentCompletionManager.java 73.17% <0.00%> (+0.20%) ⬆️
.../core/realtime/PinotLLCRealtimeSegmentManager.java 72.07% <0.00%> (+0.45%) ⬆️
...che/pinot/broker/routing/BrokerRoutingManager.java 86.07% <0.00%> (+0.55%) ⬆️
...e/pinot/common/function/TransformFunctionType.java 100.00% <0.00%> (+0.94%) ⬆️
...x/core/realtime/MissingConsumingSegmentFinder.java 87.09% <0.00%> (+1.07%) ⬆️
.../apache/pinot/common/exception/QueryException.java 94.44% <0.00%> (+1.11%) ⬆️
...va/org/apache/pinot/controller/ControllerConf.java 58.11% <0.00%> (+1.13%) ⬆️
... and 1116 more

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

@Jackie-Jiang Jackie-Jiang merged commit 32314bb into apache:master Nov 22, 2022
@cbalci
Copy link
Contributor Author

cbalci commented Nov 23, 2022

Thanks @Jackie-Jiang !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants