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 +4 -4
- data/lib/arrow-dataset/in-memory-fragment.rb +32 -0
- data/lib/arrow-dataset/in-memory-scan-task.rb +3 -2
- data/lib/arrow-dataset/version.rb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d42c5d1216935cade45c3eed1c1026d3e47e94ba900d328982f4643ce8dfbfab
|
4
|
+
data.tar.gz: 0ef055d8683c6a76801b2f41bbc51fdce2f696d0a52094a221e1250211f45fb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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:
|
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-
|
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:
|
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:
|
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.
|
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
|