-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Issue #12367 testCaseTransformFunctionWithIntResults test fix #12922
Conversation
build was failing during checkstyle violation, fixed it |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12922 +/- ##
============================================
+ Coverage 61.75% 62.17% +0.42%
+ Complexity 207 198 -9
============================================
Files 2436 2502 +66
Lines 133233 136670 +3437
Branches 20636 21164 +528
============================================
+ Hits 82274 84977 +2703
- Misses 44911 45410 +499
- Partials 6048 6283 +235
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thanks for the fix! Can you also add a special test which will fail if the cast doesn't exist?
...c/test/java/org/apache/pinot/core/operator/transform/function/CaseTransformFunctionTest.java
Outdated
Show resolved
Hide resolved
sure |
Created a separate projectionBlock object to hold such float value, so as to not interfere with variables in the parent class. |
8edbe38
to
254ce45
Compare
Hello @Jackie-Jiang, please let me know your thoughts on the newly added negative scenario test. |
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.
There should be an easier way to test this behavior without creating a new segment:
We can loop over the random float values from _floatSVValues
and pick a value that is floatValue != (float) Double.parseDouble(Float.toString(floatValue))
...c/test/java/org/apache/pinot/core/operator/transform/function/CaseTransformFunctionTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/org/apache/pinot/core/operator/transform/function/CaseTransformFunctionTest.java
Outdated
Show resolved
Hide resolved
Shouldn't something like 0.1f satisfy this condition? |
|
The new test case in PR has We compare float( |
We can use following which breaks for 0.1f and pass by using CAST.
|
flaky test fix Issue #12367