zeroshade commented on code in PR #13828:
URL: https://github.com/apache/arrow/pull/13828#discussion_r941803598
##########
go/arrow/array/record_test.go:
##########
@@ -135,8 +135,8 @@ func TestRecord(t *testing.T) {
{
schema: schema,
cols: nil,
- rows: -1,
- err: fmt.Errorf("arrow/array: number of
columns/fields mismatch"),
+ rows: 0,
+ // err: fmt.Errorf("arrow/array: number of
columns/fields mismatch"),
Review Comment:
ah, so prior to these changes attempting to construct an empty record
without having *actual* empty arrays was failing. But several of the tests and
examples involve passing an empty record batch. So I made a change allowing
someone to pass either a nil slice or a len(0) slice of columns *only* when
rows == 0 as a shortcut to making an empty record without having to create a
full slice of empty arrays for the columns.
I should probably remove the comment there.
--
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]