Skip to content

Commit

Permalink
[chore](planner) change decimal literal toSql as plainString (#41809)
Browse files Browse the repository at this point in the history
pick from master #41809

for example, 0 with decimal(38,4) will return 0.0000
  • Loading branch information
morrySnow committed Oct 24, 2024
1 parent c1bc061 commit f29e7ef
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public String toSqlImpl() {

@Override
public String getStringValue() {
return value.toString();
return value.toPlainString();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,14 @@ public boolean equals(Object o) {
DecimalLiteral literal = (DecimalLiteral) o;
return Objects.equals(dataType, literal.dataType);
}

@Override
public String toSql() {
return value.toPlainString();
}

@Override
public String toString() {
return toSql();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,14 @@ public boolean equals(Object o) {
DecimalV3Literal literal = (DecimalV3Literal) o;
return Objects.equals(dataType, literal.dataType);
}

@Override
public String toSql() {
return value.toPlainString();
}

@Override
public String toString() {
return toSql();
}
}

0 comments on commit f29e7ef

Please sign in to comment.