-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ensure procedure_state and migrate_region can be only called un…
…der greptime catalog
- Loading branch information
1 parent
0518471
commit 83cc11f
Showing
7 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// Ensure current function is invokded under `greptime` catalog. | ||
#[macro_export] | ||
macro_rules! ensure_greptime { | ||
($func_ctx: expr) => {{ | ||
use common_catalog::consts::DEFAULT_CATALOG_NAME; | ||
snafu::ensure!( | ||
$func_ctx.query_ctx.current_catalog() == DEFAULT_CATALOG_NAME, | ||
common_query::error::PermissionDeniedSnafu { | ||
err_msg: format!("current catalog is not {DEFAULT_CATALOG_NAME}") | ||
} | ||
); | ||
}}; | ||
} |
This file contains 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
This file contains 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
This file contains 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