Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7843

[Ruby] MSYS2 packages needed for Gandiva

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.16.0
    • 1.0.0
    • Ruby
    • None
    • windows with rubyinstaller

    Description

      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)
      

      Attachments

        Activity

          People

            kou Kouhei Sutou
            dsisnero Dominic Sisneros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: