-
Notifications
You must be signed in to change notification settings - Fork 9
fix: handle nulls in transpose #347
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
Conversation
WalkthroughThe changes improve error handling in PivotUtils.scala by updating the transpose method to check for null and NaN values, replacing them with a magic constant. Additionally, a new test in PivotUtilsTest.scala ensures that null values in percentile lists are correctly substituted, without affecting public interfaces. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Transpose
Caller->>Transpose: Call transpose(list, pctIndex)
alt list is null
Transpose-->>Caller: Return null
else list is not null
Transpose->>Transpose: Retrieve value at pctIndex
alt value is null or NaN
Transpose-->>Caller: Return Constants.magicNullDouble
else value is valid
Transpose-->>Caller: Return value
end
end
Possibly related PRs
Suggested reviewers
Poem
Warning Review ran into problems🔥 ProblemsGitHub Actions and Pipeline Checks: Resource not accessible by integration - https://docs.github.com/rest/actions/workflow-runs#list-workflow-runs-for-a-repository. Please grant the required permissions to the CodeRabbit GitHub App under the organization or repository settings. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
sean-zlai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
## Summary We need to make sure no nulls get passed thru the transpose method. should wrap up this ticket: https://app.asana.com/0/1208277377735902/1209343355165466 ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Enhanced error handling ensures that invalid or missing values are consistently processed, leading to more reliable data outcomes. - **Tests** - Added test cases to validate the updated handling of null and non-numeric values, ensuring robustness in data processing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary We need to make sure no nulls get passed thru the transpose method. should wrap up this ticket: https://app.asana.com/0/1208277377735902/1209343355165466 ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Enhanced error handling ensures that invalid or missing values are consistently processed, leading to more reliable data outcomes. - **Tests** - Added test cases to validate the updated handling of null and non-numeric values, ensuring robustness in data processing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary We need to make sure no nulls get passed thru the transpose method. should wrap up this ticket: https://app.asana.com/0/1208277377735902/1209343355165466 ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Enhanced error handling ensures that invalid or missing values are consistently processed, leading to more reliable data outcomes. - **Tests** - Added test cases to validate the updated handling of null and non-numeric values, ensuring robustness in data processing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary We need to make sure no nulls get passed thru the transpose method. should wrap up this ticket: https://app.asana.com/0/1208277377735902/1209343355165466 ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Enhanced error handling ensures that invalid or missing values are consistently processed, leading to more reliable data outcomes. - **Tests** - Added test cases to validate the updated handling of null and non-numeric values, ensuring robustness in data processing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Summary We need to make sure no nulls get passed thru the transpose method. should wrap up this tiour clientset: https://app.asana.com/0/1208277377735902/1209343355165466 ## Cheour clientslist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Enhanced error handling ensures that invalid or missing values are consistently processed, leading to more reliable data outcomes. - **Tests** - Added test cases to validate the updated handling of null and non-numeric values, ensuring robustness in data processing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
We need to make sure no nulls get passed thru the transpose method. should wrap up this ticket: https://app.asana.com/0/1208277377735902/1209343355165466
Checklist
Summary by CodeRabbit