influxdata / flux

Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.
https://influxdata.com
MIT License
769 stars 153 forks source link

[Enhancement]: Add boolean support for `min()` and `max()` #5469

Closed Nocccer closed 7 months ago

Nocccer commented 8 months ago

Description

This PR adds boolean support for the following aggregation functions:

I added this because writing this inside flux itself is really slow. You need to first split all values into numerics and bool (inefficient). Also using the reduce function is always 20% or more slower than the internal method.

Checklist

Dear Author :wave:, the following checks should be completed (or explicitly dismissed) before merging.

Dear Reviewer(s) :wave:, you are responsible (among others) for ensuring the completeness and quality of the above before approval.

Nocccer commented 8 months ago

related issues:

helenosheaa commented 7 months ago

Thank you for your contribution! There is a community owned fork of Flux that would be a great place to open a PR with your new feature. More context:

We are still supporting Flux, but are not doing active development on it or adding any new features to it. We still do security patches and will address any critical defects through the maintenance period. Our focus now is on features related to our latest database engine, InfluxDB 3.0, and its associated products (Cloud Serverless, Cloud Dedicated, Clustered, Edge).