Andrew Lamb created ARROW-9653:
----------------------------------

             Summary: [Rust][DataFusion] Multi-column Group by: Invalid 
Argument Error 
                 Key: ARROW-9653
                 URL: https://issues.apache.org/jira/browse/ARROW-9653
             Project: Apache Arrow
          Issue Type: Bug
            Reporter: Andrew Lamb
         Attachments: repro.csv

Repro:
{code}
CREATE EXTERNAL TABLE repro(a INT, b INT)
STORED AS CSV
WITH HEADER ROW
LOCATION 'repro.csv';
{code}

The contents of repro.csv are as follows (also attached):
{code}
a,b
1,100
1,200
2,100
2,200
2,300
{code}


Then try to run the following query (to sum the values of a, grouped by b).
{code}
select sum(a), a, b from repro group by a, b;
{code}


*Expected result*: a table with three output columns: sum(a), a, and b

*Actual result*: An arrow error

{code}

> 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"))

{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to