R-JunmingChen commented on PR #37418:
URL: https://github.com/apache/arrow/pull/37418#issuecomment-1734723401
> 3. Remap original `dict_indices` to new `changed_indices`?
remap the `indices` to new `changed_indices`. You can check the test for
better understanding
```
// input isn't compacted && its indice needs to be adjusted
CheckDictionaryCompact(dict_type, "[3, 4, 7, 0, 12, 191, 21, 8]",
"[0, 2, 4, 4, 6, 4, 2, 0, 6]", "[3, 7, 12, 21]",
"[0, 1, 2, 2, 3, 2, 1, 0, 3]");
CheckDictionaryCompact(dict_type, "[3, 4, 7, 0, 12, 191, 21, 8]",
"[4, 6, 7, 7, 6, 4, 6, 6, 6]", "[12, 21, 8]",
"[0, 1, 2, 2, 1, 0, 1, 1, 1]");
CheckDictionaryCompact(dict_type, "[3, 4, 7, 0, 12, 191, 21, 8]",
"[7, 4, 7, 7, 7, 7, 4, 7, 7]", "[12, 8]",
"[1, 0, 1, 1, 1, 1, 0, 1, 1]");
```
--
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]