Skip to content

GH-49634: [Ruby][Integration] Follow dictionary array API change#49635

Merged
kou merged 1 commit into
apache:mainfrom
kou:ruby-integration-test
Apr 1, 2026
Merged

GH-49634: [Ruby][Integration] Follow dictionary array API change#49635
kou merged 1 commit into
apache:mainfrom
kou:ruby-integration-test

Conversation

@kou

@kou kou commented Apr 1, 2026

Copy link
Copy Markdown
Member

Rationale for this change

GH-49621 changed dictionary array related API but we didn't follow the API change in integration test code.

What changes are included in this PR?

Follow dictionary array related API change in integration test code.

Are these changes tested?

Yes.

Are there any user-facing changes?

No.

Copilot AI review requested due to automatic review settings April 1, 2026 09:37
@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the Ruby Arrow integration JSON reader to follow the dictionary-array API change introduced in GH-49621, so dictionary-encoded columns are constructed with the expected dictionary wrapper type.

Changes:

  • Wrap the dictionary value array returned from read_dictionary in an ArrowFormat::Dictionary object.
  • Pass the wrapped dictionary object into DictionaryType#build_array as the dictionaries collection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

validity_buffer = read_bitmap(column["VALIDITY"])
indices_buffer = read_values(column["DATA"], type.index_type)
dictionary = read_dictionary(type.id, type.value_type)
dictionary_array = read_dictionary(type.id, type.value_type)

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

read_dictionary can return nil when the dictionary id isn't present in the JSON. Wrapping that in Dictionary.new(type.id, dictionary_array) will defer the failure to a later NoMethodError (e.g., when DictionaryArray#to_a calls dictionary.array). Consider raising a clear exception here if dictionary_array is nil (include the dictionary id and value type) to fail fast with an actionable error.

Suggested change
dictionary_array = read_dictionary(type.id, type.value_type)
dictionary_array = read_dictionary(type.id, type.value_type)
if dictionary_array.nil?
raise "Dictionary with id #{type.id} and value type " \
"#{type.value_type.inspect} is missing from JSON dictionaries"
end

Copilot uses AI. Check for mistakes.
@kou

kou commented Apr 1, 2026

Copy link
Copy Markdown
Member Author

+1

Integration test passes again.

@kou kou merged commit 3c25e69 into apache:main Apr 1, 2026
17 checks passed
@kou kou removed the awaiting committer review Awaiting committer review label Apr 1, 2026
@kou kou deleted the ruby-integration-test branch April 1, 2026 10:27
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 2 benchmarking runs that have been run so far on merge-commit 3c25e69.

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.

@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 2 benchmarking runs that have been run so far on merge-commit 3c25e69.

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.

thisisnic pushed a commit to thisisnic/arrow that referenced this pull request Apr 6, 2026
apache#49635)

### Rationale for this change

apacheGH-49621 changed dictionary array related API but we didn't follow the API change in integration test code.

### What changes are included in this PR?

Follow dictionary array related API change in integration test code.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#49634

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Mottl pushed a commit to Mottl/arrow that referenced this pull request May 26, 2026
apache#49635)

### Rationale for this change

apacheGH-49621 changed dictionary array related API but we didn't follow the API change in integration test code.

### What changes are included in this PR?

Follow dictionary array related API change in integration test code.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#49634

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
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