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/05/12 21:00:02 UTC

[GitHub] [arrow] wolfeidau commented on a diff in pull request #13098: ARROW-16504 [Go][CSV] Add arrow.TimestampType support to the reader

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


##########
go/arrow/csv/reader.go:
##########
@@ -507,6 +511,23 @@ func (r *Reader) parseFloat64(field array.Builder, str string) {
 	field.(*array.Float64Builder).Append(v)
 }
 
+// parses timestamps using millisecond precision
+func (r *Reader) parseTimestamp(field array.Builder, str string) {
+	if r.isNull(str) {
+		field.AppendNull()
+		return
+	}
+
+	v, err := arrow.TimestampFromString(str, arrow.Millisecond)

Review Comment:
   @zeroshade great suggestion, I have added the option.



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