You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2019/12/05 13:40:41 UTC
[GitHub] [incubator-doris] imay commented on a change in pull request #2362:
[FIX] fix arithmetic operation between numeric and non-numeric
imay commented on a change in pull request #2362: [FIX] fix arithmetic operation between numeric and non-numeric
URL: https://github.com/apache/incubator-doris/pull/2362#discussion_r354317412
##########
File path: fe/src/main/java/org/apache/doris/analysis/StringLiteral.java
##########
@@ -169,6 +195,75 @@ private LiteralExpr convertToDate(Type targetType) throws AnalysisException {
return newLiteral;
}
+ /***
+ * get leading nums, e.g.
+ * 123 -> 123
+ * 123a -> 123
+ * -123 -> -123
+ * 123.123 -> 123.123
+ * 123e4 -> 123e4
+ * 123e-4 -> 123e-4
+ * @param str
+ * @return
+ */
+ protected static String leadingNum(String str) {
+ String in = str.trim();
Review comment:
```suggestion
String in = str.trim();
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org