red-arrow 18.1.0 → 19.0.1

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.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/lib/arrow/array.rb +7 -4
  3. data/lib/arrow/column.rb +4 -4
  4. data/lib/arrow/jruby/array-builder.rb +114 -0
  5. data/lib/arrow/jruby/array.rb +109 -0
  6. data/{test/helper/fixture.rb → lib/arrow/jruby/chunked-array.rb} +14 -6
  7. data/lib/arrow/jruby/compression-type.rb +26 -0
  8. data/{test/test-boolean-scalar.rb → lib/arrow/jruby/csv-read-options.rb} +12 -6
  9. data/{test/test-map-data-type.rb → lib/arrow/jruby/data-type.rb} +24 -12
  10. data/lib/arrow/jruby/decimal128.rb +28 -0
  11. data/lib/arrow/jruby/decimal256.rb +28 -0
  12. data/{test/fixture/null-with-double-quote.csv → lib/arrow/jruby/error.rb} +7 -4
  13. data/lib/arrow/jruby/file-system.rb +24 -0
  14. data/{test/test-null-array.rb → lib/arrow/jruby/function.rb} +5 -4
  15. data/lib/arrow/jruby/record-batch-iterator.rb +24 -0
  16. data/{test/fixture/integer-float.csv → lib/arrow/jruby/record-batch.rb} +8 -4
  17. data/{test/fixture/float-integer.csv → lib/arrow/jruby/sort-key.rb} +8 -4
  18. data/lib/arrow/jruby/sort-options.rb +24 -0
  19. data/lib/arrow/jruby/stream-listener-raw.rb +25 -0
  20. data/{test/test-rolling-window.rb → lib/arrow/jruby/table.rb} +19 -19
  21. data/lib/arrow/jruby/writable.rb +24 -0
  22. data/lib/arrow/jruby.rb +52 -0
  23. data/lib/arrow/libraries.rb +126 -0
  24. data/lib/arrow/list-array-builder.rb +1 -0
  25. data/lib/arrow/loader.rb +3 -111
  26. data/{test/fixture/null-without-double-quote.csv → lib/arrow/ruby.rb} +6 -4
  27. data/lib/arrow/version.rb +1 -1
  28. data/lib/arrow.rb +2 -7
  29. data/red-arrow.gemspec +15 -6
  30. metadata +26 -229
  31. data/test/each-raw-record/test-basic-arrays.rb +0 -411
  32. data/test/each-raw-record/test-dense-union-array.rb +0 -566
  33. data/test/each-raw-record/test-dictionary-array.rb +0 -341
  34. data/test/each-raw-record/test-list-array.rb +0 -628
  35. data/test/each-raw-record/test-map-array.rb +0 -507
  36. data/test/each-raw-record/test-multiple-columns.rb +0 -72
  37. data/test/each-raw-record/test-sparse-union-array.rb +0 -528
  38. data/test/each-raw-record/test-struct-array.rb +0 -529
  39. data/test/each-raw-record/test-table.rb +0 -47
  40. data/test/fixture/TestOrcFile.test1.orc +0 -0
  41. data/test/fixture/with-header-float.csv +0 -20
  42. data/test/fixture/with-header.csv +0 -20
  43. data/test/fixture/without-header-float.csv +0 -19
  44. data/test/fixture/without-header.csv +0 -19
  45. data/test/helper/omittable.rb +0 -49
  46. data/test/helper.rb +0 -31
  47. data/test/raw-records/test-basic-arrays.rb +0 -405
  48. data/test/raw-records/test-dense-union-array.rb +0 -566
  49. data/test/raw-records/test-dictionary-array.rb +0 -341
  50. data/test/raw-records/test-list-array.rb +0 -628
  51. data/test/raw-records/test-map-array.rb +0 -507
  52. data/test/raw-records/test-multiple-columns.rb +0 -65
  53. data/test/raw-records/test-sparse-union-array.rb +0 -556
  54. data/test/raw-records/test-struct-array.rb +0 -529
  55. data/test/raw-records/test-table.rb +0 -47
  56. data/test/run-test.rb +0 -71
  57. data/test/test-array-builder.rb +0 -198
  58. data/test/test-array.rb +0 -332
  59. data/test/test-bigdecimal.rb +0 -40
  60. data/test/test-binary-dictionary-array-builder.rb +0 -103
  61. data/test/test-buffer.rb +0 -49
  62. data/test/test-chunked-array.rb +0 -198
  63. data/test/test-column.rb +0 -123
  64. data/test/test-csv-loader.rb +0 -297
  65. data/test/test-data-type.rb +0 -84
  66. data/test/test-date32-array.rb +0 -24
  67. data/test/test-date64-array.rb +0 -25
  68. data/test/test-decimal128-array-builder.rb +0 -126
  69. data/test/test-decimal128-array.rb +0 -47
  70. data/test/test-decimal128-data-type.rb +0 -31
  71. data/test/test-decimal128.rb +0 -126
  72. data/test/test-decimal256-array-builder.rb +0 -126
  73. data/test/test-decimal256-array.rb +0 -47
  74. data/test/test-decimal256-data-type.rb +0 -31
  75. data/test/test-decimal256.rb +0 -126
  76. data/test/test-dense-union-array.rb +0 -42
  77. data/test/test-dense-union-data-type.rb +0 -41
  78. data/test/test-dictionary-array.rb +0 -41
  79. data/test/test-dictionary-data-type.rb +0 -40
  80. data/test/test-expression.rb +0 -51
  81. data/test/test-feather.rb +0 -49
  82. data/test/test-field.rb +0 -117
  83. data/test/test-file-output-stream.rb +0 -54
  84. data/test/test-fixed-size-binary-array-builder.rb +0 -92
  85. data/test/test-fixed-size-binary-array.rb +0 -36
  86. data/test/test-float-scalar.rb +0 -46
  87. data/test/test-function.rb +0 -210
  88. data/test/test-group.rb +0 -193
  89. data/test/test-half-float-array.rb +0 -43
  90. data/test/test-half-float.rb +0 -130
  91. data/test/test-list-array-builder.rb +0 -79
  92. data/test/test-list-array.rb +0 -32
  93. data/test/test-list-data-type.rb +0 -69
  94. data/test/test-map-array-builder.rb +0 -110
  95. data/test/test-map-array.rb +0 -33
  96. data/test/test-memory-view.rb +0 -434
  97. data/test/test-orc.rb +0 -173
  98. data/test/test-ractor.rb +0 -34
  99. data/test/test-record-batch-builder.rb +0 -125
  100. data/test/test-record-batch-file-reader.rb +0 -136
  101. data/test/test-record-batch-iterator.rb +0 -37
  102. data/test/test-record-batch-reader.rb +0 -46
  103. data/test/test-record-batch-stream-reader.rb +0 -129
  104. data/test/test-record-batch.rb +0 -182
  105. data/test/test-scalar.rb +0 -65
  106. data/test/test-schema.rb +0 -134
  107. data/test/test-slicer.rb +0 -589
  108. data/test/test-sort-indices.rb +0 -40
  109. data/test/test-sort-key.rb +0 -81
  110. data/test/test-sort-options.rb +0 -58
  111. data/test/test-sparse-union-array.rb +0 -38
  112. data/test/test-sparse-union-data-type.rb +0 -41
  113. data/test/test-stream-listener.rb +0 -60
  114. data/test/test-string-dictionary-array-builder.rb +0 -103
  115. data/test/test-struct-array-builder.rb +0 -184
  116. data/test/test-struct-array.rb +0 -94
  117. data/test/test-struct-data-type.rb +0 -112
  118. data/test/test-table.rb +0 -1530
  119. data/test/test-tensor.rb +0 -297
  120. data/test/test-time.rb +0 -288
  121. data/test/test-time32-array.rb +0 -81
  122. data/test/test-time32-data-type.rb +0 -42
  123. data/test/test-time64-array.rb +0 -81
  124. data/test/test-time64-data-type.rb +0 -42
  125. data/test/test-timestamp-array.rb +0 -45
  126. data/test/test-timestamp-data-type.rb +0 -42
  127. data/test/values/test-basic-arrays.rb +0 -335
  128. data/test/values/test-dense-union-array.rb +0 -552
  129. data/test/values/test-dictionary-array.rb +0 -325
  130. data/test/values/test-list-array.rb +0 -587
  131. data/test/values/test-map-array.rb +0 -489
  132. data/test/values/test-sparse-union-array.rb +0 -543
  133. data/test/values/test-struct-array.rb +0 -524
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f4b1e51f2f7908d4a816998b595ba66496a17658366a0394e5534ffbd7a8b45
4
- data.tar.gz: e128ef39a87c7a48e330516463025b17396c4bb054dc8b6476db5f3c9887910d
3
+ metadata.gz: b44fbccb9a135c75b84325740082e4ad422fc616f907b1df42b378ef8dfad327
4
+ data.tar.gz: 6553a12ec8bd3828e530c126140c7a9cc2806ca590f59c733fb59e3e30bbea57
5
5
  SHA512:
