Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ruby] MSYS2 packages needed for Gandiva #24071

Closed
asfimport opened this issue Feb 12, 2020 · 6 comments
Closed

[Ruby] MSYS2 packages needed for Gandiva #24071

asfimport opened this issue Feb 12, 2020 · 6 comments
Assignees
Milestone

Comments

@asfimport
Copy link


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)

Environment: windows with rubyinstaller
Reporter: Dominic Sisneros / @dsisnero
Assignee: Kouhei Sutou / @kou

Note: This issue was originally created as ARROW-7843. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Kouhei Sutou / @kou:
I removed "arrow-cuda" from title because Gandiva doesn't require CUDA support.

MSYS2 has LLVM 9.0.0 package https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-clang/PKGBUILD but we supports only LLVM 7 for now. We need to support LLVM 9 to resolve this.

LLVM 8 support is working on ARROW-6841 for now.

@asfimport
Copy link
Author

Kouhei Sutou / @kou:
MSYS2 uses LLVM 10. We need to support LLVM 10 to resolve this.

@asfimport
Copy link
Author

Dominic Sisneros / @dsisnero:
Any update on Gandiva support? I want to try to create a sequel like dataset api for arrow and would like to use gandiva to compile the expressions

@asfimport
Copy link
Author

Wes McKinney / @wesm:
FYI some of us are working actively on "interpreted" execution of expressions without an LLVM dependency (see recent PR 7ad49ee)

@asfimport
Copy link
Author

@asfimport
Copy link
Author

Dominic Sisneros / @dsisnero:
Thank you - I pushed to get it uploaded to the pacman repository on the gitter channel since it was taking so long. https://gitter.im/msys2/msys2. Thanks for all your work

@asfimport asfimport added this to the 1.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants