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] Multiple filter conditions in Arrow::Table.load #35915
Comments
Could you try |
@kou It seems to work, but there is another problem with the function in the filter. Now I get this error:
|
Ah, we need to create an option object for match_substring_options = Arrow::MatchSubstringOptions.new
match_substring_options.pattern = 'foo'
table = Arrow::Table.load(s3_uri, format: :parquet, filter: [:and, [:equal, :status, 200], [:match_substring, :message, match_substring_options]]) But |
@kou Unfortunately the new code gives a segmentation fault:
|
…om Hash automatically This also fixes a crash bug with `CallExpression.new(name, args, Arrow::MatchSubstringOptions.new)`. `Arrow::MatchSubstringOptions.new` is freed multiple times.
…om Hash automatically This also fixes a crash bug with `CallExpression.new(name, args, Arrow::MatchSubstringOptions.new)`. `Arrow::MatchSubstringOptions.new` is freed multiple times.
Oh, #35927 fixes it. |
…h automatically (#35927) ### Rationale for this change It's convenient. ### What changes are included in this PR? This also fixes a crash bug with `CallExpression.new(name, args, Arrow::MatchSubstringOptions.new)`. `Arrow::MatchSubstringOptions.new` is freed multiple times. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes: #35915 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Describe the enhancement requested
I have this code:
Now I would like to rewrite it more efficiently using condition pushdown:
However this code doesn't work (
invalid argument Array
for the filter).Any idea how to rewrite it correctly? I can't find any documentation about multiple filter conditions.
Component(s)
Ruby
The text was updated successfully, but these errors were encountered: