red-arrow-dataset 3.0.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60801af8ebd03566fa8fd59bf971834c9d10040a9487d91a39fbb80d8fcb2918
4
- data.tar.gz: '07699ad51ea6c39283f090a3683ebd1c70b4f92bd6c0350ba146db94d7bb75db'
3
+ metadata.gz: d42c5d1216935cade45c3eed1c1026d3e47e94ba900d328982f4643ce8dfbfab
4
+ data.tar.gz: 0ef055d8683c6a76801b2f41bbc51fdce2f696d0a52094a221e1250211f45fb7
5
5
  SHA512:
6
- metadata.gz: 201295a8e1ee873a50e34d8fd33d69c30a8bdf375d814430cbc2da1aec79c072f15a22f06ebda632a77b7430a4c5af1f7f54a2178e625e51b07d57ab1be58d14
7
- data.tar.gz: b073742b5d1c89a751e264dd342ffd950195075d0d53e87c8fc8cdbdbe68feb5da69415ecdea0855088caf39493e534a02e86193b2ba23491e2c09d778fe33ce
6
+ metadata.gz: 88d713341a0e135703ed699741ba0350fdf46dda078c509bdeba37d5588fe095d00b79b4fe32e8b23c5845eb5e03bf3d7fb08771abaeeed045d691052926f26f
7
+ data.tar.gz: e184750575d2b814065ccb1a1c2db8077c81e7547385e3af0987b2ddced11d5bd44edbc74fd5e7473f056ae917bc983f087de12d5882e1d9bff66385c562fd79
@@ -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 ArrowDataset
19
+ class InMemoryFragment
20
+ alias_method :initialize_raw, :initialize
21
+ private :initialize_raw
22
+ def initialize(schema, record_batches)
23
+ record_batches = record_batches.collect do |record_batch|
24
+ unless record_batch.is_a?(Arrow::RecordBatch)
25
+ record_batch = Arrow::RecordBatch.new(record_batch)
26
+ end
27
+ record_batch
28
+ end
29
+ initialize_raw(schema, record_batches)
30
+ end
31
+ end
32
+ end
@@ -26,9 +26,10 @@ module ArrowDataset
26
26
  end
27
27
  record_batch
28
28
  end
29
- context = options.delete(:context) || ScanContext.new
30
29
  options[:schema] ||= record_batches.first.schema
31
- initialize_raw(record_batches, options, context)
30
+ fragment = options.delete(:fragment)
31
+ fragment ||= InMemoryFragment.new(options[:schema], record_batches)
32
+ initialize_raw(record_batches, options, fragment)
32
33
  end
33
34
  end
34
35
  end
@@ -16,7 +16,7 @@
16
16
  # under the License.
17
17
 
18
18
  module ArrowDataset
19
- VERSION = "3.0.0"
19
+ VERSION = "4.0.0"
20
20
 
21
21
  module Version
22
22
  numbers, TAG = VERSION.split("-")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red-arrow-dataset
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 4.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: 2021-01-25 00:00:00.000000000 Z
11
+ date: 2021-04-26 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: 3.0.0
19
+ version: 4.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: 3.0.0
26
+ version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -82,6 +82,7 @@ files:
82
82
  - Rakefile
83
83
  - dependency-check/Rakefile
84
84
  - lib/arrow-dataset.rb
85
+ - lib/arrow-dataset/in-memory-fragment.rb
85
86
  - lib/arrow-dataset/in-memory-scan-task.rb
86
87
  - lib/arrow-dataset/loader.rb
87
88
  - lib/arrow-dataset/scan-options.rb
@@ -95,7 +96,7 @@ homepage: https://arrow.apache.org/
95
96
  licenses:
96
97
  - Apache-2.0
97
98
  metadata: {}
98
- post_install_message:
99
+ post_install_message:
99
100
  rdoc_options: []
100
101
  require_paths:
101
102
  - lib
@@ -110,12 +111,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
111
  - !ruby/object:Gem::Version
111
112
  version: '0'
112
113
  requirements: []
113
- rubygems_version: 3.2.5
114
- signing_key:
114
+ rubygems_version: 3.2.15
115
+ signing_key:
115
116
  specification_version: 4
116
117
  summary: Red Arrow Dataset is the Ruby bindings of Apache Arrow Dataset
117
118
  test_files:
118
119
  - test/helper.rb
119
120
  - test/run-test.rb
120
- - test/test-scan-options.rb
121
121
  - test/test-in-memory-scan-task.rb
122
+ - test/test-scan-options.rb