zeroshade commented on code in PR #13098:
URL: https://github.com/apache/arrow/pull/13098#discussion_r873053090


##########
go/arrow/csv/reader.go:
##########
@@ -321,6 +324,10 @@ func (r *Reader) initFieldConverter(field *arrow.Field) 
func(array.Builder, stri
                                field.(*array.StringBuilder).Append(str)
                        }
                }
+       case *arrow.TimestampType:
+               return func(field array.Builder, str string) {
+                       r.parseTimestamp(field, str)
+               }

Review Comment:
   rather than using a `WithTimestampUnit` option, just change this switch to 
be: `switch dt := field.Type.(type)` and then pass `dt.Unit` to the 
`parseTimestamp` function. We don't need the extra option since we *require* a 
schema currently.
   
   The `WithTimestampUnit` option could be useful if we add functionality to 
infer the types from the columns rather than requiring a schema.



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

Reply via email to