kangkaisen commented on a change in pull request #4445:
URL: https://github.com/apache/incubator-doris/pull/4445#discussion_r476394115
##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
##########
@@ -386,6 +386,17 @@ public static Type getAssignmentCompatibleType(Type t1,
Type t2, boolean strict)
return ScalarType.INVALID;
}
+ /**
+ * Returns Type.BIGINT if this type could parse to long, otherwise
Type.DOUBLE.
+ */
+ public static Long tryParseToLong(Expr expectStringExpr){
+ if(expectStringExpr instanceof StringLiteral) {
Review comment:
```suggestion
if (expectStringExpr instanceof StringLiteral) {
```
##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
##########
@@ -386,6 +386,17 @@ public static Type getAssignmentCompatibleType(Type t1,
Type t2, boolean strict)
return ScalarType.INVALID;
}
+ /**
+ * Returns Type.BIGINT if this type could parse to long, otherwise
Type.DOUBLE.
Review comment:
update comment
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]