You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/07/25 14:17:27 UTC
[GitHub] [arrow-datafusion] alamb opened a new issue, #7087: `unnest` is inconsistent with ClickHouse and DuckDB
alamb opened a new issue, #7087:
URL: https://github.com/apache/arrow-datafusion/issues/7087
From the point of view of all our reference databases, this output is incorrect:
PostgreSQL:
```
postgres=# select * from unnest_example;
c1 | c2
-------+----
{1,2} | A
| B
{} | D
{3} | E
(4 rows)
postgres=# select unnest(c1), c2 from unnest_example;
unnest | c2
--------+----
1 | A
2 | A
3 | E
(3 rows)
```
DuckDB:
```
D select * from unnest_example;
┌─────────┬─────────┐
│ c1 │ c2 │
│ int32[] │ varchar │
├─────────┼─────────┤
│ [1, 2] │ A │
│ │ B │
│ [] │ D │
│ [3] │ E │
└─────────┴─────────┘
D select unnest(c1), c2 from unnest_example;
┌────────────┬─────────┐
│ unnest(c1) │ c2 │
│ int32 │ varchar │
├────────────┼─────────┤
│ 1 │ A │
│ 2 │ A │
│ 3 │ E │
└────────────┴─────────┘
```
ClickHouse:
```
SELECT *
FROM unnest_example
Query id: be77ac76-c0ee-454a-968c-fa07afcf732d
┌─c1────┬─c2─┐
│ [] │ B │
│ [] │ D │
│ [1,2] │ A │
│ [3] │ E │
└───────┴────┘
4 rows in set. Elapsed: 0.001 sec.
DESKTOP-HM8OC4I. :) select arrayJoin(c1), c2 from unnest_example;
SELECT
arrayJoin(c1),
c2
FROM unnest_example
Query id: 3b8d0451-54f5-4a9a-8938-5505fe75a9df
┌─arrayJoin(c1)─┬─c2─┐
│ 1 │ A │
│ 2 │ A │
│ 3 │ E │
└───────────────┴────┘
3 rows in set. Elapsed: 0.001 sec.
```
_Originally posted by @izveigor in https://github.com/apache/arrow-datafusion/pull/7044#discussion_r1269908881_
--
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@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on issue #7087: `unnest` is inconsistent with ClickHouse and DuckDB
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #7087:
URL: https://github.com/apache/arrow-datafusion/issues/7087#issuecomment-1691699225
Note that after @smiklos 's work in https://github.com/apache/arrow-datafusion/pull/7371 🎉 all that remains for this ticket is to change the default setting of `preserve_nulls` for SQL's unnest
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `unnest` is inconsistent with ClickHouse and DuckDB [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #7087: `unnest` is inconsistent with ClickHouse and DuckDB
URL: https://github.com/apache/arrow-datafusion/issues/7087
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on issue #7087: `unnest` is inconsistent with ClickHouse and DuckDB
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #7087:
URL: https://github.com/apache/arrow-datafusion/issues/7087#issuecomment-1649935885
The proposal https://github.com/apache/arrow-datafusion/pull/7044#discussion_r1271318525. I think is to make preserving nulls an option but to default to using
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org