You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our parser outputs all aggregations functions using the general sqlparser.FuncExpr. This is a little clunky and requires us to do additional checks before we are sure that the aggregation we have is valid and what it is aggregating.
I suggest we instead introduce one struct type per aggregation, and have them all implement some interface. This would help clean up the code.
Example:
type (
AggrFuncinterface {
iAggrFunc()
}
CountStarstruct {}
Countstruct {
ArgExpr
}
// and the rest
)
Tasks:
Add AST structs
Update the parser to use these structs
Find and replace uses of the old representation and use the new structs instead
The text was updated successfully, but these errors were encountered:
I think @rsajwani already started working on it and the associated PR is #10347. @rsajwani can update on the progress, and whether we can close this issue or if some part of the work is left.
Our parser outputs all aggregations functions using the general
sqlparser.FuncExpr
. This is a little clunky and requires us to do additional checks before we are sure that the aggregation we have is valid and what it is aggregating.I suggest we instead introduce one struct type per aggregation, and have them all implement some interface. This would help clean up the code.
Example:
Tasks:
The text was updated successfully, but these errors were encountered: