You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "dssysolyatin (via GitHub)" <gi...@apache.org> on 2023/04/08 07:47:37 UTC

[GitHub] [calcite] dssysolyatin commented on pull request #3142: [CALCITE-5634] Add LEAST, GREATEST for PostgreSQL

dssysolyatin commented on PR #3142:
URL: https://github.com/apache/calcite/pull/3142#issuecomment-1500817407

   It turned out that it is not enough to just enable this function. PostgreSQL's LEAST, GREATEST functions behave differently with NULL values than ORACLE or BigQuery:
   
   From BigQuery documentation [1]:
   ```
   They return NULL if any of the input parameters is NULL.
   ```
   
   From PostgreSQL documentation [2]:
   ```
   The result will be NULL only if all the expressions evaluate to NULL.
   ```
   
   [1] https://cloud.google.com/bigquery/docs/reference/standard-sql/mathematical_functions
   [2] https://www.postgresql.org/docs/15/functions-conditional.html#FUNCTIONS-GREATEST-LEAST


-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org