Akanksha-kedia commented on PR #18920: URL: https://github.com/apache/pinot/pull/18920#issuecomment-4911831165
**Fix: MAP column JSON re-indexing (commit a10a419c)** The two CI failures (unit + integration `TableIndexingTest.*_map_*,json_index`) were caused by a bug in `handleNonDictionaryBasedColumn` that this new commit fixes. **Root cause:** When the config-change or legacy-upgrade rebuild was triggered for a MAP column that already had a JSON index, `handleNonDictionaryBasedColumn` called `forwardIndexReader.getString(docId, ctx)` on the MAP forward index. MAP columns are stored as binary-encoded data (via `MapUtils.serializeMap`), not UTF-8 text. Decoding those bytes as UTF-8 produces garbage strings containing CTRL-CHAR(0) null bytes, which caused: ``` JsonParseException: Illegal character (CTRL-CHAR, code 0): only regular white space (\r, \n, \t) is allowed between tokens ``` **Fix:** For MAP columns, use `forwardIndexReader.getMap(docId, ctx)` + `MapUtils.toString()` instead of `getString()`, consistent with how `ForwardIndexReader.getStrings(int[], ...)` already handles the MAP type in its bulk-read path. All 10 `*_map_*,json_index` test cases should now pass. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
