arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-744: [GLib] Re-add an assertion for garrow_table_new() test
Date Fri, 31 Mar 2017 16:57:53 GMT
Repository: arrow
Updated Branches:
  refs/heads/master ad8a0cfec -> e5b682760


ARROW-744: [GLib] Re-add an assertion for garrow_table_new() test

Author: Kouhei Sutou <kou@clear-code.com>

Closes #469 from kou/glib-re-add-assertion-to-garrow-table-new-test and squashes the following
commits:

64c2e50 [Kouhei Sutou] [GLib] Re-add an assertion for garrow_table_new() test


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/e5b68276
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/e5b68276
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/e5b68276

Branch: refs/heads/master
Commit: e5b682760614a2a51e9587afbb4b9b676e59e5a9
Parents: ad8a0cf
Author: Kouhei Sutou <kou@clear-code.com>
Authored: Fri Mar 31 12:57:46 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Fri Mar 31 12:57:46 2017 -0400

----------------------------------------------------------------------
 c_glib/test/test-table.rb | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/e5b68276/c_glib/test/test-table.rb
----------------------------------------------------------------------
diff --git a/c_glib/test/test-table.rb b/c_glib/test/test-table.rb
index 0583e81..e2b71b3 100644
--- a/c_glib/test/test-table.rb
+++ b/c_glib/test/test-table.rb
@@ -30,6 +30,25 @@ class TestTable < Test::Unit::TestCase
         Arrow::Column.new(fields[1], build_boolean_array([false])),
       ]
       table = Arrow::Table.new(schema, columns)
+
+      data = table.n_columns.times.collect do |i|
+        column = table.get_column(i)
+        values = []
+        column.data.chunks.each do |chunk|
+          chunk.length.times do |j|
+            values << chunk.get_value(j)
+          end
+        end
+        [
+          column.name,
+          values,
+        ]
+      end
+      assert_equal([
+                     ["visible", [true]],
+                     ["valid", [false]],
+                   ],
+                   data)
     end
   end
 


Mime
View raw message