You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/09/21 02:59:51 UTC

[GitHub] [doris] Yukang-LIAN opened a new issue, #12800: [Enhancement]Try to implement Retention function

Yukang-LIAN opened a new issue, #12800:
URL: https://github.com/apache/doris/issues/12800

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Description
   
   The `retention` function takes as arguments a set of conditions from 1 to 32 arguments of type `UInt8` that indicate whether a certain condition was met for the event. Any condition can be specified as an argument (as in [WHERE](https://clickhouse.com/docs/en/sql-reference/statements/select/where#select-where)).
   
   The conditions, except the first, apply in pairs: the result of the second will be true if the first and second are true, of the third if the first and third are true, etc.
   
   Syntax
   retention(cond1, cond2, ..., cond32);
   
   Arguments
   `cond` — An expression that returns a `UInt8` result (1 or 0).
   
   Returned value
   The array of 1 or 0.
   
   1 — Condition was met for the event.
   0 — Condition wasn’t met for the event.
   Type: `UInt8`.
   
   ### Solution
   
   Refer to [link1](https://clickhouse.com/docs/zh/sql-reference/aggregate-functions/parametric-functions/#retention), [link2](https://github.com/apache/doris/pull/8485/files), [link3](https://github.com/apache/doris/pull/9338/files#diff-f0e1a6c2607c5fa2caa2c8f2ef12a2548dabdfa35f69dbf9a50e9c2fcb1386bf),[link4](https://github.com/ClickHouse/ClickHouse/tree/7616216f1093b09605899b225a650e64b99b9a5d/src/AggregateFunctions) for implementing retention functions, regression testing and docs.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] HappenLee closed issue #12800: [Enhancement]Try to implement Retention function

Posted by GitBox <gi...@apache.org>.
HappenLee closed issue #12800: [Enhancement]Try to implement Retention function
URL: https://github.com/apache/doris/issues/12800


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org