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 17:50:59 UTC

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

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


##########
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:
   We should probably get the unit either from a Reader option or a given Schema instead of assuming millisecond here.



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