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] Add methods using MatchSubStringFamilyCondition #34951

Closed
heronshoes opened this issue Apr 7, 2023 · 1 comment · Fixed by #34952
Closed

[Ruby] Add methods using MatchSubStringFamilyCondition #34951

heronshoes opened this issue Apr 7, 2023 · 1 comment · Fixed by #34952

Comments

@heronshoes
Copy link
Contributor

Describe the enhancement requested

Class MatchSubStringFamilyCondition has introduced to Arrow::Slicer and
Arrow::Slicer::ColumnCondition#match_substring has added in #34902 in Ruby binding.

We can also use this strategy for,

  • ends_with
  • match_like
  • match_substring_regex
  • starts_with

which use MatchstringOptions.

Component(s)

Ruby

@kou kou closed this as completed in #34952 Apr 9, 2023
kou added a commit that referenced this issue Apr 9, 2023
)

### Rationale for this change

Ruby binding supported `Arrow::Slicer::ColumnCondition#match_substring` in #34902.
This PR will use same strategy as this to its family methods.

### What changes are included in this PR?

- [x] Add `Arrow::Slicer::ColumnCondition#end_with?`
  - Accepts substring as a `String`
- [x] Add `Arrow::Slicer::ColumnCondition#match_like?`
  - Accepts SQL like substring as a `String`
- [x] Renamed and updated `Arrow::Slicer::ColumnCondition#match_substring?`
  - Accepts substring as a `String`
  - Also accepts `Regexp` falling back to `#match_substring_regex?`
- [x] Add `Arrow::Slicer::ColumnCondition#start_with?`
  - Accepts substring as a `String`
### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
It will add new methods for `Arrow::Slicer`.

* Closes: #34951

Lead-authored-by: Hirokazu SUZUKI <heronshoes877@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 12.0.0 milestone Apr 9, 2023
@heronshoes
Copy link
Contributor Author

Thanks!

liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this issue May 11, 2023
apache#34952)

### Rationale for this change

Ruby binding supported `Arrow::Slicer::ColumnCondition#match_substring` in apache#34902.
This PR will use same strategy as this to its family methods.

### What changes are included in this PR?

- [x] Add `Arrow::Slicer::ColumnCondition#end_with?`
  - Accepts substring as a `String`
- [x] Add `Arrow::Slicer::ColumnCondition#match_like?`
  - Accepts SQL like substring as a `String`
- [x] Renamed and updated `Arrow::Slicer::ColumnCondition#match_substring?`
  - Accepts substring as a `String`
  - Also accepts `Regexp` falling back to `#match_substring_regex?`
- [x] Add `Arrow::Slicer::ColumnCondition#start_with?`
  - Accepts substring as a `String`
### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
It will add new methods for `Arrow::Slicer`.

* Closes: apache#34951

Lead-authored-by: Hirokazu SUZUKI <heronshoes877@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this issue May 15, 2023
apache#34952)

### Rationale for this change

Ruby binding supported `Arrow::Slicer::ColumnCondition#match_substring` in apache#34902.
This PR will use same strategy as this to its family methods.

### What changes are included in this PR?

- [x] Add `Arrow::Slicer::ColumnCondition#end_with?`
  - Accepts substring as a `String`
- [x] Add `Arrow::Slicer::ColumnCondition#match_like?`
  - Accepts SQL like substring as a `String`
- [x] Renamed and updated `Arrow::Slicer::ColumnCondition#match_substring?`
  - Accepts substring as a `String`
  - Also accepts `Regexp` falling back to `#match_substring_regex?`
- [x] Add `Arrow::Slicer::ColumnCondition#start_with?`
  - Accepts substring as a `String`
### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
It will add new methods for `Arrow::Slicer`.

* Closes: apache#34951

Lead-authored-by: Hirokazu SUZUKI <heronshoes877@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
apache#34952)

### Rationale for this change

Ruby binding supported `Arrow::Slicer::ColumnCondition#match_substring` in apache#34902.
This PR will use same strategy as this to its family methods.

### What changes are included in this PR?

- [x] Add `Arrow::Slicer::ColumnCondition#end_with?`
  - Accepts substring as a `String`
- [x] Add `Arrow::Slicer::ColumnCondition#match_like?`
  - Accepts SQL like substring as a `String`
- [x] Renamed and updated `Arrow::Slicer::ColumnCondition#match_substring?`
  - Accepts substring as a `String`
  - Also accepts `Regexp` falling back to `#match_substring_regex?`
- [x] Add `Arrow::Slicer::ColumnCondition#start_with?`
  - Accepts substring as a `String`
### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
It will add new methods for `Arrow::Slicer`.

* Closes: apache#34951

Lead-authored-by: Hirokazu SUZUKI <heronshoes877@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants