You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ze...@apache.org on 2023/06/19 23:28:14 UTC

[arrow] branch main updated: MINOR: [Go] add float16 and run end encoded test cases in `TestMakeFromData` (#36143)

This is an automated email from the ASF dual-hosted git repository.

zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 15d6bcb587 MINOR: [Go] add float16 and run end encoded test cases in `TestMakeFromData` (#36143)
15d6bcb587 is described below

commit 15d6bcb5872cbc4155465c857e645ac76f3746b0
Author: Igor Izvekov <iz...@gmail.com>
AuthorDate: Tue Jun 20 02:28:08 2023 +0300

    MINOR: [Go] add float16 and run end encoded test cases in `TestMakeFromData` (#36143)
    
    
    
    ### Rationale for this change
    To test all data types
    
    ### What changes are included in this PR?
    
    ### Are these changes tested?
    Yes
    
    ### Are there any user-facing changes?
    No
    
    Authored-by: izveigor <iz...@gmail.com>
    Signed-off-by: Matt Topol <zo...@gmail.com>
---
 go/arrow/array/array_test.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/go/arrow/array/array_test.go b/go/arrow/array/array_test.go
index dce9cb4dee..bae44219a8 100644
--- a/go/arrow/array/array_test.go
+++ b/go/arrow/array/array_test.go
@@ -60,6 +60,7 @@ func TestMakeFromData(t *testing.T) {
 		{name: "int16", d: &testDataType{arrow.INT16}},
 		{name: "int32", d: &testDataType{arrow.INT32}},
 		{name: "int64", d: &testDataType{arrow.INT64}},
+		{name: "float16", d: &testDataType{arrow.FLOAT16}},
 		{name: "float32", d: &testDataType{arrow.FLOAT32}},
 		{name: "float64", d: &testDataType{arrow.FLOAT64}},
 		{name: "string", d: &testDataType{arrow.STRING}, size: 3},
@@ -123,6 +124,11 @@ func TestMakeFromData(t *testing.T) {
 		{name: "extension", d: &testDataType{arrow.EXTENSION}, expPanic: true, expError: "arrow/array: DataType for ExtensionArray must implement arrow.ExtensionType"},
 		{name: "extension", d: types.NewUUIDType()},
 
+		{name: "run end encoded", d: arrow.RunEndEncodedOf(arrow.PrimitiveTypes.Int64, arrow.PrimitiveTypes.Int64), child: []arrow.ArrayData{
+			array.NewData(&testDataType{arrow.INT64}, 0 /* length */, make([]*memory.Buffer, 2 /*null bitmap, values*/), nil /* childData */, 0 /* nulls */, 0 /* offset */),
+			array.NewData(&testDataType{arrow.INT64}, 0 /* length */, make([]*memory.Buffer, 2 /*null bitmap, values*/), nil /* childData */, 0 /* nulls */, 0 /* offset */),
+		}},
+
 		// invalid types
 		{name: "invalid(-1)", d: &testDataType{arrow.Type(-1)}, expPanic: true, expError: "invalid data type: Type(-1)"},
 		{name: "invalid(63)", d: &testDataType{arrow.Type(63)}, expPanic: true, expError: "invalid data type: Type(63)"},