You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "kirkrodrigues (via GitHub)" <gi...@apache.org> on 2023/09/20 00:32:53 UTC
[GitHub] [pinot] kirkrodrigues commented on a diff in pull request #11604: JSON index: Add support for ignoring values longer than a given length.
kirkrodrigues commented on code in PR #11604:
URL: https://github.com/apache/pinot/pull/11604#discussion_r1330829414
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/impl/json/MutableJsonIndexImpl.java:
##########
@@ -106,8 +106,11 @@ private void addFlattenedRecords(List<Map<String, String>> records) {
// Put both key and key-value into the posting list. Key is useful for checking if a key exists in the json.
String key = entry.getKey();
_postingListMap.computeIfAbsent(key, k -> new RoaringBitmap()).add(_nextFlattenedDocId);
- String keyValue = key + JsonIndexCreator.KEY_VALUE_SEPARATOR + entry.getValue();
- _postingListMap.computeIfAbsent(keyValue, k -> new RoaringBitmap()).add(_nextFlattenedDocId);
+ int length = _jsonIndexConfig.getMaxValueLength();
Review Comment:
I see what you're saying. After discussing it with @chenboat and @itschrispeck, we'd like to truncate rather than omit long values from the index; I can move this logic into `flatten`. Additionally, we wanted to add a suffix to truncated values so that if/when we support group-by on JSON-indexed columns, the user can detect that a value was truncated.
I will update the PR description and the PR with the same. Let me know if you have major concerns with this design (and thanks for the review!).
--
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