### Describe the bug, including details regarding any error messages, version, and platform. In grouper.cc, allocated a random uint32_t size memory because of using uninitialized offset vector when `group_nums == 0` see pr: https://github.com/apache/arrow/pull/43123 <img width="1094" alt="image" src="https://github.com/apache/arrow/assets/39670222/03f89efd-6495-4a54-8149-e6c6f3972dea"> ### Component(s) C++