You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/26 20:08:46 UTC
[GitHub] [arrow-datafusion] andygrove opened a new issue #1890: Add support for SQL coalesce function
andygrove opened a new issue #1890:
URL: https://github.com/apache/arrow-datafusion/issues/1890
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
I would like DataFusion to support the `coalesce` SQL function.
Here is the [Postgres documentation](https://www.postgresql.org/docs/8.1/functions-conditional.html) for this function:
## 9.13.2. COALESCE
``` sql
COALESCE(value [, ...])
```
The COALESCE function returns the first of its arguments that is not null. Null is returned only if all arguments are null. It is often used to substitute a default value for null values when data is retrieved for display, for example:
``` sql
SELECT COALESCE(description, short_description, '(none)') ...
```
Like a CASE expression, COALESCE will not evaluate arguments that are not needed to determine the result; that is, arguments to the right of the first non-null argument are not evaluated. This SQL-standard function provides capabilities similar to NVL and IFNULL, which are used in some other database systems.
**Describe the solution you'd like**
As described above.
**Describe alternatives you've considered**
None
**Additional context**
This function is required by some of the queries in the TPC-DS benchmark.
--
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] xudong963 commented on issue #1890: Add support for SQL coalesce function
Posted by GitBox <gi...@apache.org>.
xudong963 commented on issue #1890:
URL: https://github.com/apache/arrow-datafusion/issues/1890#issuecomment-1066052040
> 2\. Can you please also point me to the TPC-DS benchmarks where `coalesce` is required? I did a quick search but couldn't find any.
Many sqls require `Coalesce`, you can check in https://github.com/Agirish/tpcds
--
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] msathis commented on issue #1890: Add support for SQL coalesce function
Posted by GitBox <gi...@apache.org>.
msathis commented on issue #1890:
URL: https://github.com/apache/arrow-datafusion/issues/1890#issuecomment-1063886165
Hi @andygrove, I did basic `coalesce` function in #1969. Right now i convert every argument to `string` and return a `string` from the function well. But I have a few doubts and need your help there :)
1. What data types do we need to support in `coalesce`? All primitive data types? If yes, can you please point me to a place where this is being done already which i can use it as a reference.
2. Can you please also point me to the TPC-DS benchmarks where `coalesce` is required? I did a quick search but couldn't find any.
--
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] msathis commented on issue #1890: Add support for SQL coalesce function
Posted by GitBox <gi...@apache.org>.
msathis commented on issue #1890:
URL: https://github.com/apache/arrow-datafusion/issues/1890#issuecomment-1056851565
I can take this up if no one is working on it already.
--
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