You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2018/11/02 00:39:36 UTC

[arrow] branch master updated: ARROW-3682: [Go] unexport encoding/csv.Reader from CSV reader

This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 84ac1dc  ARROW-3682: [Go] unexport encoding/csv.Reader from CSV reader
84ac1dc is described below

commit 84ac1dc533fa0a22d08d1798c78511014ff0c87a
Author: Sebastien Binet <bi...@cern.ch>
AuthorDate: Fri Nov 2 09:39:20 2018 +0900

    ARROW-3682: [Go] unexport encoding/csv.Reader from CSV reader
    
    needs #2891
    
    Author: Sebastien Binet <bi...@cern.ch>
    
    Closes #2892 from sbinet/issue-3682 and squashes the following commits:
    
    48e8379b <Sebastien Binet> ARROW-3682:  unexport encoding/csv.Reader from CSV reader
---
 go/arrow/csv/csv.go | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/go/arrow/csv/csv.go b/go/arrow/csv/csv.go
index a572499..36f3abd 100644
--- a/go/arrow/csv/csv.go
+++ b/go/arrow/csv/csv.go
@@ -43,14 +43,14 @@ type Option func(*Reader)
 // WithComment specifies the comment character used while parsing CSV files.
 func WithComment(c rune) Option {
 	return func(r *Reader) {
-		r.R.Comment = c
+		r.r.Comment = c
 	}
 }
 
 // WithComma specifies the fields separation character used while parsing CSV files.
 func WithComma(c rune) Option {
 	return func(r *Reader) {
-		r.R.Comma = c
+		r.r.Comma = c
 	}
 }
 
@@ -63,7 +63,7 @@ func WithAllocator(mem memory.Allocator) Option {
 
 // Reader wraps encoding/csv.Reader and creates array.Records from a schema.
 type Reader struct {
-	R      *csv.Reader
+	r      *csv.Reader
 	schema *arrow.Schema
 
 	refs int64
@@ -82,7 +82,7 @@ type Reader struct {
 func NewReader(r io.Reader, schema *arrow.Schema, opts ...Option) *Reader {
 	validate(schema)
 
-	rr := &Reader{R: csv.NewReader(r), schema: schema, refs: 1}
+	rr := &Reader{r: csv.NewReader(r), schema: schema, refs: 1}
 	for _, opt := range opts {
 		opt(rr)
 	}
@@ -122,7 +122,7 @@ func (r *Reader) Next() bool {
 	}
 
 	var recs []string
-	recs, r.err = r.R.Read()
+	recs, r.err = r.r.Read()
 	if r.err != nil {
 		if r.err == io.EOF {
 			r.err = nil