kou commented on code in PR #34952: URL: https://github.com/apache/arrow/pull/34952#discussion_r1161074590
########## ruby/red-arrow/test/test-slicer.rb: ########## @@ -528,5 +540,40 @@ def setup 2 window TABLE end + + test("match_like") do + sliced_table = @table.slice do |slicer| + slicer.string.match_like("_rr%") + end + assert_equal(<<~TABLE, sliced_table.to_s) + string +0 array +1 Arrow +2 (null) + TABLE + end + + test("match_substring_regex") do + sliced_table = @table.slice do |slicer| + slicer.string.match_substring_regex("[dr]ow") Review Comment: Ah, we may not need to provide `match_substring_regex*`. How about providing only `match_substring?`? ########## ruby/red-arrow/test/test-slicer.rb: ########## @@ -528,5 +540,40 @@ def setup 2 window TABLE end + + test("match_like") do + sliced_table = @table.slice do |slicer| + slicer.string.match_like("_rr%") + end + assert_equal(<<~TABLE, sliced_table.to_s) + string +0 array +1 Arrow +2 (null) + TABLE + end + + test("match_substring_regex") do + sliced_table = @table.slice do |slicer| + slicer.string.match_substring_regex("[dr]ow") Review Comment: Can we accept `/[dr]ow/` too? If `slicer.string.match_substring_regex(/[dr]ow/)` works, how about adding support for `slicer.string.match_substring(/[dr]ow/)` (== `slicer.string.match_substring_regex(/[dr]ow/)`)`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org