Fx large int literal (#4168)

This commit is contained in:
HangyuanLiu
2020-07-30 00:53:50 +08:00
committed by GitHub
parent 0e79f6908b
commit abeb25d2a9
4 changed files with 4 additions and 7 deletions

View File

@ -211,7 +211,6 @@ public class ColumnDef {
break;
case LARGEINT:
LargeIntLiteral largeIntLiteral = new LargeIntLiteral(defaultValue);
largeIntLiteral.analyze(null);
break;
case FLOAT:
FloatLiteral floatLiteral = new FloatLiteral(defaultValue);

View File

@ -303,11 +303,7 @@ public class IntLiteral extends LiteralExpr {
}
return this;
} else {
//return new LargeIntLiteral(Long.toString(value));
/* LargeIntLiteral does not analyze in contructor, fixed by lide */
Expr literalExpr = new LargeIntLiteral(Long.toString(value));
literalExpr.analyze(null);
return literalExpr;
return new LargeIntLiteral(Long.toString(value));
}
} else if (targetType.isFloatingPointType()) {
return new FloatLiteral(new Double(value), targetType);

View File

@ -53,12 +53,14 @@ public class LargeIntLiteral extends LiteralExpr {
public LargeIntLiteral() {
super();
analysisDone();
}
public LargeIntLiteral(boolean isMax) throws AnalysisException {
super();
type = Type.LARGEINT;
value = isMax ? LARGE_INT_MAX : LARGE_INT_MIN;
analysisDone();
}
public LargeIntLiteral(String value) throws AnalysisException {
@ -77,6 +79,7 @@ public class LargeIntLiteral extends LiteralExpr {
}
this.value = bigInt;
type = Type.LARGEINT;
analysisDone();
}
protected LargeIntLiteral(LargeIntLiteral other) {

View File

@ -61,7 +61,6 @@ public abstract class LiteralExpr extends Expr {
break;
case LARGEINT:
literalExpr = new LargeIntLiteral(value);
literalExpr.analyze(null);
break;
case FLOAT:
case DOUBLE: