Jackie-Jiang commented on a change in pull request #6635:
URL: https://github.com/apache/incubator-pinot/pull/6635#discussion_r587042556
##########
File path:
pinot-common/src/main/java/org/apache/pinot/common/utils/PinotDataType.java
##########
@@ -317,22 +317,24 @@ public Double convert(Object value, PinotDataType
sourceType) {
STRING {
@Override
public Integer toInteger(Object value) {
- return Integer.parseInt((String) value);
+ return Integer.valueOf(((String) value).trim());
Review comment:
Yes. Comparing with the cost of parsing the string, `trim()` should be
quite cheap. This is happening on data ingestion instead of query path, so
should be fine
----------------------------------------------------------------
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]