alamb opened a new pull request #7924: URL: https://github.com/apache/arrow/pull/7924
Fix a loop bound bug in aggregate expression handling, tests for same h2. Before this PR ``` CREATE EXTERNAL TABLE repro(a INT, b INT) STORED AS CSV WITH HEADER ROW LOCATION 'repro.csv'; select sum(a), a, b from repro group by a, b; ArrowError(InvalidArgumentError("number of columns(4) must match number of fields(3) in schema")) ``` h2. After this PR: ``` CREATE EXTERNAL TABLE repro(a INT, b INT) STORED AS CSV WITH HEADER ROW LOCATION 'repro.csv'; > select sum(a), a, b from repro group by a, b; +--------+---+-----+ | sum(a) | a | b | +--------+---+-----+ | 2 | 2 | 100 | | 1 | 1 | 100 | | 2 | 2 | 200 | | 1 | 1 | 200 | | 2 | 2 | 300 | +--------+---+-----+ 5 row in set. Query took 0 seconds. ``` contents of `repro.csv` ``` a,b 1,100 1,200 2,100 2,200 2,300 ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org