GH-39702: [GLib] Add support for time zone in GArrowTimestampDataType#39717
Merged
kou merged 1 commit intoapache:mainfrom Jan 22, 2024
Merged
GH-39702: [GLib] Add support for time zone in GArrowTimestampDataType#39717kou merged 1 commit intoapache:mainfrom
kou merged 1 commit intoapache:mainfrom
Conversation
…taType Timestamp data type in Apache Arrow supports time zone but Apache Arrow C GLib didn't support it. Timestamp data type has "timezone-aware" mode and "timezone-naive" mode. If a timestamp data type has a valid time zone information, it uses "timezone-aware" mode. If a timestamp data type doesn't have a valid time zone information, it uses "timezone-naive" mode. Apache Arrow C GLib should support both of them. This change adds a new `GTimeZone *time_zone` argument to `garrow_timestamp_data_type_new()` instead of adding a new `garrow_timestamp_data_type_new_time_zone()` function. This breaks backward compatibility for Apache Arrow C GLib users. But this still keeps backward compatibility for users of bindings such as Ruby and Vala. Because the new `GTimeZone *time_zone` is nullable. I tried to use the "adding a new `garrow_timestamp_data_type_new_time_zone()` function" approach but Vala didn't like it. Both of `garrow_timestamp_data_type_new_time_zone()` (constructor) and `garrow_timestamp_data_type_get_time_zone()` (instance method or property reader) were mapped to `GArrow.TimestampDataType.time_zone()`. So I chose the "adding a new argument to `garrow_timestamp_data_type_new()`" approach.
|
|
Member
Author
|
+1 |
|
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit c33ffb0. There was 1 benchmark result with an error:
There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
dgreiss
pushed a commit
to dgreiss/arrow
that referenced
this pull request
Feb 19, 2024
…taType (apache#39717) ### Rationale for this change Timestamp data type in Apache Arrow supports time zone but Apache Arrow C GLib didn't support it. Timestamp data type has "timezone-aware" mode and "timezone-naive" mode. If a timestamp data type has a valid time zone information, it uses "timezone-aware" mode. If a timestamp data type doesn't have a valid time zone information, it uses "timezone-naive" mode. Apache Arrow C GLib should support both of them. ### What changes are included in this PR? This change adds a new `GTimeZone *time_zone` argument to `garrow_timestamp_data_type_new()` instead of adding a new `garrow_timestamp_data_type_new_time_zone()` function. This breaks backward compatibility for Apache Arrow C GLib users. But this still keeps backward compatibility for users of bindings such as Ruby and Vala. Because the new `GTimeZone *time_zone` is nullable. I tried to use the "adding a new `garrow_timestamp_data_type_new_time_zone()` function" approach but Vala didn't like it. Both of `garrow_timestamp_data_type_new_time_zone()` (constructor) and `garrow_timestamp_data_type_get_time_zone()` (instance method or property reader) were mapped to `GArrow.TimestampDataType.time_zone()`. So I chose the "adding a new argument to `garrow_timestamp_data_type_new()`" approach. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. **This PR includes breaking changes to public APIs.** * Closes: apache#39702 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Timestamp data type in Apache Arrow supports time zone but Apache Arrow C GLib didn't support it. Timestamp data type has "timezone-aware" mode and "timezone-naive" mode. If a timestamp data type has a valid time zone information, it uses "timezone-aware" mode. If a timestamp data type doesn't have a valid time zone information, it uses "timezone-naive" mode. Apache Arrow C GLib should support both of them.
What changes are included in this PR?
This change adds a new
GTimeZone *time_zoneargument togarrow_timestamp_data_type_new()instead of adding a newgarrow_timestamp_data_type_new_time_zone()function. This breaks backward compatibility for Apache Arrow C GLib users. But this still keeps backward compatibility for users of bindings such as Ruby and Vala. Because the newGTimeZone *time_zoneis nullable.I tried to use the "adding a new
garrow_timestamp_data_type_new_time_zone()function" approach but Vala didn't like it. Both ofgarrow_timestamp_data_type_new_time_zone()(constructor) andgarrow_timestamp_data_type_get_time_zone()(instance method or property reader) were mapped toGArrow.TimestampDataType.time_zone().So I chose the "adding a new argument to
garrow_timestamp_data_type_new()" approach.Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.
This PR includes breaking changes to public APIs.