You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/28 14:35:11 UTC

[GitHub] [arrow] WilliamWhispell opened a new pull request, #13451: Fix csv reader errors clobbered by subsequent reads

WilliamWhispell opened a new pull request, #13451:
URL: https://github.com/apache/arrow/pull/13451

   Currently you can reproduce this issue by reading a csv file with garbage string values where float64 are expected. If you place the bad data in the first part of the file, then subsequent r.r.Read() will clobber the parse err that was set inside r.read(rec)
   
   
   So at the bottom of the loop body, r.read(rec) is called, we end up in func (r *Reader) parseFloat64(field array.Builder, str string)
   it encounters an error, and sets err on the reader: 
   v, err := strconv.ParseFloat(str, 64)
   	if err != nil && r.err == nil {
   		r.err = err
   		field.AppendNull()
   		return
   	}
   
   However, when we come back out of the call to the loop, we advance in the for loop without checking the err and on the subsequent call to r.r.Read() we clobber the r.err.
   
   
   This means that if the last chunk has no error, after we read the csv, calls to r.Err() on the reader will return nil, even though an err took place during parse.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade commented on pull request #13451: ARROW-16926: [Go] Fix csv reader errors clobbered by subsequent reads

Posted by GitBox <gi...@apache.org>.
zeroshade commented on PR #13451:
URL: https://github.com/apache/arrow/pull/13451#issuecomment-1168913588

   @WilliamWhispell Can you add a unit test for this?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13451: ARROW-16926: [Go] Fix csv reader errors clobbered by subsequent reads

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13451:
URL: https://github.com/apache/arrow/pull/13451#issuecomment-1168981024

   :warning: Ticket **has not been started in JIRA**, please click 'Start Progress'.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13451: Fix csv reader errors clobbered by subsequent reads

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13451:
URL: https://github.com/apache/arrow/pull/13451#issuecomment-1168809039

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/master/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW
   
   Opening JIRAs ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename pull request title in the following format?
   
       ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade commented on pull request #13451: ARROW-????: [Go] Fix csv reader errors clobbered by subsequent reads

Posted by GitBox <gi...@apache.org>.
zeroshade commented on PR #13451:
URL: https://github.com/apache/arrow/pull/13451#issuecomment-1168828415

   @WilliamWhispell please file a JIRA issue and update the title to reflect the issue number? Thanks!


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13451: ARROW-16926: [Go] Fix csv reader errors clobbered by subsequent reads

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13451:
URL: https://github.com/apache/arrow/pull/13451#issuecomment-1168980994

   https://issues.apache.org/jira/browse/ARROW-16926


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] zeroshade merged pull request #13451: ARROW-16926: [Go] Fix csv reader errors clobbered by subsequent reads

Posted by GitBox <gi...@apache.org>.
zeroshade merged PR #13451:
URL: https://github.com/apache/arrow/pull/13451


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org