6
- metadata.gz: cc63d80da43f81d20e338b545a2a2adc4e81c9c7c4fd8bf2a01584b8a999a9b49af859961d14d6e6c3933d33870209b5be4a3204f87fa8648435437b1bfcfebf
7
- data.tar.gz: b3396ecc39dd245ca2a687c02ccaab6053e9a8a184e55b500e6fbf67ee30efd4f219e1fd7d3fc29f5bad0da501f2350887abf9b1e8c7d63aee1c58faf090dae3
6
+ metadata.gz: ca5c0962bddfd1a6d78bd1cb40b74f13603bf7da0876c2d0887ec06650704d3570f06a49c75902d0e9f9d37f112c384fd5acdb2d2b8ba6d6ec698db69abbd8c5
7
+ data.tar.gz: d77747e48bc08f1ccb01d6afdce1179c2d607111272e655ffe0dc61e03c30f7dca65fa4f4e1b35043d69ff9f614c2190857c2e9ca3dcb0c09309e31c9352a661
data/lib/arrow/array.rb CHANGED
@@ -33,9 +33,10 @@ module Arrow
33
33
  end
34
34
 
35
35
  def builder_class
36
- builder_class_name = "#{name}Builder"
37
- return nil unless const_defined?(builder_class_name)
38
- const_get(builder_class_name)
36
+ local_name = name.split("::").last
37
+ builder_class_name = "#{local_name}Builder"
38
+ return nil unless Arrow.const_defined?(builder_class_name)
39
+ Arrow.const_get(builder_class_name)
39
40
  end
