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/07 18:43:13 UTC

[arrow] branch main updated: GH-35982: [Go] Fix go1.18 broken builds (#35983)

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 08caf008b1 GH-35982: [Go] Fix go1.18 broken builds (#35983)
08caf008b1 is described below

commit 08caf008b1bf2e93c70ae7db7531425bb9d4592e
Author: Matt Topol <zo...@gmail.com>
AuthorDate: Wed Jun 7 14:43:04 2023 -0400

    GH-35982: [Go] Fix go1.18 broken builds (#35983)
    
    
    ### Rationale for this change
    Fix usage of deprecated functions to fix the Go 1.18 builds.
    
    * Closes: #35982
    
    Authored-by: Matt Topol <zo...@gmail.com>
    Signed-off-by: Matt Topol <zo...@gmail.com>
---
 go/arrow/compute/exprs/exec.go  | 4 ++--
 go/arrow/compute/exprs/types.go | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/go/arrow/compute/exprs/exec.go b/go/arrow/compute/exprs/exec.go
index 74e6435b8d..a8305cade2 100644
--- a/go/arrow/compute/exprs/exec.go
+++ b/go/arrow/compute/exprs/exec.go
@@ -285,7 +285,7 @@ func literalToDatum(mem memory.Allocator, lit expr.Literal, ext ExtensionIDSet)
 				return nil, fmt.Errorf("%w: key type mismatch for %s, got key with type %s",
 					arrow.ErrInvalid, mapType, scalarKey.DataType())
 			}
-			if !arrow.TypeEqual(mapType.ValueType(), scalarValue.DataType()) {
+			if !arrow.TypeEqual(mapType.ItemType(), scalarValue.DataType()) {
 				return nil, fmt.Errorf("%w: value type mismatch for %s, got key with type %s",
 					arrow.ErrInvalid, mapType, scalarValue.DataType())
 			}
@@ -293,7 +293,7 @@ func literalToDatum(mem memory.Allocator, lit expr.Literal, ext ExtensionIDSet)
 			keys[i], values[i] = scalarKey, scalarValue
 		}
 
-		keyBldr, valBldr := array.NewBuilder(mem, mapType.KeyType()), array.NewBuilder(mem, mapType.ValueType())
+		keyBldr, valBldr := array.NewBuilder(mem, mapType.KeyType()), array.NewBuilder(mem, mapType.ItemType())
 		defer keyBldr.Release()
 		defer valBldr.Release()
 
diff --git a/go/arrow/compute/exprs/types.go b/go/arrow/compute/exprs/types.go
index f169f18d4b..8e6934ae50 100644
--- a/go/arrow/compute/exprs/types.go
+++ b/go/arrow/compute/exprs/types.go
@@ -623,7 +623,7 @@ func ToSubstraitType(dt arrow.DataType, nullable bool, ext ExtensionIDSet) (type
 		if err != nil {
 			return nil, err
 		}
-		valueType, err := ToSubstraitType(dt.ValueType(), dt.ValueField().Nullable, ext)
+		valueType, err := ToSubstraitType(dt.Elem(), dt.ElemField().Nullable, ext)
 		if err != nil {
 			return nil, err
 		}