Skip to content

Add additional metadata to the response#9122

Merged
snleee merged 3 commits intoapache:masterfrom
ravishankar15:consume-metadata
Aug 3, 2022
Merged

Add additional metadata to the response#9122
snleee merged 3 commits intoapache:masterfrom
ravishankar15:consume-metadata

Conversation

@ravishankar15
Copy link
Contributor

Fix #7144
Reference: #9092, #9119

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2022

Codecov Report

Merging #9122 (28c6236) into master (fc696ce) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             master    #9122    +/-   ##
==========================================
  Coverage     69.96%   69.96%            
- Complexity     4674     4758    +84     
==========================================
  Files          1838     1838            
  Lines         97349    97564   +215     
  Branches      14672    14715    +43     
==========================================
+ Hits          68107    68261   +154     
- Misses        24493    24553    +60     
- Partials       4749     4750     +1     
Flag Coverage Δ
integration1 26.40% <95.74%> (+0.14%) ⬆️
integration2 24.53% <95.74%> (-0.15%) ⬇️
unittests1 66.98% <100.00%> (+0.07%) ⬆️
unittests2 15.27% <0.00%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
...roker/requesthandler/BaseBrokerRequestHandler.java 73.37% <100.00%> (+0.03%) ⬆️
...t/common/response/broker/BrokerResponseNative.java 96.44% <100.00%> (+0.17%) ⬆️
.../java/org/apache/pinot/common/utils/DataTable.java 95.65% <100.00%> (+0.19%) ⬆️
...core/operator/blocks/IntermediateResultsBlock.java 85.32% <100.00%> (+0.93%) ⬆️
...ot/core/operator/combine/CombineOperatorUtils.java 100.00% <100.00%> (ø)
...core/query/executor/ServerQueryExecutorV1Impl.java 86.51% <100.00%> (+3.06%) ⬆️
...che/pinot/core/query/reduce/BaseReduceService.java 94.76% <100.00%> (+0.28%) ⬆️
...che/pinot/core/query/scheduler/QueryScheduler.java 85.90% <100.00%> (+0.48%) ⬆️
...t/index/loader/bloomfilter/BloomFilterHandler.java 41.49% <0.00%> (-39.33%) ⬇️
.../pinot/core/operator/InstanceResponseOperator.java 77.35% <0.00%> (-9.83%) ⬇️
... and 61 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@ravishankar15
Copy link
Contributor Author

@siddharthteotia @Jackie-Jiang @snleee Can you take a look at the changes ? I have attached the references in the description

Copy link
Contributor

@snleee snleee left a comment

Choose a reason for hiding this comment

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

LGTM

@Jackie-Jiang @siddharthteotia do you guys want to take a look once more?

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

numConsumingSegmentsMatched++;
}
}
} catch (UnsupportedOperationException ignored) { }
Copy link
Contributor

Choose a reason for hiding this comment

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

This try catch is redundant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SelectionCombineOperatorTest.testSelectionLimit0 Should I modify this test to expect an exception as well ? Also while I was trying the query I was getting UnsupportedException in the response but the exception has happened while fetching the metadata. So it gives an impression that the query is not supported which it is.

Let me know if you still feel we want to change this, Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. All the segment top level operator should have this implemented, or this won't be accurate. Seems it is missing from several operators. We may keep it like this for now, and let's add a TODO to check all operators and make sure they have that method properly implemented in a separate PR.

(nit) We usually use 2 lines even when the block is empty

Suggested change
} catch (UnsupportedOperationException ignored) { }
} catch (UnsupportedOperationException ignored) {
}

ravishankar15 and others added 2 commits July 30, 2022 01:25
Co-authored-by: Xiaotian (Jackie) Jiang <17555551+Jackie-Jiang@users.noreply.github.com>
@snleee
Copy link
Contributor

snleee commented Aug 3, 2022

Thanks for working on this!

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.

Add numConsumingSegmentsProcessed and numConsumingSegmentsMatched into the query response metadata

4 participants