Repository navigation
GH-44762: [GLib] Add garrow_table_validate_full() - #45468
Merged
Merged
Conversation
|
|
kou
reviewed
Feb 8, 2025
Comment on lines
+277
to
+308
| =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 |
Collaborator
Author
There was a problem hiding this comment.
Ah, Thanks! Removed.
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
kou
reviewed
Feb 9, 2025
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit e32f56b. There were 8 benchmark results with an error:
There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Table::ValidateFull available in the C++ API.
But, GLib doesn't support that method yet.
What changes are included in this PR?
This PR adds a full validation method to the table class.
Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.
garrow_table_validate_full()#44762