Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing dict_id #1068

Merged
merged 8 commits into from
Jul 14, 2023
Merged

fix: add missing dict_id #1068

merged 8 commits into from
Jul 14, 2023

Conversation

jiacai2050
Copy link
Contributor

@jiacai2050 jiacai2050 commented Jul 12, 2023

Rationale

When schema has more than one dict fields, datafusion may lose the dict_id, which will cause an error in the record batch encode, and the client decoded the record batch via ipc will throw following errors:

DecodeArrowPayload(InvalidArgumentError("Value at position 0 out of bounds: 0 (should be in [0, -1])"))

More context: apache/datafusion#6784

Detailed Changes

  • Assign unique dict id when there are more than one dict fields.

Test Plan

UT and integration tests.

@jiacai2050 jiacai2050 marked this pull request as ready for review July 13, 2023 03:26
components/arrow_ext/src/ipc.rs Outdated Show resolved Hide resolved
components/arrow_ext/src/ipc.rs Outdated Show resolved Hide resolved
@tanruixiang tanruixiang changed the title fix: add missing dict id fix: add missing dict_id Jul 13, 2023
Copy link
Contributor

@Rachelint Rachelint left a comment

Choose a reason for hiding this comment

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

LGTM

@jiacai2050 jiacai2050 merged commit c22146b into apache:main Jul 14, 2023
@jiacai2050 jiacai2050 deleted the fix-dict-col branch July 14, 2023 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants