This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 4cce72033c GH-40668: [Ruby][CI] Require GLib 2.58 or later for
timezone (#40669)
4cce72033c is described below
commit 4cce72033cae666d22110ea4b8f32a11915214d6
Author: Sutou Kouhei <[email protected]>
AuthorDate: Wed Mar 20 11:24:52 2024 +0900
GH-40668: [Ruby][CI] Require GLib 2.58 or later for timezone (#40669)
### Rationale for this change
GLib 2.58 or later is required for `TimestampDataType`'s timezone support.
### What changes are included in this PR?
Check GLib version.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #40668
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
ruby/red-arrow/test/helper/omittable.rb | 8 ++++++++
ruby/red-arrow/test/test-csv-loader.rb | 2 ++
2 files changed, 10 insertions(+)
diff --git a/ruby/red-arrow/test/helper/omittable.rb
b/ruby/red-arrow/test/helper/omittable.rb
index 8e1564be47..374465e66e 100644
--- a/ruby/red-arrow/test/helper/omittable.rb
+++ b/ruby/red-arrow/test/helper/omittable.rb
@@ -37,5 +37,13 @@ module Helper
GObjectIntrospection::Version::STRING
omit(message)
end
+
+ def require_glib(major, minor, micro)
+ return if GLib::Version.or_later?(major, minor, micro)
+ message =
+ "Require GLib #{major}.#{minor}.#{micro} or later: " +
+ GLib::Version::STRING
+ omit(message)
+ end
end
end
diff --git a/ruby/red-arrow/test/test-csv-loader.rb
b/ruby/red-arrow/test/test-csv-loader.rb
index 72bae2fcab..0b21f6f9b7 100644
--- a/ruby/red-arrow/test/test-csv-loader.rb
+++ b/ruby/red-arrow/test/test-csv-loader.rb
@@ -17,6 +17,7 @@
class CSVLoaderTest < Test::Unit::TestCase
include Helper::Fixture
+ include Helper::Omittable
def load_csv(input)
Arrow::CSVLoader.load(input, skip_lines: /^#/)
@@ -249,6 +250,7 @@ count
sub_test_case(":timestamp_parsers") do
test(":iso8601") do
+ require_glib(2, 58, 0)
data_type = Arrow::TimestampDataType.new(:second,
GLib::TimeZone.new("UTC"))
timestamps = [