You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Dominic Sisneros (Jira)" <ji...@apache.org> on 2020/02/12 21:54:00 UTC

[jira] [Created] (ARROW-7843) [Ruby] MSYS2 packages needed for arrow-gandiva arrow-cuda

Dominic Sisneros created ARROW-7843:
---------------------------------------

             Summary: [Ruby] MSYS2 packages needed for arrow-gandiva arrow-cuda
                 Key: ARROW-7843
                 URL: https://issues.apache.org/jira/browse/ARROW-7843
             Project: Apache Arrow
          Issue Type: Bug
          Components: Ruby
    Affects Versions: 0.16.0
         Environment: windows with rubyinstaller
            Reporter: Dominic Sisneros


require "gandiva"

table = Arrow::Table.new(:field1 => Arrow::Int32Array.new([1, 2, 3, 4]),
                         :field2 => Arrow::Int32Array.new([11, 13, 15, 17]))
schema = table.schema

expression1 = schema.build_expression do |record|
  record.field1 + record.field2
end

expression2 = schema.build_expression do |record, context|
  context.if(record.field1 > record.field2)
    .then(record.field1 / record.field2)
    .else(record.field1)
end

projector = Gandiva::Projector.new(schema, [expression1, expression2])
table.each_record_batch do |record_batch|
  outputs = projector.evaluate(record_batch)
  puts outputs.collect(&:values)
end

C:\Users\Dominic E Sisneros\source\repos\ruby\try_arrow>ruby gandiva_test2.rb
Traceback (most recent call last):
        2: from gandiva_test2.rb:1:in `<main>'
        1: from c:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
c:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- gandiva (LoadError)
        9: from gandiva_test2.rb:1:in `<main>'
        8: from c:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:156:in `require'
        7: from c:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `rescue in require'
        6: from c:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:168:in `require'
        5: from c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/red-gandiva-0.16.0/lib/gandiva.rb:24:in `<top (required)>'
        4: from c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/red-gandiva-0.16.0/lib/gandiva.rb:28:in `<module:Gandiva>'
        3: from c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/red-gandiva-0.16.0/lib/gandiva/loader.rb:22:in `load'
        2: from c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/gobject-introspection-3.4.1/lib/gobject-introspection/loader.rb:25:in `load'
        1: from c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/gobject-introspection-3.4.1/lib/gobject-introspection/loader.rb:37:in `load'
c:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/gobject-introspection-3.4.1/lib/gobject-introspection/loader.rb:37:in `require': Typelib file for namespace 'Gandiva' (any version) not found (GObjectIntrospection::RepositoryError::TypelibNotFound)




--
This message was sent by Atlassian Jira
(v8.3.4#803005)