You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kou (via GitHub)" <gi...@apache.org> on 2023/04/07 02:52:01 UTC

[GitHub] [arrow] kou commented on a diff in pull request #34952: GH-34951: [Ruby] Add methods using MatchSubStringFamilyCondition

kou commented on code in PR #34952:
URL: https://github.com/apache/arrow/pull/34952#discussion_r1160398717


##########
ruby/red-arrow/lib/arrow/slicer.rb:
##########
@@ -163,10 +163,30 @@ def reject(&block)
         RejectCondition.new(@column, block)
       end
 
+      def ends_with(substring, ignore_case: false)

Review Comment:
   Other method including existing `match_substring` should have `?` suffix because this is Ruby API. :-)
   
   ```suggestion
         def end_with?(substring, ignore_case: false)
   ```



##########
ruby/red-arrow/lib/arrow/slicer.rb:
##########
@@ -163,10 +163,30 @@ def reject(&block)
         RejectCondition.new(@column, block)
       end
 
+      def ends_with(substring, ignore_case: false)
+        MatchSubstringFamilyCondition.new("ends_with",
+                                          @column, substring, ignore_case)
+      end
+
+      def match_like(pattern, ignore_case: false)
+        MatchSubstringFamilyCondition.new("match_like",
+                                          @column, pattern, ignore_case)
+      end
+
       def match_substring(substring, ignore_case: false)
         MatchSubstringFamilyCondition.new("match_substring",
                                           @column, substring, ignore_case)
       end
+
+      def match_substring_regex(pattern, ignore_case: false)
+        MatchSubstringFamilyCondition.new("match_substring_regex",
+                                          @column, pattern, ignore_case)
+      end
+
+      def starts_with(substring, ignore_case: false)

Review Comment:
   ```suggestion
         def start_with?(substring, ignore_case: false)
   ```



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org