mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-23 04:12:32 +00:00
* refactor(promql): centralize PromQL function registration in promql::functions Move the PromQL scalar UDF and UDAF registrations out of the query plan decoder into a single `promql::functions::register_promql_functions` entry point, so plan decoding no longer has to enumerate every PromQL function implementation. The registered function set, aliases (e.g. `prom_holt_winters`) and registration order are unchanged. Add a registration test pinning the full set of `prom_*` scalar functions and the `prom_holt_winters` alias, plus a decode regression test covering the centralized registration path. Fixes #9493 Signed-off-by: fengyue-xve <1759519137@qq.com> * refactor(promql): register Ieee UDFs centrally and address review Rebase onto main picked up #9479, which registered the Ieee comparison and sqrt UDFs from the decoder directly. Register them from `register_promql_functions` instead so the single entry point stays complete, and add the seven `prom_eq`..`prom_sqrt` names to the registration test. Also per review: drop the doc paragraph that explains why the function was moved, drop the redundant `test_serializer_decode_centralized_promql_registration` test and the registration comment in the decoder, move `use std::sync::Arc` up with the imports, and simplify the registration test assertions. Signed-off-by: 风月 <1759519137@qq.com> Signed-off-by: fengyue-xve <1759519137@qq.com> --------- Signed-off-by: fengyue-xve <1759519137@qq.com> Signed-off-by: 风月 <1759519137@qq.com>