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

kou 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 fe83387f55 GH-39116: [Go] Fix CI Staticcheck (#39117)
fe83387f55 is described below

commit fe83387f5545e67dc75b47386b364faa5642dfed
Author: Matt Topol <[email protected]>
AuthorDate: Thu Dec 7 02:08:34 2023 -0500

    GH-39116: [Go] Fix CI Staticcheck (#39117)
    
    
    ### Rationale for this change
    Fixing CI Staticcheck nil check. Pretty straightforward
    
    * Closes: #39116
    
    Authored-by: Matt Topol <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 go/arrow/array/data.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/go/arrow/array/data.go b/go/arrow/array/data.go
index 3c859ec30b..ddd9cf0c89 100644
--- a/go/arrow/array/data.go
+++ b/go/arrow/array/data.go
@@ -190,7 +190,7 @@ func (d *Data) SetDictionary(dict arrow.ArrayData) {
        }
 }
 
-// SizeInBytes returns the size of the Data and any children and/or dictionary 
in bytes by 
+// SizeInBytes returns the size of the Data and any children and/or dictionary 
in bytes by
 // recursively examining the nested structures of children and/or dictionary.
 // The value returned is an upper-bound since offset is not taken into account.
 func (d *Data) SizeInBytes() uint64 {
@@ -206,8 +206,8 @@ func (d *Data) SizeInBytes() uint64 {
        for _, c := range d.Children() {
                size += c.SizeInBytes()
        }
-       if dict := d.Dictionary(); dict != nil {
-               size += dict.SizeInBytes()
+       if d.dictionary != nil {
+               size += d.dictionary.SizeInBytes()
        }
 
        return size

Reply via email to