[ 
https://issues.apache.org/jira/browse/DRILL-8004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17420034#comment-17420034
 ] 

ASF GitHub Bot commented on DRILL-8004:
---------------------------------------

luocooong commented on a change in pull request #2322:
URL: https://github.com/apache/drill/pull/2322#discussion_r715965836



##########
File path: 
contrib/storage-splunk/src/main/java/org/apache/drill/exec/store/splunk/SplunkBatchReader.java
##########
@@ -370,7 +370,17 @@ public void load(String[] record) {
     @Override
     public void load(String[] record) {
       if (record[columnIndex] != null) {
-        int value = Integer.parseInt(record[columnIndex]);
+        // Splunk may include extra garbage such as newlines or other 
whitespace in INT fields.
+        String stringValue = record[columnIndex];
+        stringValue = stringValue.replaceAll("\\s","");

Review comment:
       Keep a whitespace between the "," and "".




-- 
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]


> Splunk Sends Newlines in INT Fields, Causing Exceptions
> -------------------------------------------------------
>
>                 Key: DRILL-8004
>                 URL: https://issues.apache.org/jira/browse/DRILL-8004
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Other
>    Affects Versions: 1.19.0
>            Reporter: Charles Givre
>            Assignee: Charles Givre
>            Priority: Major
>             Fix For: 1.20.0
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to