40
41
 
41
42
  # @api private
@@ -92,6 +93,8 @@ module Arrow
92
93
  equal_options(other, options)
93
94
  end
94
95
 
96
+ alias_method :size, :length
97
+
95
98
  def each
96
99
  return to_enum(__method__) unless block_given?
97
100
 
@@ -250,7 +253,7 @@ module Arrow
250
253
  "[array][resolve] need to implement " +
251
254
  "a feature that building #{value_data_type} array " +
252
255
  "from raw Ruby Array"
253
- raise NotImplemented, message
256
+ raise NotImplementedError, message
254
257
  end
255
258
  other_array
256
259
  elsif other_array.respond_to?(:value_data_type)
data/lib/arrow/column.rb CHANGED
@@ -58,11 +58,11 @@ module Arrow
58
58
  @data.reverse_each(&block)
59
59
  end
60
60
 
61
- def n_rows
62
- @data.n_rows
61
+ def size
62
+ @data.size
63
63
  end
64
- alias_method :size, :n_rows
65
- alias_method :length, :n_rows
64
+ alias_method :length, :size
65
+ alias_method :n_rows, :size
66
66
 
67
67
  def n_nulls
68
68
  @data.n_nulls
@@ -0,0 +1,114 @@
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
+ require_relative "array"
19
+
20
+ module Arrow
21
+ module ArrayBuildable
22
+ ValueVector = org.apache.arrow.vector.ValueVector
23
+ def buildable?(args)
24
+ return false if args.size == 1 and args.first.is_a?(ValueVector)
25
+ super
26
+ end
27
+ end
28
+
29
+ class ArrayBuilder
30
+ class << self
31
+ prepend ArrayBuildable
32
+ end
33
+
34
+ def initialize
35
+ @vector = self.class::Array::Vector.new("", Arrow.allocator)
36
+ @vector.allocate_new
37
+ @index = 0
38
+ end
39
+
40
+ def append_value(value)
41
+ @vector.set(@index, value)
42
+ @index += 1
43
+ end
44
+
45
+ def append_values(values, is_valids=nil)
46
+ if is_valids
47
+ values.zip(is_valids) do |value, is_valid|
48
+ if is_valid
49
+ @vector.set(@index, value)
50
+ else
51
+ @vector.set_null(@index)
52
+ end
53
+ @index += 1
54
+ end
55
+ else
56
+ values.each do |value|
57
+ @vector.set(@index, value)
58
+ @index += 1
59
+ end
60
+ end
61
+ end
62
+
63
+ def append_nulls(n)
64
+ n.times do
65
+ @vector.set_null(@index)
66
+ @index += 1
67
+ end
68
+ end
69
+
70
+ def finish
71
+ @vector.set_value_count(@index)
72
+ vector, @vector = @vector, nil
73
+ self.class::Array.new(vector)
74
+ end
75
+ end
76
+
77
+ class Int8ArrayBuilder < ArrayBuilder
78
+ Array = Int8Array
79
+ end
80
+
81
+ class Int32ArrayBuilder < ArrayBuilder
82
+ Array = Int32Array
83
+ end
84
+
85
+ class FixedSizeBinaryArrayBuilder < ArrayBuilder
86
+ end
87
+
88
+ class Decimal128ArrayBuilder < FixedSizeBinaryArrayBuilder
89
+ end
90
+
91
+ class Decimal256ArrayBuilder < FixedSizeBinaryArrayBuilder
92
+ end
93
+
94
+ class ListArrayBuilder < ArrayBuilder
95
+ end
96
+
97
+ class MapArrayBuilder < ArrayBuilder
98
+ end
99
+
100
+ class StructArrayBuilder < ArrayBuilder
101
+ end
102
+
103
+ class UnionArrayBuilder < ArrayBuilder
104
+ def append_child(child, filed_name)
105
+ raise NotImplementedError
106
+ end
107
+ end
108
+
109
+ class DenseUnionArrayBuilder < UnionArrayBuilder
110
+ end
111
+
112
+ class SparseUnionArrayBuilder < UnionArrayBuilder
113
+ end
114
+ end
@@ -0,0 +1,109 @@
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
+ require_relative "data-type"
19
+
20
+ module Arrow
21
+ class Array
22
+ VectorAppender = org.apache.arrow.vector.util.VectorAppender
23
+ VectorEqualsVisitor = org.apache.arrow.vector.compare.VectorEqualsVisitor
24
+
25
+ attr_reader :vector
26
+
27
+ def initialize(vector)
28
+ @vector = vector
29
+ end
30
+
31
+ def ==(other_array)
32
+ return false unless other_array.is_a?(self.class)
33
+ VectorEqualsVisitor.vector_equals(@vector, other_array.vector)
34
+ end
35
+
36
+ def null?(i)
37
+ @vector.null?(i)
38
+ end
39
+
40
+ def get_value(i)
41
+ @vector.get_object(i)
42
+ end
43
+
44
+ def to_s
45
+ @vector.to_s
46
+ end
47
+
48
+ def inspect
49
+ super.sub(/>\z/) do
50
+ " #{to_s}>"
51
+ end
52
+ end
53
+
54
+ def close
55
+ @vector.close
56
+ end
57
+
58
+ def length
59
+ @vector.value_count
60
+ end
61
+
62
+ def value_data_type
63
+ self.class::ValueDataType.new
64
+ end
65
+
66
+ def values
67
+ each.to_a
68
+ end
69
+
70
+ def cast(other_value_data_type)
71
+ other_value_data_type.build_array(to_a)
72
+ end
73
+
74
+ def is_in(values)
75
+ raise NotImplementedError
76
+ end
77
+
78
+ def concatenate(other_arrays)
79
+ total_size = length + other_arrays.sum(&:length)
80
+ vector = self.class::Vector.new("", Arrow.allocator)
81
+ vector.allocate_new(total_size)
82
+ appender = VectorAppender.new(vector)
83
+ @vector.accept(appender, nil)
84
+ other_arrays.each do |other_array|
85
+ other_array.vector.accept(appender, nil)
86
+ end
87
+ self.class.new(vector)
88
+ end
89
+ end
90
+
91
+ class Int8Array < Array
92
+ Vector = org.apache.arrow.vector.SmallIntVector
93
+ ValueDataType = Int8DataType
94
+ end
95
+
96
+ class Int32Array < Array
97
+ Vector = org.apache.arrow.vector.IntVector
98
+ ValueDataType = Int32DataType
99
+ end
100
+
101
+ class FixedSizeBinaryArray < Array
102
+ end
103
+
104
+ class StructArray < Array
105
+ def fields
106
+ raise NotImplementedError
107
+ end
108
+ end
109
+ end
@@ -15,14 +15,22 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- module Helper
19
- module Fixture
20
- def fixture_dir
21
- Pathname.new(__dir__).join("..", "fixture").expand_path
18
+ module Arrow
19
+ class ChunkedArray
20
+ def initialize(arrays)
21
+ @arrays = arrays
22
22
  end
