Fix lazy map hashtable regression#12189
Conversation
In 23de11f we lazily build the hashtables for map. It introduced a regression for the case where the MapBlock is created through AbstractMapBlock.getRegion(), in which the hashtables built on the MapBlock region was not updated in the original MapBlock, thus causing repeated hashtables build on the same base MapBlock. The change is to encapsulate the int[] hashtables in AbstractMapBlock$HashTables object and make it a member of MapBlock/MapBlockBuilder, so that when the sliced MapBlock builds the hashtables, the base MapBlock would also gets updated.
|
I take a quick look into the PR, and I don't recommend to rush into the current release, and revert first, for the following reasons:
|
Resolves issue #12187
In 23de11f we lazily build the hashtables for map. It introduced a
regression for the case where the MapBlock is created through
AbstractMapBlock.getRegion(), in which the hashtables built on the
MapBlock region was not updated in the original MapBlock, thus causing
repeated hashtables build on the same base MapBlock. The change is to
encapsulate the int[] hashtables in AbstractMapBlock$HashTables object
and make it a member of MapBlock/MapBlockBuilder, so that when the
sliced MapBlock builds the hashtables, the base MapBlock would also gets
updated.
This PR was verified to fix the reported regression case on our verifier cluster.
Query CPU cost before the Lazy Map change: 57 min
Query CPU cost with Lazy Map change without this fix: > 50 days
Query CPU cost with Lazy Map change with this fix: 37 min