[feature](Nereids) support agg state type in create table (#32171)

this PR introduce a behavior change, syntax of create table with agg_state type is changed.
This commit is contained in:
morrySnow
2024-03-14 14:57:32 +08:00
committed by yiguolei
parent 62023d705d
commit ea2fbfaffa
24 changed files with 121 additions and 111 deletions

View File

@ -72,7 +72,7 @@ public class AggStateType extends ScalarType {
@Override
public String toSql(int depth) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("AGG_STATE(");
stringBuilder.append("AGG_STATE<").append(functionName).append("(");
for (int i = 0; i < subTypes.size(); i++) {
if (i > 0) {
stringBuilder.append(", ");
@ -82,7 +82,7 @@ public class AggStateType extends ScalarType {
stringBuilder.append(" NULL");
}
}
stringBuilder.append(")");
stringBuilder.append(")>");
return stringBuilder.toString();
}