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:38:09 UTC

[I] PostgreSQL compatibility: `factorial` of a negative value should error [datafusion]

Dandandan opened a new issue, #22270:
URL: https://github.com/apache/datafusion/issues/22270

   Split out from #22247.
   
   ### Mismatch
   
   `factorial` of a negative value should error.
   
   ```sql
   SELECT factorial(-1);
   ```
   
   PostgreSQL:
   
   ```text
   ERROR: factorial of a negative number is undefined
   ```
   
   DataFusion:
   
   ```text
   1
   ```
   
   ### 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: `factorial` of a negative value should error [datafusion]

Posted by "kumarUjjawal (via GitHub)" <gi...@apache.org>.
kumarUjjawal commented on issue #22270:
URL: https://github.com/apache/datafusion/issues/22270#issuecomment-4476335946

   ```
   memory D SELECT factorial(-1);
   ┌───────────────┐
   │ factorial(-1) │
   │    int128     │
   ├───────────────┤
   │             1 │
   
   ```
   
   Both duckdb and datafusion is wrong here.


-- 
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: `factorial` of a negative value should error [datafusion]

Posted by "raushanprabhakar1 (via GitHub)" <gi...@apache.org>.
raushanprabhakar1 commented on issue #22270:
URL: https://github.com/apache/datafusion/issues/22270#issuecomment-4469060795

   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] PostgreSQL compatibility: `factorial` of a negative value should error [datafusion]

Posted by "kumarUjjawal (via GitHub)" <gi...@apache.org>.
kumarUjjawal closed issue #22270: PostgreSQL compatibility: `factorial` of a negative value should error
URL: https://github.com/apache/datafusion/issues/22270


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