[fix](cast) fix wrong result while cast string to float (#31781)

Issue Number: close #31518
This commit is contained in:
camby
2024-03-05 18:58:03 +08:00
committed by yiguolei
parent eea9b56f69
commit 2d6e975d5a
5 changed files with 9 additions and 1 deletions

View File

@ -46,6 +46,6 @@ public class FloatLiteral extends FractionalLiteral {
@Override
public LiteralExpr toLegacyLiteral() {
return new org.apache.doris.analysis.FloatLiteral((double) value, Type.FLOAT);
return new org.apache.doris.analysis.FloatLiteral(getDouble(), Type.FLOAT);
}
}