Skip to content

Commit d63eef9

Browse files
authored
GH-48287: [Ruby] Add minimum pure Ruby Apache Arrow reader implementation (#48288)
### Rationale for this change We want to implement step by step. Let's add only minimum implementation and base configuration as the first step. This doesn't have full reader implementation. ### What changes are included in this PR? This includes the followings: * Prepare package * We use red-arrow-format as package ID * We use Red Arrow Format as package name * Auto generated FlatBuffers code * It's generated by red-flatbuffers * Add minimum file format reader * It can read only UInt8 array * CI configuration ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * GitHub Issue: #48287 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 82324f0 commit d63eef9

File tree

90 files changed

+3544
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+3544
-10
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
!ruby/red-arrow-cuda/Gemfile
4141
!ruby/red-arrow-cuda/lib/arrow-cuda/version.rb
4242
!ruby/red-arrow-cuda/red-arrow-cuda.gemspec
43+
!ruby/red-arrow-format/Gemfile
44+
!ruby/red-arrow-format/lib/arrow-format/version.rb
45+
!ruby/red-arrow-format/red-arrow-format.gemspec
4346
!ruby/red-gandiva/Gemfile
4447
!ruby/red-gandiva/lib/gandiva/version.rb
4548
!ruby/red-gandiva/red-gandiva.gemspec

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ repos:
251251
exclude: >-
252252
(
253253
?^dev/tasks/homebrew-formulae/.*\.rb$|
254+
?^ruby/red-arrow-format/lib/arrow-format/org/.*\.rb$|
254255
)
255256
- repo: https://github.com/cheshirekow/cmake-format-precommit
256257
rev: v0.6.13

dev/release/rat_exclude_files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ r/inst/include/cpp11/*.hpp
9999
r/tools/nixlibs-allowlist.txt
100100
.gitattributes
101101
ruby/red-arrow/.yardopts
102+
ruby/red-arrow-format/lib/arrow-format/org/*
102103
.github/pull_request_template.md

ruby/Rakefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ base_dir = File.join(__dir__)
2424
packages = []
2525
Dir.glob("#{base_dir}/*/*.gemspec") do |gemspec|
2626
package = File.basename(File.dirname(gemspec))
27-
glib_package_name = package.gsub(/\Ared-/, "") + "-glib"
28-
next unless PKGConfig.exist?(glib_package_name)
27+
if package == "red-arrow-format"
28+
next if RUBY_VERSION < "3.1.0"
29+
else
30+
glib_package_name = package.gsub(/\Ared-/, "") + "-glib"
31+
next unless PKGConfig.exist?(glib_package_name)
32+
end
2933
packages << package
3034
end
3135

ruby/red-arrow-cuda/red-arrow-cuda.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
2929
]
3030
spec.version = version_components.compact.join(".")
3131
spec.homepage = "https://arrow.apache.org/"
32-
spec.authors = ["Apache Arrow Developers"]
32+
spec.authors = ["The Apache Software Foundation"]
3333
spec.email = ["[email protected]"]
3434

3535
spec.summary = "Red Arrow CUDA is the Ruby bindings of Apache Arrow CUDA"

ruby/red-arrow-dataset/red-arrow-dataset.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
2929
]
3030
spec.version = version_components.compact.join(".")
3131
spec.homepage = "https://arrow.apache.org/"
32-
spec.authors = ["Apache Arrow Developers"]
32+
spec.authors = ["The Apache Software Foundation"]
3333
spec.email = ["[email protected]"]
3434

3535
spec.summary = "Red Arrow Dataset is the Ruby bindings of Apache Arrow Dataset"

ruby/red-arrow-flight-sql/red-arrow-flight-sql.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
2929
]
3030
spec.version = version_components.compact.join(".")
3131
spec.homepage = "https://arrow.apache.org/"
32-
spec.authors = ["Apache Arrow Developers"]
32+
spec.authors = ["The Apache Software Foundation"]
3333
spec.email = ["[email protected]"]
3434

3535
spec.summary =

ruby/red-arrow-flight/red-arrow-flight.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
2929
]
3030
spec.version = version_components.compact.join(".")
3131
spec.homepage = "https://arrow.apache.org/"
32-
spec.authors = ["Apache Arrow Developers"]
32+
spec.authors = ["The Apache Software Foundation"]
3333
spec.email = ["[email protected]"]
3434

3535
spec.summary = "Red Arrow Flight is the Ruby bindings of Apache Arrow Flight"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
lib/arrow-format/org/**/*.rb linguist-generated

ruby/red-arrow-format/.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
/Gemfile.lock
19+
/pkg/

0 commit comments

Comments
 (0)