Skip to content

GH-44762: [GLib] Add garrow_table_validate_full() - #45468

Merged
kou merged 7 commits into
apache:mainfrom
hiroyuki-sato:topic/arrow-table-validate-full
Feb 9, 2025
Merged

kou merged 7 commits into
apache:mainfrom
hiroyuki-sato:topic/arrow-table-validate-full

Conversation

@hiroyuki-sato

@hiroyuki-sato hiroyuki-sato commented Feb 8, 2025 •

Copy link
Copy Markdown
Collaborator

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.

@hiroyuki-sato
hiroyuki-sato requested a review from kou as a code owner February 8, 2025 02:33
@github-actions

github-actions Bot commented Feb 8, 2025

Copy link
Copy Markdown

⚠️ GitHub issue #44762 has been automatically assigned in GitHub to PR creator.

Comment thread c_glib/test/test-table.rb Outdated
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, Thanks! Removed.

Comment thread c_glib/test/test-table.rb Resolved
Comment thread c_glib/test/test-table.rb Resolved
Comment thread c_glib/test/test-table.rb Resolved
Comment thread c_glib/arrow-glib/table.cpp Resolved

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou
kou merged commit e32f56b into apache:main Feb 9, 2025
@hiroyuki-sato
hiroyuki-sato deleted the topic/arrow-table-validate-full branch February 9, 2025 10:40
@conbench-apache-arrow

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants