red-arrow-flight 11.0.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 913208826b2e7e7e35763950e638db37b689fc1405f31b503da36ea131ac749a
4
- data.tar.gz: f7fecc7a240b440c67c3859a31b88b87f70b437e565f08bcd1ab98c51fb11013
3
+ metadata.gz: cb5bf5c78dab6b0677e9876df6d1fa9561eb66645f7eac2fb76f0f06ddc8db9d
4
+ data.tar.gz: d84797823a9fa39dd6c5832aa148a5c502b297d5538daff8684133ecd79ed0e3
5
5
  SHA512:
6
- metadata.gz: 889e4349ca3fd56234c03eaba9fb40166e15c50e048b96026962f46493640d77545f4ae945360cf6ea137ec7eeaf4772322abbd62f557b43c2ddd495d0a8b834
7
- data.tar.gz: e56bba8cb8ca444bf14c114280ac6a23002bed6e82e1decf4db753a44fbc311fc33be5d7aaefaa8c6dea4e7a8365cbc82fb3de4effd9942135d260a023fcf91d
6
+ metadata.gz: 6c72e7d4a636dfdaf40269d9f81e7ff664b9fb42465194de97c07d4bd31fd7c87584fcddcf9e33c167d6007178a3caab9716e22105511232687bea7952738dcb
7
+ data.tar.gz: afaa9ac4f56849882d1c367d3073d5f2a387c263b2af33a13e55778d21ab7cb827fd23cd2b30a9452d34a91ab24f4cbfa1df0898d6a9a18b4ce67d8b77ae4013
data/README.md CHANGED
@@ -25,9 +25,9 @@ Red Arrow Flight is the Ruby bindings of Apache Arrow Flight. Red Arrow Flight i
25
25
 
26
26
  [GObject Introspection](https://wiki.gnome.org/action/show/Projects/GObjectIntrospection) is a middleware for language bindings of C library. GObject Introspection can generate language bindings automatically at runtime.
27
27
 
28
- Red Arrow Flight uses [Apache Arrow Flight GLib](https://github.com/apache/arrow/tree/master/c_glib/arrow-flight-glib) and [gobject-introspection gem](https://rubygems.org/gems/gobject-introspection) to generate Ruby bindings of Apache Arrow Flight.
28
+ Red Arrow Flight uses [Apache Arrow Flight GLib](https://github.com/apache/arrow/tree/main/c_glib/arrow-flight-glib) and [gobject-introspection gem](https://rubygems.org/gems/gobject-introspection) to generate Ruby bindings of Apache Arrow Flight.
29
29
 
30
- Apache Arrow Flight GLib is a C wrapper for [Apache Arrow Flight C++](https://github.com/apache/arrow/tree/master/cpp/src/arrow/flight). GObject Introspection can't use Apache Arrow Flight C++ directly. Apache Arrow Flight GLib is a bridge between Apache Arrow Flight C++ and GObject Introspection.
30
+ Apache Arrow Flight GLib is a C wrapper for [Apache Arrow Flight C++](https://github.com/apache/arrow/tree/main/cpp/src/arrow/flight). GObject Introspection can't use Apache Arrow Flight C++ directly. Apache Arrow Flight GLib is a bridge between Apache Arrow Flight C++ and GObject Introspection.
31
31
 
32
32
  gobject-introspection gem is a Ruby bindings of GObject Introspection. Red Arrow Flight uses GObject Introspection via gobject-introspection gem.
33
33
 
@@ -32,6 +32,7 @@ module ArrowFlight
32
32
  require "arrow-flight/call-options"
33
33
  require "arrow-flight/client-options"
34
34
  require "arrow-flight/location"
35
+ require "arrow-flight/record-batch-reader"
35
36
  require "arrow-flight/server-options"
36
37
  require "arrow-flight/ticket"
37
38
  end
@@ -0,0 +1,32 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ module ArrowFlight
19
+ class RecordBatchReader
20
+ include Enumerable
21
+
22
+ def each
23
+ return to_enum(__method__) unless block_given?
24
+
25
+ loop do
26
+ record_batch = read_next
27
+ break if record_batch.nil?
28
+ yield(record_batch)
29
+ end
30
+ end
31
+ end
32
+ end
@@ -16,7 +16,7 @@
16
16
  # under the License.
17
17
 
18
18
  module ArrowFlight
19
- VERSION = "11.0.0"
19
+ VERSION = "12.0.0"
20
20
 
21
21
  module Version
22
22
  numbers, TAG = VERSION.split("-")
@@ -0,0 +1,41 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ class TestRecordBatchReader < Test::Unit::TestCase
19
+ def setup
20
+ @server = nil
21
+ omit("Unstable on Windows") if Gem.win_platform?
22
+ @server = Helper::Server.new
23
+ @server.listen("grpc://127.0.0.1:0")
24
+ @location = "grpc://127.0.0.1:#{@server.port}"
25
+ end
26
+
27
+ def teardown
28
+ return if @server.nil?
29
+ @server.shutdown
30
+ end
31
+
32
+ sub_test_case("#each") do
33
+ def test_without_block
34
+ client = ArrowFlight::Client.new(@location)
35
+ generator = Helper::InfoGenerator.new
36
+ reader = client.do_get(generator.page_view_ticket)
37
+ assert_equal(generator.page_view_table.each_record_batch.to_a,
38
+ reader.each.collect(&:data))
39
+ end
40
+ end
41
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red-arrow-flight
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.0.0
4
+ version: 12.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apache Arrow Developers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: red-arrow
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 11.0.0
19
+ version: 12.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 11.0.0
26
+ version: 12.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -86,6 +86,7 @@ files:
86
86
  - lib/arrow-flight/client-options.rb
87
87
  - lib/arrow-flight/loader.rb
88
88
  - lib/arrow-flight/location.rb
89
+ - lib/arrow-flight/record-batch-reader.rb
89
90
  - lib/arrow-flight/server-options.rb
90
91
  - lib/arrow-flight/ticket.rb
91
92
  - lib/arrow-flight/version.rb
@@ -97,12 +98,13 @@ files:
97
98
  - test/test-call-options.rb
98
99
  - test/test-client.rb
99
100
  - test/test-location.rb
101
+ - test/test-record-batch-reader.rb
100
102
  - test/test-ticket.rb
101
103
  homepage: https://arrow.apache.org/
102
104
  licenses:
103
105
  - Apache-2.0
104
106
  metadata: {}
105
- post_install_message:
107
+ post_install_message:
106
108
  rdoc_options: []
107
109
  require_paths:
108
110
  - lib
@@ -117,8 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
119
  - !ruby/object:Gem::Version
118
120
  version: '0'
119
121
  requirements: []
120
- rubygems_version: 3.5.0.dev
121
- signing_key:
122
+ rubygems_version: 3.3.5
123
+ signing_key:
122
124
  specification_version: 4
123
125
  summary: Red Arrow Flight is the Ruby bindings of Apache Arrow Flight
124
126
  test_files:
@@ -129,4 +131,5 @@ test_files:
129
131
  - test/test-call-options.rb
130
132
  - test/test-client.rb
131
133
  - test/test-location.rb
134
+ - test/test-record-batch-reader.rb
132
135
  - test/test-ticket.rb