You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2026/05/16 16:37:59 UTC
[I] PostgreSQL compatibility: `array_length` of an empty array dimension should be NULL [datafusion]
Dandandan opened a new issue, #22264:
URL: https://github.com/apache/datafusion/issues/22264
Split out from #22247.
### Mismatch
`array_length` of an empty array dimension should be NULL.
```sql
SELECT array_length(array[]::int[], 1);
```
PostgreSQL:
```text
NULL
```
DataFusion:
```text
0
```
### Expected behavior
For PostgreSQL-compatible SQL semantics, DataFusion should either match PostgreSQL's result or raise the same class of domain/semantic error.
--
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] PostgreSQL compatibility: `array_length` of an empty array dimension should be NULL [datafusion]
Posted by "kumarUjjawal (via GitHub)" <gi...@apache.org>.
kumarUjjawal commented on issue #22264:
URL: https://github.com/apache/datafusion/issues/22264#issuecomment-4475490798
DuckDb
```
memory D SELECT array_length(array[]::int[], 1);
┌───────────────────────────────────────────────┐
│ array_length(CAST((ARRAY[]) AS INTEGER[]), 1) │
│ int64 │
├───────────────────────────────────────────────┤
│ 0 │
└───────────────────────────────────────────────┘
```
--
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] PostgreSQL compatibility: `array_length` of an empty array dimension should be NULL [datafusion]
Posted by "raushanprabhakar1 (via GitHub)" <gi...@apache.org>.
raushanprabhakar1 commented on issue #22264:
URL: https://github.com/apache/datafusion/issues/22264#issuecomment-4469059752
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