Description
I explored a bit and I think this is a piece missing in CALCITE-1038. Introducing a Project operator below as part of the rewriting was removed, and thus, there is no need to adjust the indices of the aggregation function parameters. However, the code is still there.