Skip to content

Commit 652f37f

Browse files
nokiaMSgithubgxll
authored andcommitted
[fix][coding] Fix sum issue for decimal type.
1 parent c0695ec commit 652f37f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coding/src/main/java/io/dingodb/expr/coding/ExprCoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ public CodingFlag visitUnaryAggExpr(@NonNull UnaryAggExpr expr, @NonNull OutputS
353353
if (operand instanceof Var) {
354354
Object index = ((Var) operand).getId();
355355
Byte typeCode = TypeCoder.INSTANCE.visit(operand.getType());
356-
if (index instanceof Integer) {
356+
357+
if (typeCode != null && index instanceof Integer) {
357358
switch (expr.getOp().getName()) {
358359
case CountAgg.NAME:
359360
obj.write(AGG_COUNT | typeCode);

0 commit comments

Comments
 (0)