[fix](map_agg) lost scale information for decimal type (#23776)

This commit is contained in:
Jerry Hu
2023-09-02 08:03:33 +08:00
committed by GitHub
parent e5d1248c72
commit 68aa4867b0
4 changed files with 69 additions and 13 deletions

View File

@ -1550,6 +1550,10 @@ public class FunctionCallExpr extends Expr {
fn.setReturnType(new ArrayType(getChild(0).type));
}
if (fnName.getFunction().equalsIgnoreCase("map_agg")) {
fn.setReturnType(new MapType(getChild(0).type, getChild(1).type));
}
if (fnName.getFunction().equalsIgnoreCase("group_uniq_array")
|| fnName.getFunction().equalsIgnoreCase("group_array")) {
fn.setReturnType(new ArrayType(getChild(0).type));