morrySnow commented on code in PR #58829:
URL: https://github.com/apache/doris/pull/58829#discussion_r2600768060
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/Bin.java:
##########
@@ -38,7 +39,8 @@ public class Bin extends ScalarFunction
implements UnaryExpression, ExplicitlyCastableSignature,
PropagateNullable {
public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
-
FunctionSignature.ret(VarcharType.SYSTEM_DEFAULT).args(BigIntType.INSTANCE)
+
FunctionSignature.ret(VarcharType.SYSTEM_DEFAULT).args(BigIntType.INSTANCE),
+
FunctionSignature.ret(VarcharType.SYSTEM_DEFAULT).args(StringType.INSTANCE)
Review Comment:
String bin(String) maybe better?
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/StringArithmetic.java:
##########
@@ -425,6 +425,43 @@ public static Expression bin(BigIntLiteral first) {
return new VarcharLiteral(Long.toBinaryString(first.getValue()));
}
+ /**
+ * Executable arithmetic functions Bin (Varchar)
+ */
+ @ExecFunction(name = "bin")
+ public static Expression bin(VarcharLiteral first) {
Review Comment:
```suggestion
public static Expression bin(StringLikeLiteral first) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]