[CALCITE-5921] SqlOperatorFixture.checkFails and checkAggFails don't check runtime failure#3471
Merged
rubenada merged 1 commit intoapache:mainfrom Oct 25, 2023
Merged
Conversation
…check runtime failure Signed-off-by: Mihai Budiu <mbudiu@gmail.com>
Contributor
Author
|
Thanks to @herunkang2018 for the original PR on which this one is based. |
|
Kudos, SonarCloud Quality Gate passed! |
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








This supersedes #3412.
Like #3412, this temporarily disables a test for a regression described by https://issues.apache.org/jira/browse/CALCITE-5990.
I have a pending PR fixing 5990, but it needs this PR to be merged first.
As https://issues.apache.org/jira/browse/CALCITE-5921 has pointed out, none of the checkFails test that fail at runtime were ever executed. This PR (like #3412) remedies this situation, and it also corrects some error messages which were never validated. Some of these error messages leak internal compiler data structures (e.g., "was not expecting value for enumeration), but cleaning them should be part of a future PR.
While trying to fix 5990 I have discovered that the tests that were run by
fixture.checkFailwere rewritten in different ways from the tests that were executed byfixture.checkScalar*. So it was possible to have test T such thatf.checkScalar(T)fails with an exception butf.checkFails(T)fails because no exception is thrown! The change to SqlRuntimeTester ensures that the same test is run, and thus the execution proceeds in both cases in the same way. This change is in addition to the changes in #3412.As soon as this PR is merged I will submit a fix for CALCITE-5990 as well.