siddharthteotia edited a comment on issue #4535: Implement DISTINCT clause
URL: https://github.com/apache/incubator-pinot/pull/4535#issuecomment-527817225
 
 
   > Please add a unit test for DistinctTable
   > 
   > Bonus points if you can also cover BrokerReduceService via unit tests
   
   @mcvsubbu , Tests added in DistinctQueriesTest test the entire round trip of 
planning the query and executing from the broker -- thus all levels of 
execution code are exercised; segment, server level merge and broker level 
merge. Similar tests are also added in InterSegmentAggregationTests and 
OfflineClusterIntegrationTest
   
   The tests exercise each and every method of DistinctTable -- adding the key, 
iterator, serialization by server to send DataTable to broker and 
deserialization at broker to do the merge and then set broker response. As part 
of asserts in these tests, I check that distinct table works fine (both actual 
data and metadata like column names and types) by comparing the end result (at 
the broker level and segment level) with the expected table that the test code 
builds as it generates custom data. So DistinctTable's code has got 100% 
coverage through the tests added as follows:
   
   DistinctQueriesTest.java
   
   - Exercises segment level execution and checks the data (unique rows) and 
metadata (column names and types) in Distinct Table.
   
   - Exercises full inter segment and inter server execution via broker and 
checks the broker response data (actual unique rows) and metadata (column 
names) -- this broker response is set after deserializing the DistinctTable and 
doing the reduce/merge
   
   OfflineClusterIntegrationTest.java
   
   - Exercises full inter segment and inter server execution via broker and 
compares the result against H2
   
   InnerSegmentAggregationSingleValueQueriesTest
   
   - Exercises segment level execution and checks the data (unique rows) and 
metadata (column names and types) in Distinct Table.
   
   InterSegmentAggregationSingleValueQueriesTest
   
   - Exercises full inter segment and inter server execution via broker and 
checks the broker response data (actual unique rows) and metadata (column 
names) -- this broker response is set after deserializing the DistinctTable and 
doing the reduce/merge

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to