23
23
 
24
- def fixture_path(*components)
25
- fixture_dir.join(*components)
24
+ def n_rows
25
+ @arrays.sum(&:size)
26
+ end
27
+
28
+ def chunks
29
+ @arrays
30
+ end
31
+
32
+ def get_chunk(i)
33
+ @arrays[i]
26
34
  end
27
35
  end
28
36
  end
@@ -0,0 +1,26 @@
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 Arrow
19
+ class CompressionType
20
+ class << self
21
+ def values
22
+ []
23
+ end
24
+ end
25
+ end
26
+ end
@@ -15,12 +15,18 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- class BooleanScalarTest < Test::Unit::TestCase
19
- def setup
20
- @scalar = Arrow::BooleanScalar.new(true)
21
- end
18
+ module Arrow
19
+ class CSVReadOptions
20
+ def add_column_type(name, type)
21
+ raise NotImplementedError
22
+ end
23
+
24
+ def delimiter
25
+ raise NotImplementedError
26
+ end
22
27
 
23
- test("#value") do
24
- assert_equal(true, @scalar.value)
28
+ def delimiter=(delimiter)
29
+ raise NotImplementedError
30
+ end
25
31
  end
26
32
  end
@@ -15,22 +15,34 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- class MapDataTypeTest < Test::Unit::TestCase
19
- sub_test_case(".new") do
20
- def setup
21
- @key = :int8
22
- @item = :string
18
+ module Arrow
19
+ class DataType
20
+ def initialize
21
+ @minor_type = self.class::MinorType
23
22
  end
