GreptimeTeam / greptimedb

An open-source, cloud-native, unified time series database for metrics, logs and events with SQL/PromQL supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
4.35k stars 315 forks source link

Add support for all comparable types for `greatest` function #4991

Closed 0neSe7en closed 3 days ago

0neSe7en commented 1 week ago

What problem does the new feature solve?

The greatest function only supports date. It would be great if it could support all comparable types. For now I have to use CASE WHEN to get the greatest value.

What does the feature do?

support select greatest(v1, 100) etc.

Implementation challenges

No response

waynexia commented 1 week ago

reference to upstream: https://github.com/apache/datafusion/issues/6531