Fix flaky/consistent SystemFunctionsIT.testTypeofArithmetic after int-operand widening - #22416
Fix flaky/consistent SystemFunctionsIT.testTypeofArithmetic after int-operand widening#22416ahkcs wants to merge 7 commits into
Conversation
opensearch-project/sql#5603 widens narrow integer operands (byte/short/int) before +, -, * so the result cannot overflow the inferred type, which makes `int0 * 2` infer as BIGINT instead of INT. Update the typeof assertion (and its comment) to expect "BIGINT", matching the merged SQL behavior. This IT has been failing consistently on main since that grammar/lowering change landed. Test-only change. Signed-off-by: Kai Huang <ahkcs@amazon.com>
PR Reviewer Guide 🔍(Review updated until commit 840c4f3)Here are some key observations to aid the review process:
|
…rch.org mirror; unrelated to this test-only change) Signed-off-by: Kai Huang <ahkcs@amazon.com>
|
Persistent review updated to latest commit ae725ab |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22416 +/- ##
============================================
- Coverage 73.44% 73.43% -0.02%
+ Complexity 76488 76424 -64
============================================
Files 6104 6104
Lines 346576 346578 +2
Branches 49885 49886 +1
============================================
- Hits 254558 254505 -53
- Misses 71736 71766 +30
- Partials 20282 20307 +25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Persistent review updated to latest commit 6de4aac |
|
Persistent review updated to latest commit 70642be |
|
❌ Gradle check result for 70642be: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Persistent review updated to latest commit 1afb91b |
Signed-off-by: Kai Huang <ahkcs@amazon.com>
|
Persistent review updated to latest commit 84b5c32 |
|
Persistent review updated to latest commit 840c4f3 |
|
❌ Gradle check result for 840c4f3: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
SystemFunctionsIT.testTypeofArithmetichas been failing consistently onmain:This is an expected behavior change, not a regression. opensearch-project/sql#5603 widens narrow integer operands (byte/short/int) before
+,-,*so the result cannot overflow the inferred type. As a result,int0 * 2now infers as BIGINT instead of INT, andtypeof(int0 * 2)correctly returns"BIGINT". The QA assertion was written against the old (overflow-prone) INT inference and needs to reflect the new, correct type.Change
Update the
typeof(int0 * 2)assertion (and its comment) to expect"BIGINT". Test-only; no production code change.Testing
./gradlew ':sandbox:qa:analytics-engine-rest:integTest' --tests 'org.opensearch.analytics.qa.SystemFunctionsIT.testTypeofArithmetic'(sandbox, JDK 25).Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.