revise the comments

This commit is contained in:
Jiebin Sun 2024-01-18 18:31:02 +08:00
parent 784cab638a
commit 206e1c87e0
2 changed files with 10 additions and 10 deletions

View File

@ -10,12 +10,12 @@
namespace DB
{
/** Rewrite the following AST to break the function `sum(column + literal)` into two individual functions
/** Rewrite the following Analyzer to break the function `sum(column +/- literal)` into two individual functions
* `sum(column)` and `literal * count(column)`.
* sum(column + literal) -> sum(column) + literal * count(column)
* sum(literal + column) -> sum(column) + literal * count(column)
* sum(column - literal) -> sum(column) - literal * count(column)
* sum(literal - column) -> sum(column) - literal * count(column)
* sum(column + literal) -> sum(column) + literal * count(column)
* sum(literal + column) -> literal * count(column) + sum(column)
* sum(column - literal) -> sum(column) - literal * count(column)
* sum(literal - column) -> literal * count(column) - sum(column)
*/
namespace

View File

@ -13,12 +13,12 @@ void RewriteSumFunctionWithSumAndCountMatcher::visit(ASTPtr & ast, const Data &
visit(*func, ast, data);
}
/** Rewrite the following AST to break the function `sum(column + literal)` into two individual functions
/** Rewrite the following AST to break the function `sum(column +/- literal)` into two individual functions
* `sum(column)` and `literal * count(column)`.
* sum(column + literal) -> sum(column) + literal * count(column)
* sum(literal + column) -> sum(column) + literal * count(column)
* sum(column - literal) -> sum(column) - literal * count(column)
* sum(literal - column) -> sum(column) - literal * count(column)
* sum(column + literal) -> sum(column) + literal * count(column)
* sum(literal + column) -> literal * count(column) + sum(column)
* sum(column - literal) -> sum(column) - literal * count(column)
* sum(literal - column) -> literal * count(column) - sum(column)
*/
void RewriteSumFunctionWithSumAndCountMatcher::visit(const ASTFunction & function, ASTPtr & ast, const Data & data)
{