### What problem does this PR solve?
Fix hierarchical_merge function. From idx vs. actual value to actual
value vs. actual value.
Related issue #4003
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Co-authored-by: luopan <luopan@example.com>