Sha256: 1d3a15c48cdcd661f2fe8507a09f0d0b16e25d3c9c060a8a302fc4421647b70f

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

# Copyright 2017 Kouhei Sutou <kou@clear-code.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

class TableTest < Test::Unit::TestCase
  test("#columns") do
    fields = [
      Arrow::Field.new("count", :uint32),
      Arrow::Field.new("visible", :boolean),
    ]
    schema = Arrow::Schema.new(fields)
    columns = [
      Arrow::Column.new(fields[0],
                        Arrow::UInt32Array.new([1, 2, 4, 8])),
      Arrow::Column.new(fields[1],
                        Arrow::BooleanArray.new([true, false, nil, true])),
    ]
    table = Arrow::Table.new(schema, columns)
    assert_equal(["count", "visible"],
                 table.columns.collect(&:name))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
red-arrow-0.4.1 test/test-table.rb
red-arrow-0.4.0 test/test-table.rb
red-arrow-0.3.1 test/test-table.rb