You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2026/03/29 02:25:34 UTC

[PR] Fix MutableColumnStatisticsTest [pinot]

Jackie-Jiang opened a new pull request, #18018:
URL: https://github.com/apache/pinot/pull/18018

   (no comment)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Fix MutableColumnStatisticsTest [pinot]

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 merged PR #18018:
URL: https://github.com/apache/pinot/pull/18018


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Fix MutableColumnStatisticsTest [pinot]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #18018:
URL: https://github.com/apache/pinot/pull/18018#discussion_r3005612766


##########
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/realtime/converter/stats/MutableColumnStatisticsTest.java:
##########
@@ -53,8 +53,8 @@ public void testElementLength() {
     when(dataSource.getDictionary()).thenReturn(dictionary);
     when(dictionary.getValueType()).thenReturn(DataType.STRING);
     when(dictionary.length()).thenReturn(numElements);
-    when(dictionary.getStringValue(anyInt())).thenAnswer(
-        (Answer<String>) invocation -> elements[(int) invocation.getArgument(0)]);
+    when(dictionary.getValueSize(anyInt())).thenAnswer(
+        invocation -> Utf8.encodedLength(elements[(int) invocation.getArgument(0)]));

Review Comment:
   The mocked `dictionary.getValueSize()` uses `Utf8.encodedLength(...)`, but the expected `minElementLength/maxElementLength` are computed with `randomString.getBytes(UTF_8).length`. These can diverge (and `Utf8.encodedLength` can throw for malformed surrogate pairs), making the test potentially flaky. Consider computing expected lengths using the same `Utf8.encodedLength(...)` logic (or restrict generated strings to ASCII/alphanumeric) so the test matches the production `StringDictionary#getValueSize` behavior.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Fix MutableColumnStatisticsTest [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18018:
URL: https://github.com/apache/pinot/pull/18018#issuecomment-4149316629

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18018?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 55.50%. Comparing base ([`a664c82`](https://app.codecov.io/gh/apache/pinot/commit/a664c825aeb9fffb192c2fd3354ccf17f32d6407?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`eba8553`](https://app.codecov.io/gh/apache/pinot/commit/eba8553ab3329f53fa67e632e9877c835c660717?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #18018      +/-   ##
   ============================================
   - Coverage     55.53%   55.50%   -0.03%     
   + Complexity      746      745       -1     
   ============================================
     Files          2502     2502              
     Lines        143112   143110       -2     
     Branches      22967    22967              
   ============================================
   - Hits          79475    79433      -42     
   - Misses        56897    56926      +29     
   - Partials       6740     6751      +11     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/18018/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [java-11](https://app.codecov.io/gh/apache/pinot/pull/18018/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-21](https://app.codecov.io/gh/apache/pinot/pull/18018/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.50% <ø> (+0.01%)` | :arrow_up: |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/18018/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.50% <ø> (-0.03%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/18018/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.50% <ø> (-0.03%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18018/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.50% <ø> (-0.03%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/18018?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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