hiroyuki-sato commented on code in PR #45468:
URL: https://github.com/apache/arrow/pull/45468#discussion_r1947671728
##########
c_glib/test/test-table.rb:
##########
@@ -274,6 +274,79 @@ def test_invalid
end
end
+=begin
+ sub_test_case("#validate_full") do
+ def setup
+ @id_field = Arrow::Field.new("id", Arrow::UInt8DataType.new)
+ @name_field = Arrow::Field.new("name", Arrow::StringDataType.new)
+ @schema = Arrow::Schema.new([@id_field, @name_field])
+
+ @id_array = build_uint_array([1])
+ @name_array = build_string_array(["abc"])
+ @arrays = [@id_array, @name_array]
+ end
+
+ def test_valid
+ table = Arrow::Table.new(@schema, @arrays)
+
+ assert do
+ table.validate
+ end
+ end
+
+ def test_invalid
+ message = "[table][validate]: Invalid: " +
+ "Column 1 named name expected length 1 but got length 2"
+
+ invalid_values = [@id_array, build_string_array(["abc", "def"])]
+ table = Arrow::Table.new(@schema, invalid_values)
+ assert_raise(Arrow::Error::Invalid.new(message)) do
+ table.validate
+ end
+ end
+ end
+=end
Review Comment:
Ah, Thanks! Removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]