incubator-gluten
incubator-gluten copied to clipboard
[GLUTEN-7470] [CH] fix exception when same names in group by
What changes were proposed in this pull request?
This pr fix two problems, one is that when group by has same names, the duplicated names will be remove by distinct in genHashAggregateExecTransformer, and cause Missmatch result columns size exception. The other is that when group by has same names but with different qualifier due to alias table name, the same names are passed to clickhouse, and cause Mismatch output schema exception. The solution is that we distinct the groupings in Agg by ignoring qualifier, and insert a Project if has same names.
(Fixes: #7470)
How was this patch tested?
This patch was tested by unit tests.