-
Notifications
You must be signed in to change notification settings - Fork 181
New added commands should throw exception when calcite disabled #3571
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
Signed-off-by: Lantao Jin <[email protected]>
Signed-off-by: Lantao Jin <[email protected]>
|
If customer set calcite and fallback both enabled, and submit an incorrect query with new commands, it seems will return error "xxx is supported only when plugins.calcite.enabled=true" as it will always fallback to v2. But the expected error message should be the exception message thrown by calcite. |
| protected static boolean isFallbackEnabled() throws IOException { | ||
| return Boolean.parseBoolean( | ||
| getClusterSetting(Settings.Key.CALCITE_FALLBACK_ALLOWED.getKeyValue(), "persistent")); | ||
| protected static boolean isFallbackEnabled() { |
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.
Just curious, what's the concern of changing IOException to RuntimeException.
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.
revert
Maybe we should show Calcite's error message, if fallback to v2 also ends with failure. |
Signed-off-by: Lantao Jin <[email protected]>
addressed. |
Signed-off-by: Lantao Jin <[email protected]>
|
The commit b9cbb9b fails due to #3445 (comment) |
| if (shouldUseCalcite(queryType) && isCalciteFallbackAllowed()) { | ||
| // if there is a failure thrown from Calcite and execution after fallback V2 | ||
| // keeps failure, we should throw the failure from Calcite. | ||
| calciteFailure.ifPresentOrElse( |
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.
Do we have IT for this feature?
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.
done
Signed-off-by: Lantao Jin <[email protected]>
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-3.0 3.0
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-3.0
# Create a new branch
git switch --create backport/backport-3571-to-3.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 69b9e82b35a8d2b856ec7c6ae7dd2487a8c16a3a
# Push it to GitHub
git push --set-upstream origin backport/backport-3571-to-3.0
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-3.0Then, create a pull request where the |
…search-project#3571) * New added commands should throw exception when calcite disabled Signed-off-by: Lantao Jin <[email protected]> * remove useless code Signed-off-by: Lantao Jin <[email protected]> * address comments Signed-off-by: Lantao Jin <[email protected]> * fix UT Signed-off-by: Lantao Jin <[email protected]> * Add a new IT case Signed-off-by: Lantao Jin <[email protected]> --------- Signed-off-by: Lantao Jin <[email protected]> (cherry picked from commit 69b9e82)
… (#3582) * New added commands should throw exception when calcite disabled Signed-off-by: Lantao Jin <[email protected]> * remove useless code Signed-off-by: Lantao Jin <[email protected]> * address comments Signed-off-by: Lantao Jin <[email protected]> * fix UT Signed-off-by: Lantao Jin <[email protected]> * Add a new IT case Signed-off-by: Lantao Jin <[email protected]> --------- Signed-off-by: Lantao Jin <[email protected]> (cherry picked from commit 69b9e82)
* New added commands should throw exception when calcite disabled Signed-off-by: Lantao Jin <[email protected]> * remove useless code Signed-off-by: Lantao Jin <[email protected]> * address comments Signed-off-by: Lantao Jin <[email protected]> * fix UT Signed-off-by: Lantao Jin <[email protected]> * Add a new IT case Signed-off-by: Lantao Jin <[email protected]> --------- Signed-off-by: Lantao Jin <[email protected]> Signed-off-by: xinyual <[email protected]>
Description
New added commands should throw exception when calcite disabled
Related Issues
Resolves #3568 and #3567
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.