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

ARROW-17733: [C++] Take index_width into account when filling nulls in index buffer #14129

Merged
merged 5 commits into from
Sep 16, 2022

Conversation

rasnjo
Copy link
Contributor

@rasnjo rasnjo commented Sep 14, 2022

Take into account index_width when offsetting by position into out_data. Otherwise we offset position bytes into the array, but we want to offset position places into the array.

@github-actions
Copy link

@github-actions
Copy link

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Good catch, and thank you for fixing this!

auto dict_type = dictionary(uint16(), utf8());
auto dict_one = DictArrayFromJSON(dict_type, "[]", "[]");
auto dict_two = DictArrayFromJSON(dict_type, "[0, 1, null]", "[\"A0\", \"A1\"]");
ASSERT_OK_AND_ASSIGN(auto concat_actual, Concatenate({dict_one, dict_two}));
Copy link
Member

Choose a reason for hiding this comment

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

nit: it might be worth concatenating with a run of a few nulls?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good suggestion, makes sense. Done in commit: 204981d

@@ -539,4 +539,14 @@ TEST_F(ConcatenateTest, OffsetOverflow) {
ASSERT_RAISES(Invalid, Concatenate({fake_long, fake_long}).status());
}

TEST_F(ConcatenateTest, DictionaryConcatenateWithEmptyUint16) {
auto dict_type = dictionary(uint16(), utf8());
Copy link
Member

@pitrou pitrou Sep 15, 2022

Choose a reason for hiding this comment

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

Could you add a comment here mentioning the JIRA number?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, done now (commit: 8d02222)

@lidavidm
Copy link
Member

Alright, the test failures look to be unrelated to what's going on here/are tracked elsewhere, so this should be good. Thanks!

@lidavidm lidavidm merged commit 68e0fa7 into apache:master Sep 16, 2022
@ursabot
Copy link

ursabot commented Sep 17, 2022

Benchmark runs are scheduled for baseline = 6926672 and contender = 68e0fa7. 68e0fa7 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.17% ⬆️0.0%] test-mac-arm
[Failed ⬇️0.28% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️1.24% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 68e0fa74 ec2-t3-xlarge-us-east-2
[Finished] 68e0fa74 test-mac-arm
[Failed] 68e0fa74 ursa-i9-9960x
[Finished] 68e0fa74 ursa-thinkcentre-m75q
[Finished] 69266721 ec2-t3-xlarge-us-east-2
[Finished] 69266721 test-mac-arm
[Failed] 69266721 ursa-i9-9960x
[Finished] 69266721 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented Sep 17, 2022

['Python', 'R'] benchmarks have high level of regressions.
test-mac-arm
ursa-i9-9960x

zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
…n index buffer (apache#14129)

Take into account index_width when offsetting by position into out_data. Otherwise we offset position bytes into the array, but we want to offset position places into the array.

Authored-by: Rasmus Johansen <[email protected]>
Signed-off-by: David Li <[email protected]>
fatemehp pushed a commit to fatemehp/arrow that referenced this pull request Oct 17, 2022
…n index buffer (apache#14129)

Take into account index_width when offsetting by position into out_data. Otherwise we offset position bytes into the array, but we want to offset position places into the array.

Authored-by: Rasmus Johansen <[email protected]>
Signed-off-by: David Li <[email protected]>
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.

4 participants