[fix](variable) support all type functions (#39144) (#39438)

pick from master #39144
This commit is contained in:
morrySnow
2024-08-16 09:51:02 +08:00
committed by GitHub
parent 887d4fc42e
commit 4380f3cb51
3 changed files with 7 additions and 2 deletions

View File

@ -555,7 +555,7 @@ public class ConnectContext {
} else if (literalExpr instanceof NullLiteral) {
return Literal.of(null);
} else {
return Literal.of("");
return Literal.of(literalExpr.getStringValue());
}
} else {
// If there are no such user defined var, just return the NULL value.
@ -585,7 +585,7 @@ public class ConnectContext {
desc.setIsNull();
} else {
desc.setType(Type.VARCHAR);
desc.setStringValue("");
desc.setStringValue(literalExpr.getStringValue());
}
} else {
// If there are no such user defined var, just fill the NULL value.