Merge pull request #46166 from ClickHouse/vdimir/doc/optimize_rewrite_aggregate_function_with_if

This commit is contained in:
Vladimir C 2023-02-09 11:00:18 +01:00 committed by GitHub
commit 41a3536227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3310,6 +3310,15 @@ SELECT
FROM fuse_tbl
```
## optimize_rewrite_aggregate_function_with_if
Rewrite aggregate functions with if expression as argument when logically equivalent.
For example, `avg(if(cond, col, null))` can be rewritten to `avgOrNullIf(cond, col)`. It may improve performance.
:::note
Supported only with experimental analyzer (`allow_experimental_analyzer = 1`).
:::
## allow_experimental_database_replicated {#allow_experimental_database_replicated}
Enables to create databases with [Replicated](../../engines/database-engines/replicated.md) engine.