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 testchunkedPackTwoPasses to copy from the bounce buffer #15220

Merged

Conversation

abellina
Copy link
Contributor

@abellina abellina commented Mar 4, 2024

This is a follow on from #15210. We bring back the test and fix it so it copies from the right buffer this time. I also set the original column to have some values and nulls, to make sure we are checking something interesting.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Signed-off-by: Alessandro Bellina <abellina@nvidia.com>
@abellina abellina requested a review from a team as a code owner March 4, 2024 15:57
Copy link

copy-pr-bot bot commented Mar 4, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions bot added the cuDF (Java) Affects Java cuDF API. label Mar 4, 2024
@abellina abellina added bug Something isn't working tests Unit testing for project non-breaking Non-breaking change labels Mar 4, 2024
@davidwendt
Copy link
Contributor

/ok to test

Copy link
Contributor

@gerashegalov gerashegalov left a comment

Choose a reason for hiding this comment

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

LGTM, nit

Comment on lines 3748 to 3751
for (int i = 0; i < longs.length; i++) {
// fill the column and set every other value to null
longs[i] = i % 2 == 0 ? null : (long)i;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Since null is the default value for object references we could simply skip even positions

Suggested change
for (int i = 0; i < longs.length; i++) {
// fill the column and set every other value to null
longs[i] = i % 2 == 0 ? null : (long)i;
}
// Initialize elements at odd-numbered indices
for (int i = 1; i < longs.length; i += 2) {
longs[i] = (long)i;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Will the untouched values of longs be uninitialized (containing garbage value)?

Copy link
Contributor

Choose a reason for hiding this comment

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

https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.12.5

Each class variable, instance variable, or array component is initialized with a default value when it is created
...
for all reference types (§4.3), the default value is null.

Signed-off-by: Alessandro Bellina <abellina@nvidia.com>
@abellina
Copy link
Contributor Author

abellina commented Mar 4, 2024

/ok to test

@abellina
Copy link
Contributor Author

abellina commented Mar 5, 2024

/merge

@rapids-bot rapids-bot bot merged commit f804aa6 into rapidsai:branch-24.04 Mar 5, 2024
73 checks passed
@abellina abellina deleted the fix_table_test_chunked_pack branch March 5, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuDF (Java) Affects Java cuDF API. non-breaking Non-breaking change tests Unit testing for project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants