You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "yevgenypats (via GitHub)" <gi...@apache.org> on 2023/03/07 20:54:04 UTC

[GitHub] [arrow] yevgenypats commented on a diff in pull request #34343: GH-34334: [Go][CSV] Support list fields

yevgenypats commented on code in PR #34343:
URL: https://github.com/apache/arrow/pull/34343#discussion_r1128574767


##########
go/arrow/csv/reader.go:
##########
@@ -721,6 +726,32 @@ func (r *Reader) parseDecimal256(field array.Builder, str string, prec, scale in
 	field.(*array.Decimal256Builder).Append(val)
 }
 
+func (r *Reader) parseList(field array.Builder, str string) {
+	if r.isNull(str) {
+		field.AppendNull()
+		return
+	}
+	if !(strings.HasPrefix(str, "{") || strings.HasSuffix(str, "}")) {
+		r.err = errors.New("invalid list format. should start with '{' and end with '}'")
+		field.AppendNull()
+		return
+	}

Review Comment:
   Good catch. Fixed and added tests.



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