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

[GLib] Add missing compute function options classes #40402

Closed
stenlarsson opened this issue Mar 7, 2024 · 1 comment
Closed

[GLib] Add missing compute function options classes #40402

stenlarsson opened this issue Mar 7, 2024 · 1 comment

Comments

@stenlarsson
Copy link
Contributor

Describe the enhancement requested

In most cases the options to compute functions are optional, but there are cases where they are required. The following compute functions are not possible to use in Ruby because the required options classes are missing from the GLib bindings:

  • split_pattern: SplitPatternOptions
  • strftime: StrftimeOptions (technically not required)
  • strptime: StrptimeOptions
  • struct_field: StructFieldOptions

There are probably more functions that cannot be used, but this is a start.

Component(s)

GLib

kou added a commit that referenced this issue Mar 8, 2024
### Rationale for this change

In most cases the options to compute functions are optional, but there are cases where they are required. The following compute functions are not possible to use in Ruby because the required options classes are missing from the GLib bindings:

* `split_pattern`
* `strftime` (can technically be used)
* `strptime`
* `struct_field`

There are probably more functions that cannot be used, but this is a start.

### What changes are included in this PR?

The following GLib classes are added:

* `GArrowSplitPatternOptions`
* `GArrowStrftimeOptions`
* `GArrowStrptimeOptions`
* `GArrowStructFieldOptions`

To be able to return an error, a separate function for setting the field_ref on StructFieldOptions is used instead of a set_property function.

### Are these changes tested?

Yes

### Are there any user-facing changes?

Yes

* GitHub Issue: #40402

Lead-authored-by: Sten Larsson <sten@burtcorp.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 16.0.0 milestone Mar 8, 2024
@kou
Copy link
Member

kou commented Mar 8, 2024

Issue resolved by pull request 40403
#40403

@kou kou closed this as completed Mar 8, 2024
thisisnic pushed a commit to thisisnic/arrow that referenced this issue Mar 8, 2024
…pache#40403)

### Rationale for this change

In most cases the options to compute functions are optional, but there are cases where they are required. The following compute functions are not possible to use in Ruby because the required options classes are missing from the GLib bindings:

* `split_pattern`
* `strftime` (can technically be used)
* `strptime`
* `struct_field`

There are probably more functions that cannot be used, but this is a start.

### What changes are included in this PR?

The following GLib classes are added:

* `GArrowSplitPatternOptions`
* `GArrowStrftimeOptions`
* `GArrowStrptimeOptions`
* `GArrowStructFieldOptions`

To be able to return an error, a separate function for setting the field_ref on StructFieldOptions is used instead of a set_property function.

### Are these changes tested?

Yes

### Are there any user-facing changes?

Yes

* GitHub Issue: apache#40402

Lead-authored-by: Sten Larsson <sten@burtcorp.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

No branches or pull requests

2 participants