Skip to content

Commit ae75398

Browse files
nokiaMSgithubgxll
authored andcommitted
[feat][expr] Decimal pushdown - fix scale.
1 parent bebd0a4 commit ae75398

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

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

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -233,35 +233,19 @@ public CodingFlag visitBinaryOpExpr(@NonNull BinaryOpExpr expr, OutputStream obj
233233
switch (expr.getOpType()) {
234234
case ADD:
235235
t = (Type) expr.getOp().getKey();
236-
if (t instanceof DecimalType) {
237-
success = false;
238-
} else {
239-
success = writeOpWithType(obj, ADD, (Type) expr.getOp().getKey());
240-
}
236+
success = writeOpWithType(obj, ADD, (Type) expr.getOp().getKey());
241237
break;
242238
case SUB:
243239
t = (Type) expr.getOp().getKey();
244-
if (t instanceof DecimalType) {
245-
success = false;
246-
} else {
247-
success = writeOpWithType(obj, SUB, (Type) expr.getOp().getKey());
248-
}
240+
success = writeOpWithType(obj, SUB, (Type) expr.getOp().getKey());
249241
break;
250242
case MUL:
251243
t = (Type) expr.getOp().getKey();
252-
if (t instanceof DecimalType) {
253-
success = false;
254-
} else {
255-
success = writeOpWithType(obj, MUL, (Type) expr.getOp().getKey());
256-
}
244+
success = writeOpWithType(obj, MUL, (Type) expr.getOp().getKey());
257245
break;
258246
case DIV:
259247
t = (Type) expr.getOp().getKey();
260-
if (t instanceof DecimalType) {
261-
success = false;
262-
} else {
263-
success = writeOpWithType(obj, DIV, (Type) expr.getOp().getKey());
264-
}
248+
success = writeOpWithType(obj, DIV, (Type) expr.getOp().getKey());
265249
break;
266250
case EQ:
267251
success = writeOpWithType(obj, EQ, (Type) expr.getOp().getKey());

0 commit comments

Comments
 (0)