You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2025/09/29 16:39:04 UTC
[I] Error with `generate_seires`: Invalid argument error: number of columns must match number of fields in schema [datafusion]
alamb opened a new issue, #17830:
URL: https://github.com/apache/datafusion/issues/17830
### Describe the bug
This query should work but errors
### To Reproduce
```sql
> SELECT v1 FROM (select "value" as v1 from generate_series(1, 100) as g1), (select "value" as v2 from generate_series(1, 100) as g2);
Arrow error: Invalid argument error: number of columns(2) must match number of fields(1) in schema
```
### Expected behavior
The equivalent query works fine in DuckDB:
```sql
D SELECT v1 FROM (SELECT * FROM (select "generate_series" as v1 from generate_series(1, 100) as g1), (select "generate_series" as v2 from generate_series(1, 100) as g2));
┌────────────┐
│ v1 │
│ int64 │
├────────────┤
│ 1 │
│ 2 │
│ 3 │
│ 4 │
│ 5 │
│ 6 │
│ 7 │
│ 8 │
│ 9 │
...
│ 96 │
│ 97 │
│ 98 │
│ 99 │
│ 100 │
├────────────┤
│ 10000 rows │
│ (40 shown) │
└────────────┘
```
### Additional context
It seems like it is related to `generate_series` as an equivalent query with tables seems to work fine
```sql
> create table g1 as values (1);
0 row(s) fetched.
Elapsed 0.004 seconds.
> create table g2 as values (1);
0 row(s) fetched.
Elapsed 0.001 seconds.
> select g1.column1 from (select * from g1) CROSS JOIN (select * from g2);
+---------+
| column1 |
+---------+
| 1 |
+---------+
```
--
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.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Error with `generate_series`: Invalid argument error: number of columns must match number of fields in schema [datafusion]
Posted by "mkleen (via GitHub)" <gi...@apache.org>.
mkleen commented on issue #17830:
URL: https://github.com/apache/datafusion/issues/17830#issuecomment-3430784481
FYI, I am still on it, but I am new to the project and I need some time to get into the details.
--
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.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Error with `generate_series`: Invalid argument error: number of columns must match number of fields in schema [datafusion]
Posted by "mkleen (via GitHub)" <gi...@apache.org>.
mkleen commented on issue #17830:
URL: https://github.com/apache/datafusion/issues/17830#issuecomment-3356169255
take
--
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.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Error with `generate_series`: Invalid argument error: number of columns must match number of fields in schema [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #17830:
URL: https://github.com/apache/datafusion/issues/17830#issuecomment-3348006462
Another variation that fials
```sql
> create table t as select "value" as v1 from generate_series(1, 100);
0 row(s) fetched.
Elapsed 0.004 seconds.
> select v1 from t CROSS JOIN generate_series(1,1000);
Arrow error: Invalid argument error: number of columns(2) must match number of fields(1) in schema
```
--
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.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Error with `generate_series`: Invalid argument error: number of columns must match number of fields in schema [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #17830: Error with `generate_series`: Invalid argument error: number of columns must match number of fields in schema
URL: https://github.com/apache/datafusion/issues/17830
--
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.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org