23
+ end
24
+
25
+ class Int8DataType < DataType
26
+ MinorType = org.apache.arrow.vector.types.Types::MinorType::SMALLINT
27
+ end
24
28
 
25
- test("ordered arguments") do
26
- assert_equal("map<int8, string>",
27
- Arrow::MapDataType.new(@key, @item).to_s)
29
+ class Int32DataType < DataType
30
+ MinorType = org.apache.arrow.vector.types.Types::MinorType::INT
31
+ end
32
+
33
+ class Decimal128DataType < DataType
34
+ class << self
35
+ def max_precision
36
+ 38
37
+ end
28
38
  end
39
+ end
29
40
 
30
- test("description") do
31
- assert_equal("map<int8, string>",
32
- Arrow::MapDataType.new(key: @key,
33
- item: @item).to_s)
41
+ class Decimal256DataType < DataType
42
+ class << self
43
+ def max_precision
44
+ 76
45
+ end
34
46
  end
35
47
  end
36
48
  end
@@ -0,0 +1,28 @@
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 Arrow
19
+ class Decimal128
20
+ def abs
21
+ raise NotImplementedError
22
+ end
23
+
24
+ def negate
25
+ raise NotImplementedError
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
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 Arrow
19
+ class Decimal256
20
+ def abs
21
+ raise NotImplementedError
22
+ end
23
+
24
+ def negate
25
+ raise NotImplementedError
26
+ end
27
+ end
28
+ end
@@ -14,7 +14,10 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
- name,score
18
- alice,10
19
- bob,""
20
- chris,-1
17
+
18
+ module Arrow
19
+ class Error < StandardError
20
+ class Invalid < Error
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,24 @@
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 Arrow
19
+ class FileSystem
20
+ def open_output_stream(path)
21
+ raise NotImplementedError
22
+ end
23
+ end
24
+ end
@@ -15,9 +15,10 @@
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
17
 
18
- class NullArrayTest < Test::Unit::TestCase
19
- test("#[]") do
20
- array = Arrow::NullArray.new(1)
21
- assert_nil(array[0])
18
+ module Arrow
19
+ class Function
20
+ def execute(args, options=nil, context=nil)
21
+ raise NotImplementedError
22
+ end
22
23
  end
23
24
  end
@@ -0,0 +1,24 @@
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 Arrow
19
+ class RecordBatchIterator
20
+ def to_list
21
+ raise NotImplementedError
22
+ end
23
+ end
24
+ end
@@ -14,7 +14,11 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
- score
18
- 10
19
- 2.9
20
- -1.1
17
+
18
+ module Arrow
19
+ class RecordBatch
20
+ def n_rows
21
+ raise NotImplementedError
22
+ end
23
+ end
24
+ end
@@ -14,7 +14,11 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
- score
18
- 2.9
19
- 10
20
- -1.1
17
+
18
+ module Arrow
19
+ class SortKey
20
+ def target
21
+ raise NotImplementedError
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
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 Arrow
19
+ class SortOptions
20
+ def add_sort_key(target, order=nil)
21
+ raise NotImplementedError
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,25 @@
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 Arrow
19
+ class StreamListenerRaw
20
+ class << self
21
+ def type_register
22
+ end
23
+ end
24
+ end
25
+ end