From 7abfa9616e84d047bfcb72821c15df46acf06a48 Mon Sep 17 00:00:00 2001 From: TCeason <33082201+TCeason@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:18:33 +0800 Subject: [PATCH] feat(query): support SHOW DROP DATABASES (#16811) add system.databases_with_history --- src/meta/api/src/schema_api_impl.rs | 1 - src/query/ast/src/ast/statements/database.rs | 20 + src/query/ast/src/ast/statements/statement.rs | 2 + src/query/ast/src/ast/statements/table.rs | 2 +- src/query/ast/src/parser/statement.rs | 14 + src/query/ast/tests/it/parser.rs | 2 + src/query/ast/tests/it/testdata/stmt.txt | 36 +- src/query/catalog/src/catalog/interface.rs | 3 + .../src/catalogs/default/database_catalog.rs | 11 + .../src/catalogs/default/immutable_catalog.rs | 4 + .../src/catalogs/default/mutable_catalog.rs | 27 + .../src/catalogs/default/session_catalog.rs | 5 + .../src/databases/system/system_database.rs | 6 +- .../access/management_mode_access.rs | 1 + .../interpreters/access/privilege_access.rs | 4 +- .../tests/it/sql/exec/get_table_bind_test.rs | 4 + .../it/storages/fuse/operations/commit.rs | 4 + src/query/service/tests/it/storages/system.rs | 23 +- .../it/storages/testdata/columns_table.txt | 1016 +++++++++-------- .../it/storages/testdata/databases_table.txt | 14 +- .../testdata/databases_with_history_table.txt | 12 + src/query/sql/src/planner/binder/binder.rs | 1 + .../sql/src/planner/binder/ddl/database.rs | 42 + src/query/sql/src/planner/plans/plan.rs | 1 + .../storages/hive/hive/src/hive_catalog.rs | 5 + src/query/storages/iceberg/src/catalog.rs | 4 + .../storages/system/src/databases_table.rs | 193 +++- src/query/storages/system/src/lib.rs | 2 + .../base/06_show/06_0009_show_databases.test | 5 + .../18_rbac/18_0003_db_visibility.result | 4 + .../18_rbac/18_0003_db_visibility.sh | 6 + 31 files changed, 906 insertions(+), 568 deletions(-) create mode 100644 src/query/service/tests/it/storages/testdata/databases_with_history_table.txt diff --git a/src/meta/api/src/schema_api_impl.rs b/src/meta/api/src/schema_api_impl.rs index 814ddc85d2ca..6070e4cac9aa 100644 --- a/src/meta/api/src/schema_api_impl.rs +++ b/src/meta/api/src/schema_api_impl.rs @@ -669,7 +669,6 @@ impl + ?Sized> SchemaApi for KV { name_ident: DatabaseNameIdent::new_from(db_id_list_key.clone()), meta: db_meta, }; - dbs.insert(db_id.db_id, Arc::new(db)); } } diff --git a/src/query/ast/src/ast/statements/database.rs b/src/query/ast/src/ast/statements/database.rs index 8541dd95c0fb..9f3808d99dce 100644 --- a/src/query/ast/src/ast/statements/database.rs +++ b/src/query/ast/src/ast/statements/database.rs @@ -49,6 +49,26 @@ impl Display for ShowDatabasesStmt { } } +#[derive(Debug, Clone, PartialEq, Drive, DriveMut)] +pub struct ShowDropDatabasesStmt { + pub catalog: Option, + pub limit: Option, +} + +impl Display for ShowDropDatabasesStmt { + fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { + write!(f, "SHOW DROP DATABASES")?; + if let Some(catalog) = &self.catalog { + write!(f, " FROM {catalog}")?; + } + if let Some(limit) = &self.limit { + write!(f, " {limit}")?; + } + + Ok(()) + } +} + #[derive(Debug, Clone, PartialEq, Eq, Drive, DriveMut)] pub struct ShowCreateDatabaseStmt { pub catalog: Option, diff --git a/src/query/ast/src/ast/statements/statement.rs b/src/query/ast/src/ast/statements/statement.rs index 6ccf682ddc0f..0c520fbd0b44 100644 --- a/src/query/ast/src/ast/statements/statement.rs +++ b/src/query/ast/src/ast/statements/statement.rs @@ -127,6 +127,7 @@ pub enum Statement { // Databases ShowDatabases(ShowDatabasesStmt), + ShowDropDatabases(ShowDropDatabasesStmt), ShowCreateDatabase(ShowCreateDatabaseStmt), CreateDatabase(CreateDatabaseStmt), DropDatabase(DropDatabaseStmt), @@ -548,6 +549,7 @@ impl Display for Statement { Statement::CreateCatalog(stmt) => write!(f, "{stmt}")?, Statement::DropCatalog(stmt) => write!(f, "{stmt}")?, Statement::ShowDatabases(stmt) => write!(f, "{stmt}")?, + Statement::ShowDropDatabases(stmt) => write!(f, "{stmt}")?, Statement::ShowCreateDatabase(stmt) => write!(f, "{stmt}")?, Statement::CreateDatabase(stmt) => write!(f, "{stmt}")?, Statement::DropDatabase(stmt) => write!(f, "{stmt}")?, diff --git a/src/query/ast/src/ast/statements/table.rs b/src/query/ast/src/ast/statements/table.rs index b37989c27993..57792449eebe 100644 --- a/src/query/ast/src/ast/statements/table.rs +++ b/src/query/ast/src/ast/statements/table.rs @@ -116,7 +116,7 @@ pub struct ShowDropTablesStmt { impl Display for ShowDropTablesStmt { fn fmt(&self, f: &mut Formatter) -> std::fmt::Result { - write!(f, "SHOW DROP TABLE")?; + write!(f, "SHOW DROP TABLES")?; if let Some(database) = &self.database { write!(f, " FROM {database}")?; } diff --git a/src/query/ast/src/parser/statement.rs b/src/query/ast/src/parser/statement.rs index 0c581bfe5046..1705f94753fe 100644 --- a/src/query/ast/src/parser/statement.rs +++ b/src/query/ast/src/parser/statement.rs @@ -529,6 +529,19 @@ pub fn statement_body(i: Input) -> IResult { }) }, ); + + let show_drop_databases = map( + rule! { + SHOW ~ DROP ~ ( DATABASES | DATABASES ) ~ ( FROM ~ ^#ident )? ~ #show_limit? + }, + |(_, _, _, opt_catalog, limit)| { + Statement::ShowDropDatabases(ShowDropDatabasesStmt { + catalog: opt_catalog.map(|(_, catalog)| catalog), + limit, + }) + }, + ); + let show_create_database = map( rule! { SHOW ~ CREATE ~ ( DATABASE | SCHEMA ) ~ #dot_separated_idents_1_to_2 @@ -2284,6 +2297,7 @@ pub fn statement_body(i: Input) -> IResult { #show_databases : "`SHOW [FULL] DATABASES [(FROM | IN) ] []`" | #undrop_database : "`UNDROP DATABASE `" | #show_create_database : "`SHOW CREATE DATABASE `" + | #show_drop_databases : "`SHOW DROP DATABASES [FROM ] []`" | #create_database : "`CREATE [OR REPLACE] DATABASE [IF NOT EXISTS] [ENGINE = ]`" | #drop_database : "`DROP DATABASE [IF EXISTS] `" | #alter_database : "`ALTER DATABASE [IF EXISTS] `" diff --git a/src/query/ast/tests/it/parser.rs b/src/query/ast/tests/it/parser.rs index e249ca198fa5..9a536b2c2ee4 100644 --- a/src/query/ast/tests/it/parser.rs +++ b/src/query/ast/tests/it/parser.rs @@ -87,6 +87,8 @@ fn test_statement() { let file = &mut mint.new_goldenfile("stmt.txt").unwrap(); let cases = &[ r#"show databases"#, + r#"show drop databases"#, + r#"show drop databases like 'db%'"#, r#"show databases format TabSeparatedWithNamesAndTypes;"#, r#"show tables"#, r#"show drop tables"#, diff --git a/src/query/ast/tests/it/testdata/stmt.txt b/src/query/ast/tests/it/testdata/stmt.txt index 27869c0c54d2..8bd0d0d7a129 100644 --- a/src/query/ast/tests/it/testdata/stmt.txt +++ b/src/query/ast/tests/it/testdata/stmt.txt @@ -12,6 +12,36 @@ ShowDatabases( ) +---------- Input ---------- +show drop databases +---------- Output --------- +SHOW DROP DATABASES +---------- AST ------------ +ShowDropDatabases( + ShowDropDatabasesStmt { + catalog: None, + limit: None, + }, +) + + +---------- Input ---------- +show drop databases like 'db%' +---------- Output --------- +SHOW DROP DATABASES LIKE 'db%' +---------- AST ------------ +ShowDropDatabases( + ShowDropDatabasesStmt { + catalog: None, + limit: Some( + Like { + pattern: "db%", + }, + ), + }, +) + + ---------- Input ---------- show databases format TabSeparatedWithNamesAndTypes; ---------- Output --------- @@ -49,7 +79,7 @@ ShowTables( ---------- Input ---------- show drop tables ---------- Output --------- -SHOW DROP TABLE +SHOW DROP TABLES ---------- AST ------------ ShowDropTables( ShowDropTablesStmt { @@ -62,7 +92,7 @@ ShowDropTables( ---------- Input ---------- show drop tables like 't%' ---------- Output --------- -SHOW DROP TABLE LIKE 't%' +SHOW DROP TABLES LIKE 't%' ---------- AST ------------ ShowDropTables( ShowDropTablesStmt { @@ -79,7 +109,7 @@ ShowDropTables( ---------- Input ---------- show drop tables where name='t' ---------- Output --------- -SHOW DROP TABLE WHERE name = 't' +SHOW DROP TABLES WHERE name = 't' ---------- AST ------------ ShowDropTables( ShowDropTablesStmt { diff --git a/src/query/catalog/src/catalog/interface.rs b/src/query/catalog/src/catalog/interface.rs index 935c3706a9fc..4b2af1165132 100644 --- a/src/query/catalog/src/catalog/interface.rs +++ b/src/query/catalog/src/catalog/interface.rs @@ -152,6 +152,9 @@ pub trait Catalog: DynClone + Send + Sync + Debug { // Get the database by name. async fn get_database(&self, tenant: &Tenant, db_name: &str) -> Result>; + // List all databases history + async fn list_databases_history(&self, tenant: &Tenant) -> Result>>; + // Get all the databases. async fn list_databases(&self, tenant: &Tenant) -> Result>>; diff --git a/src/query/service/src/catalogs/default/database_catalog.rs b/src/query/service/src/catalogs/default/database_catalog.rs index b1ecc39360e4..b467d9939532 100644 --- a/src/query/service/src/catalogs/default/database_catalog.rs +++ b/src/query/service/src/catalogs/default/database_catalog.rs @@ -187,6 +187,17 @@ impl Catalog for DatabaseCatalog { } } + #[async_backtrace::framed] + async fn list_databases_history(&self, tenant: &Tenant) -> Result>> { + let mut dbs = self + .immutable_catalog + .list_databases_history(tenant) + .await?; + let mut other = self.mutable_catalog.list_databases_history(tenant).await?; + dbs.append(&mut other); + Ok(dbs) + } + #[async_backtrace::framed] async fn list_databases(&self, tenant: &Tenant) -> Result>> { let mut dbs = self.immutable_catalog.list_databases(tenant).await?; diff --git a/src/query/service/src/catalogs/default/immutable_catalog.rs b/src/query/service/src/catalogs/default/immutable_catalog.rs index cfb88afa8ad8..ac3cf23d1b85 100644 --- a/src/query/service/src/catalogs/default/immutable_catalog.rs +++ b/src/query/service/src/catalogs/default/immutable_catalog.rs @@ -170,6 +170,10 @@ impl Catalog for ImmutableCatalog { } } + async fn list_databases_history(&self, _tenant: &Tenant) -> Result>> { + Ok(vec![self.sys_db.clone(), self.info_schema_db.clone()]) + } + #[async_backtrace::framed] async fn list_databases(&self, _tenant: &Tenant) -> Result>> { Ok(vec![self.sys_db.clone(), self.info_schema_db.clone()]) diff --git a/src/query/service/src/catalogs/default/mutable_catalog.rs b/src/query/service/src/catalogs/default/mutable_catalog.rs index 07ae212bbdc2..4db4ef1e160c 100644 --- a/src/query/service/src/catalogs/default/mutable_catalog.rs +++ b/src/query/service/src/catalogs/default/mutable_catalog.rs @@ -243,6 +243,33 @@ impl Catalog for MutableCatalog { self.build_db_instance(&db_info) } + #[async_backtrace::framed] + async fn list_databases_history(&self, tenant: &Tenant) -> Result>> { + let dbs = self + .ctx + .meta + .get_tenant_history_databases( + ListDatabaseReq { + tenant: tenant.clone(), + }, + false, + ) + .await?; + + dbs.iter() + .try_fold(vec![], |mut acc, item: &Arc| { + let db_result = self.build_db_instance(item); + match db_result { + Ok(db) => acc.push(db), + Err(err) => { + // Ignore the error and continue, allow partial failure. + warn!("Failed to build database '{:?}': {:?}", item, err); + } + } + Ok(acc) + }) + } + #[async_backtrace::framed] async fn list_databases(&self, tenant: &Tenant) -> Result>> { let dbs = self diff --git a/src/query/service/src/catalogs/default/session_catalog.rs b/src/query/service/src/catalogs/default/session_catalog.rs index 7565b800c2f5..5ee189017537 100644 --- a/src/query/service/src/catalogs/default/session_catalog.rs +++ b/src/query/service/src/catalogs/default/session_catalog.rs @@ -153,6 +153,11 @@ impl Catalog for SessionCatalog { self.inner.get_database(tenant, db_name).await } + // List all the databases history. + async fn list_databases_history(&self, tenant: &Tenant) -> Result>> { + self.inner.list_databases_history(tenant).await + } + // Get all the databases. async fn list_databases(&self, tenant: &Tenant) -> Result>> { self.inner.list_databases(tenant).await diff --git a/src/query/service/src/databases/system/system_database.rs b/src/query/service/src/databases/system/system_database.rs index a4ad5c7d36d7..ccb6c693662d 100644 --- a/src/query/service/src/databases/system/system_database.rs +++ b/src/query/service/src/databases/system/system_database.rs @@ -34,7 +34,8 @@ use databend_common_storages_system::ColumnsTable; use databend_common_storages_system::ConfigsTable; use databend_common_storages_system::ContributorsTable; use databend_common_storages_system::CreditsTable; -use databend_common_storages_system::DatabasesTable; +use databend_common_storages_system::DatabasesTableWithHistory; +use databend_common_storages_system::DatabasesTableWithoutHistory; use databend_common_storages_system::DictionariesTable; use databend_common_storages_system::EnginesTable; use databend_common_storages_system::FullStreamsTable; @@ -103,7 +104,8 @@ impl SystemDatabase { TablesTableWithoutHistory::create(sys_db_meta.next_table_id()), TablesTableWithHistory::create(sys_db_meta.next_table_id()), ClustersTable::create(sys_db_meta.next_table_id()), - DatabasesTable::create(sys_db_meta.next_table_id()), + DatabasesTableWithHistory::create(sys_db_meta.next_table_id()), + DatabasesTableWithoutHistory::create(sys_db_meta.next_table_id()), FullStreamsTable::create(sys_db_meta.next_table_id()), TerseStreamsTable::create(sys_db_meta.next_table_id()), ProcessesTable::create(sys_db_meta.next_table_id()), diff --git a/src/query/service/src/interpreters/access/management_mode_access.rs b/src/query/service/src/interpreters/access/management_mode_access.rs index 09b6243180ae..22600b0383e9 100644 --- a/src/query/service/src/interpreters/access/management_mode_access.rs +++ b/src/query/service/src/interpreters/access/management_mode_access.rs @@ -45,6 +45,7 @@ impl AccessChecker for ManagementModeAccess { match rewrite_kind { Some(ref v) => matches!(v, RewriteKind::ShowDatabases + | RewriteKind::ShowDropDatabases | RewriteKind::ShowTables(_, _) | RewriteKind::ShowColumns(_, _, _) | RewriteKind::ShowEngines diff --git a/src/query/service/src/interpreters/access/privilege_access.rs b/src/query/service/src/interpreters/access/privilege_access.rs index e5ed82af8dc8..95d538266d3e 100644 --- a/src/query/service/src/interpreters/access/privilege_access.rs +++ b/src/query/service/src/interpreters/access/privilege_access.rs @@ -61,10 +61,11 @@ enum ObjectId { // some statements like `SELECT 1`, `SHOW USERS`, `SHOW ROLES`, `SHOW TABLES` will be // rewritten to the queries on the system tables, we need to skip the privilege check on // these tables. -const SYSTEM_TABLES_ALLOW_LIST: [&str; 20] = [ +const SYSTEM_TABLES_ALLOW_LIST: [&str; 21] = [ "catalogs", "columns", "databases", + "databases_with_history", "dictionaries", "tables", "views", @@ -708,6 +709,7 @@ impl AccessChecker for PrivilegeAccess { } => { match rewrite_kind { Some(RewriteKind::ShowDatabases) + | Some(RewriteKind::ShowDropDatabases) | Some(RewriteKind::ShowEngines) | Some(RewriteKind::ShowFunctions) | Some(RewriteKind::ShowUserFunctions) diff --git a/src/query/service/tests/it/sql/exec/get_table_bind_test.rs b/src/query/service/tests/it/sql/exec/get_table_bind_test.rs index a1cc8fce6f38..3cb3b651c17a 100644 --- a/src/query/service/tests/it/sql/exec/get_table_bind_test.rs +++ b/src/query/service/tests/it/sql/exec/get_table_bind_test.rs @@ -174,6 +174,10 @@ impl Catalog for FakedCatalog { todo!() } + async fn list_databases_history(&self, _tenant: &Tenant) -> Result>> { + todo!() + } + async fn list_databases(&self, _tenant: &Tenant) -> Result>> { todo!() } diff --git a/src/query/service/tests/it/storages/fuse/operations/commit.rs b/src/query/service/tests/it/storages/fuse/operations/commit.rs index fe5b5e69a207..ddceed7daac3 100644 --- a/src/query/service/tests/it/storages/fuse/operations/commit.rs +++ b/src/query/service/tests/it/storages/fuse/operations/commit.rs @@ -918,6 +918,10 @@ impl Catalog for FakedCatalog { todo!() } + async fn list_databases_history(&self, _tenant: &Tenant) -> Result>> { + todo!() + } + async fn create_database(&self, _req: CreateDatabaseReq) -> Result { todo!() } diff --git a/src/query/service/tests/it/storages/system.rs b/src/query/service/tests/it/storages/system.rs index b59ad6b13593..f556c12b4fe6 100644 --- a/src/query/service/tests/it/storages/system.rs +++ b/src/query/service/tests/it/storages/system.rs @@ -37,7 +37,8 @@ use databend_common_storages_system::ColumnsTable; use databend_common_storages_system::ConfigsTable; use databend_common_storages_system::ContributorsTable; use databend_common_storages_system::CreditsTable; -use databend_common_storages_system::DatabasesTable; +use databend_common_storages_system::DatabasesTableWithHistory; +use databend_common_storages_system::DatabasesTableWithoutHistory; use databend_common_storages_system::EnginesTable; use databend_common_storages_system::FunctionsTable; use databend_common_storages_system::MetricsTable; @@ -261,7 +262,7 @@ async fn test_databases_table() -> Result<()> { let fixture = TestFixture::setup_with_config(&config).await?; let ctx = fixture.new_query_ctx().await?; - let table = DatabasesTable::create(1); + let table = DatabasesTableWithoutHistory::create(1); let mut mint = Mint::new("tests/it/storages/testdata"); let file = &mut mint.new_goldenfile("databases_table.txt").unwrap(); @@ -270,6 +271,24 @@ async fn test_databases_table() -> Result<()> { Ok(()) } +#[tokio::test(flavor = "multi_thread")] +async fn test_databases_history_table() -> Result<()> { + let mut config = ConfigBuilder::create().build(); + config.storage.params = StorageParams::Fs(StorageFsConfig::default()); + let fixture = TestFixture::setup_with_config(&config).await?; + let ctx = fixture.new_query_ctx().await?; + + let table = DatabasesTableWithHistory::create(1); + + let mut mint = Mint::new("tests/it/storages/testdata"); + let file = &mut mint + .new_goldenfile("databases_with_history_table.txt") + .unwrap(); + run_table_tests(file, ctx, table).await?; + + Ok(()) +} + #[tokio::test(flavor = "multi_thread")] async fn test_engines_table() -> Result<()> { let fixture = TestFixture::setup().await?; diff --git a/src/query/service/tests/it/storages/testdata/columns_table.txt b/src/query/service/tests/it/storages/testdata/columns_table.txt index e217a3fc0d65..b18e7992fae0 100644 --- a/src/query/service/tests/it/storages/testdata/columns_table.txt +++ b/src/query/service/tests/it/storages/testdata/columns_table.txt @@ -1,510 +1,516 @@ ---------- TABLE INFO ------------ DB.Table: 'system'.'columns', Table: columns-table_id:1, ver:0, Engine: SystemColumns -------- TABLE CONTENTS ---------- -+-----------------------------------+----------------------+------------------------+-----------------------+---------------------+----------+----------+----------+----------+ -| Column 0 | Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 | -+-----------------------------------+----------------------+------------------------+-----------------------+---------------------+----------+----------+----------+----------+ -| 'Comment' | 'system' | 'engines' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'Engine' | 'system' | 'engines' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'access' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'acquired_on' | 'system' | 'locks' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'active_result_scan' | 'system' | 'query_cache' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | -| 'after' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'agg_spilled_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'agg_spilled_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'arguments' | 'system' | 'procedures' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'arguments' | 'system' | 'user_functions' | 'Variant' | 'VARIANT' | '' | '' | 'NO' | '' | -| 'attempt_number' | 'system' | 'task_history' | 'Int32' | 'INT' | '' | '' | 'NO' | '' | -| 'attribute_names' | 'system' | 'dictionaries' | 'Array(String)' | 'ARRAY(STRING)' | '' | '' | 'NO' | '' | -| 'attribute_types' | 'system' | 'dictionaries' | 'Array(String)' | 'ARRAY(STRING)' | '' | '' | 'NO' | '' | -| 'auth_type' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'auto_increment' | 'information_schema' | 'tables' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'byte_size' | 'system' | 'clustering_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'bytes_from_local_disk' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'bytes_from_memory' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'bytes_from_remote_disk' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'capacity' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'cardinality' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'cargo_features' | 'system' | 'build_options' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'catalog' | 'system' | 'databases' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'catalog' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'catalog' | 'system' | 'streams_terse' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'catalog' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'catalog' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'catalog' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'catalog' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'catalog_name' | 'information_schema' | 'schemata' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'character_maximum_length' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'character_octet_length' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'character_set_catalog' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'character_set_name' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'character_set_schema' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'check_option' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'client_address' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'client_info' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'cluster' | 'system' | 'clusters' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'cluster_by' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'cluster_by' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'cluster_id' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'collation' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'collation_catalog' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'collation_name' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'collation_schema' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'column_comment' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'column_default' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'column_key' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'column_name' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'column_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'column_name' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'column_type' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'columns' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'command' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'dictionaries' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'notifications' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'comment' | 'system' | 'password_policies' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'procedures' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'task_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'comment' | 'system' | 'tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'comment' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'comment' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'compaction_stats' | 'system' | 'background_tasks' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | -| 'completed_time' | 'system' | 'task_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'condition_text' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'condition_text' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'constraint_catalog' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'constraint_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'constraint_schema' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'copy_options' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'cpu_usage' | 'system' | 'query_log' | 'UInt32' | 'INT UNSIGNED' | '' | '' | 'NO' | '' | -| 'create_time' | 'information_schema' | 'tables' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'background_jobs' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'background_tasks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'dictionaries' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'indexes' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'locks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'notification_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'notifications' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'password_policies' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'procedures' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'roles' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'stages' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'streams' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'tables' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'tables_with_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'tasks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'user_functions' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'users' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'created_on' | 'system' | 'views' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'views_with_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_on' | 'system' | 'virtual_columns' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'created_time' | 'system' | 'processes' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'creator' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'creator' | 'system' | 'background_tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'creator' | 'system' | 'stages' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'current_database' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'current_query_id' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'data_compressed_size' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'data_compressed_size' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'data_free' | 'information_schema' | 'tables' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'data_length' | 'information_schema' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'data_read_bytes' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'data_size' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'data_size' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'data_type' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'data_type' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'data_write_bytes' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'clustering_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'dictionaries' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'streams_terse' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'temporary_tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database' | 'system' | 'virtual_columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'database_id' | 'system' | 'background_tasks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'database_id' | 'system' | 'databases' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'databases' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'datetime_precision' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'default' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'default' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'default_character_set_catalog' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'default_character_set_name' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'default_character_set_schema' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'default_collation_name' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'default_expression' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'default_kind' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'default_role' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'definition' | 'system' | 'indexes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'definition' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'definition' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'definition' | 'system' | 'user_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'description' | 'system' | 'configs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'description' | 'system' | 'functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'description' | 'system' | 'procedures' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'description' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'description' | 'system' | 'user_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'disabled' | 'system' | 'users' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | -| 'domain_catalog' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'domain_name' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'domain_schema' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'drop_time' | 'information_schema' | 'tables' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'dropped_on' | 'system' | 'tables' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'dropped_on' | 'system' | 'tables_with_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'dropped_on' | 'system' | 'views' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'dropped_on' | 'system' | 'views_with_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'dummy' | 'system' | 'one' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'enabled' | 'system' | 'notifications' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | -| 'end_time' | 'system' | 'clustering_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'engine' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine' | 'system' | 'temporary_tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine_full' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine_full' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine_full' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'engine_full' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'error_integration' | 'system' | 'tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'error_message' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'errors' | 'system' | 'queries_profiling' | 'Variant' | 'VARIANT' | '' | '' | 'NO' | '' | -| 'event_date' | 'system' | 'query_log' | 'Date' | 'DATE' | '' | '' | 'NO' | '' | -| 'event_time' | 'system' | 'query_log' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'example' | 'system' | 'functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'exception_code' | 'system' | 'query_log' | 'Int32' | 'INT' | '' | '' | 'NO' | '' | -| 'exception_code' | 'system' | 'task_history' | 'Int64' | 'BIGINT' | '' | '' | 'NO' | '' | -| 'exception_text' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'exception_text' | 'system' | 'task_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'extra' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'extra' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'extra_info' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'extra_info' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'file_content_length' | 'system' | 'temp_files' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'file_format_options' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'file_last_modified_time' | 'system' | 'temp_files' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'file_name' | 'system' | 'temp_files' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'file_type' | 'system' | 'temp_files' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'group' | 'system' | 'configs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'group_by_spilled_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'group_by_spilled_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'handler_type' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'has_profile' | 'system' | 'query_log' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | -| 'hit' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'host' | 'system' | 'clusters' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'host' | 'system' | 'processes' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'hostname' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'id' | 'system' | 'background_tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'id' | 'system' | 'notifications' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'id' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'id' | 'system' | 'task_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'id' | 'system' | 'tasks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'index_comment' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'index_length' | 'information_schema' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'index_name' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'index_schema' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'index_size' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'index_size' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'index_type' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'inherited_roles' | 'system' | 'roles' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'inherited_roles_name' | 'system' | 'roles' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'integration_name' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'invalid_reason' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'is_aggregate' | 'system' | 'functions' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | -| 'is_aggregate' | 'system' | 'user_functions' | 'Nullable(Boolean)' | 'BOOLEAN' | '' | '' | 'YES' | '' | -| 'is_attach' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'is_attach' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'is_configured' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'is_insertable_into' | 'information_schema' | 'views' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | -| 'is_nullable' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'is_nullable' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'is_transient' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'is_transient' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'is_trigger_deletable' | 'information_schema' | 'views' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'is_trigger_insertable_into' | 'information_schema' | 'views' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'is_trigger_updatable' | 'information_schema' | 'views' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'is_updatable' | 'information_schema' | 'views' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'job_state' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'job_type' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'join_spilled_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'join_spilled_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'key_names' | 'system' | 'dictionaries' | 'Array(String)' | 'ARRAY(STRING)' | '' | '' | 'NO' | '' | -| 'key_types' | 'system' | 'dictionaries' | 'Array(String)' | 'ARRAY(STRING)' | '' | '' | 'NO' | '' | -| 'keywords' | 'information_schema' | 'keywords' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'kind' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'labels' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'language' | 'system' | 'user_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'last_committed_on' | 'system' | 'tasks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'last_suspended_on' | 'system' | 'tasks' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'last_task_id' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'last_task_run_at' | 'system' | 'background_jobs' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'last_updated' | 'system' | 'background_jobs' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'level' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'license' | 'system' | 'credits' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'location' | 'system' | 'query_cache' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'log_type' | 'system' | 'query_log' | 'Int8' | 'TINYINT' | '' | '' | 'NO' | '' | -| 'log_type_name' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'memory_usage' | 'system' | 'processes' | 'Int64' | 'BIGINT' | '' | '' | 'NO' | '' | -| 'memory_usage' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'message' | 'system' | 'background_jobs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'message' | 'system' | 'background_tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'message' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'message_source' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'metric' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'miss' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'mode' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'mode' | 'system' | 'streams_terse' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'must_change_password' | 'system' | 'users' | 'Nullable(Boolean)' | 'BOOLEAN' | '' | '' | 'YES' | '' | -| 'mysql_connection_id' | 'system' | 'processes' | 'Nullable(UInt32)' | 'INT UNSIGNED' | '' | '' | 'YES' | '' | -| 'name' | 'system' | 'background_jobs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'caches' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'catalogs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'clusters' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'configs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'contributors' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'credits' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'databases' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'dictionaries' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'indexes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'malloc_stats_totals' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'notifications' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'password_policies' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'procedures' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'roles' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'streams_terse' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'table_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'temporary_tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'user_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'name' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'network_policy' | 'system' | 'users' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'next_schedule_time' | 'system' | 'tasks' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'next_task_scheduled_time' | 'system' | 'background_jobs' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'node' | 'system' | 'backtrace' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'node' | 'system' | 'caches' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'node' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'node' | 'system' | 'malloc_stats_totals' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'node' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'node' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'node' | 'system' | 'queries_profiling' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'node_id' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'non_unique' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'nullable' | 'information_schema' | 'columns' | 'Nullable(UInt8)' | 'TINYINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'nullable' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'num_items' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'num_rows' | 'system' | 'query_cache' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'num_rows' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'num_rows' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'number_of_blocks' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'number_of_blocks' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'number_of_files' | 'system' | 'stages' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'number_of_segments' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'number_of_segments' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'numeric_precision' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'numeric_precision_radix' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'numeric_scale' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'options' | 'system' | 'password_policies' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'ordinal_position' | 'information_schema' | 'columns' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'ordinal_position' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'original' | 'system' | 'indexes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'owner' | 'system' | 'databases' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'owner' | 'system' | 'stages' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'owner' | 'system' | 'streams' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'owner' | 'system' | 'tables' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'owner' | 'system' | 'tables_with_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'owner' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'owner' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'owner' | 'system' | 'views' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'owner' | 'system' | 'views_with_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'packed' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'parent_plan_id' | 'system' | 'queries_profiling' | 'Nullable(UInt32)' | 'INT UNSIGNED' | '' | '' | 'YES' | '' | -| 'partitions_sha' | 'system' | 'query_cache' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'password_policy' | 'system' | 'users' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'plan_id' | 'system' | 'queries_profiling' | 'Nullable(UInt32)' | 'INT UNSIGNED' | '' | '' | 'YES' | '' | -| 'plan_name' | 'system' | 'queries_profiling' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'port' | 'system' | 'clusters' | 'UInt16' | 'SMALLINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'position_in_unique_constraint' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'privileges' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'procedure_id' | 'system' | 'procedures' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'processed' | 'system' | 'notification_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'projections' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_duration_ms' | 'system' | 'query_log' | 'Int64' | 'BIGINT' | '' | '' | 'NO' | '' | -| 'query_hash' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_id' | 'system' | 'backtrace' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_id' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_id' | 'system' | 'queries_profiling' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_id' | 'system' | 'query_cache' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_id' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_id' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_kind' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_parameterized_hash' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'query_queued_duration_ms' | 'system' | 'query_log' | 'Int64' | 'BIGINT' | '' | '' | 'NO' | '' | -| 'query_start_time' | 'system' | 'query_log' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'query_text' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'range' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'referenced_column_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'referenced_table_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'referenced_table_schema' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'reserved' | 'information_schema' | 'keywords' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'result_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'result_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'result_size' | 'system' | 'query_cache' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'revision' | 'system' | 'locks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'roles' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'root_task_id' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'row_count' | 'system' | 'clustering_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'run_id' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'scan_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'scan_io_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'scan_io_bytes_cost_ms' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'scan_partitions' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'scan_progress_read_bytes' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'scan_progress_read_rows' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'scan_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'schedule' | 'system' | 'task_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'schedule' | 'system' | 'tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'scheduled_job_cron_expression' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'scheduled_job_cron_timezone' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'scheduled_job_interval_secs' | 'system' | 'background_jobs' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'scheduled_time' | 'system' | 'task_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'schema_name' | 'information_schema' | 'schemata' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'schema_owner' | 'information_schema' | 'schemata' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'seq_in_index' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'server_version' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'session_parameters' | 'system' | 'task_history' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | -| 'session_parameters' | 'system' | 'tasks' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | -| 'session_settings' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'size' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'snapshot_location' | 'system' | 'streams' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'source' | 'system' | 'dictionaries' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'sql' | 'system' | 'query_cache' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'sql_path' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'sql_user' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'sql_user_privileges' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'sql_user_quota' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'stack' | 'system' | 'backtrace' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'stack_trace' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'stage_params' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'stage_type' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'start_time' | 'system' | 'clustering_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'state' | 'system' | 'background_tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'state' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'state' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'statistics' | 'system' | 'malloc_stats' | 'Variant' | 'VARIANT' | '' | '' | 'NO' | '' | -| 'statistics' | 'system' | 'queries_profiling' | 'Variant' | 'VARIANT' | '' | '' | 'NO' | '' | -| 'status' | 'system' | 'backtrace' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'status' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'status' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'status' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'stream_id' | 'system' | 'streams' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'sub_part' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'suspend_task_after_num_failures' | 'system' | 'tasks' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'syntax' | 'system' | 'functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table' | 'system' | 'clustering_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table' | 'system' | 'virtual_columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_catalog' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_catalog' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'table_catalog' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'table_catalog' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_catalog' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_collation' | 'information_schema' | 'tables' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'table_comment' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_id' | 'system' | 'background_tasks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'table_id' | 'system' | 'locks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'table_id' | 'system' | 'streams' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'table_id' | 'system' | 'tables' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'table_id' | 'system' | 'tables_with_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'table_id' | 'system' | 'temporary_tables' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'table_id' | 'system' | 'views' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'table_id' | 'system' | 'views_with_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'table_name' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'table_name' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'table_name' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_name' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_name' | 'system' | 'streams' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'table_name' | 'system' | 'streams_terse' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'table_rows' | 'information_schema' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'table_schema' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_schema' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'table_schema' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | -| 'table_schema' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_schema' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_type' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_type' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_type' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'table_version' | 'system' | 'streams' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'tables' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'target_features' | 'system' | 'build_options' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'task_running_secs' | 'system' | 'background_tasks' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | -| 'task_type' | 'system' | 'background_jobs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'tenant_id' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'time' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'total_columns' | 'system' | 'tables' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'total_columns' | 'system' | 'tables_with_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'total_partitions' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'trigger' | 'system' | 'background_tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'type' | 'system' | 'background_tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'type' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'type' | 'system' | 'indexes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'type' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'type' | 'system' | 'notifications' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'type' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'type' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'unit' | 'system' | 'caches' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'update_on' | 'system' | 'roles' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'update_on' | 'system' | 'users' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'updated_on' | 'system' | 'background_tasks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'updated_on' | 'system' | 'dictionaries' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'updated_on' | 'system' | 'indexes' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'updated_on' | 'system' | 'password_policies' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'updated_on' | 'system' | 'streams' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'updated_on' | 'system' | 'tables' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'updated_on' | 'system' | 'tables_with_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'updated_on' | 'system' | 'views' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'updated_on' | 'system' | 'views_with_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | -| 'updated_on' | 'system' | 'virtual_columns' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | -| 'user' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'user' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'user_agent' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'vacuum_stats' | 'system' | 'background_tasks' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | -| 'value' | 'system' | 'configs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'value' | 'system' | 'malloc_stats_totals' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'value' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'value' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'version' | 'system' | 'clusters' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'version' | 'system' | 'credits' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'view_definition' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'view_query' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'view_query' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'virtual_columns' | 'system' | 'virtual_columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | -| 'warehouse' | 'system' | 'task_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'warehouse' | 'system' | 'tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | -| 'webhook_options' | 'system' | 'notifications' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | -| 'written_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'written_io_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'written_io_bytes_cost_ms' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -| 'written_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | -+-----------------------------------+----------------------+------------------------+-----------------------+---------------------+----------+----------+----------+----------+ ++-----------------------------------+----------------------+--------------------------+-----------------------+---------------------+----------+----------+----------+----------+ +| Column 0 | Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 | ++-----------------------------------+----------------------+--------------------------+-----------------------+---------------------+----------+----------+----------+----------+ +| 'Comment' | 'system' | 'engines' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'Engine' | 'system' | 'engines' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'access' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'acquired_on' | 'system' | 'locks' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'active_result_scan' | 'system' | 'query_cache' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | +| 'after' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'agg_spilled_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'agg_spilled_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'arguments' | 'system' | 'procedures' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'arguments' | 'system' | 'user_functions' | 'Variant' | 'VARIANT' | '' | '' | 'NO' | '' | +| 'attempt_number' | 'system' | 'task_history' | 'Int32' | 'INT' | '' | '' | 'NO' | '' | +| 'attribute_names' | 'system' | 'dictionaries' | 'Array(String)' | 'ARRAY(STRING)' | '' | '' | 'NO' | '' | +| 'attribute_types' | 'system' | 'dictionaries' | 'Array(String)' | 'ARRAY(STRING)' | '' | '' | 'NO' | '' | +| 'auth_type' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'auto_increment' | 'information_schema' | 'tables' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'byte_size' | 'system' | 'clustering_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'bytes_from_local_disk' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'bytes_from_memory' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'bytes_from_remote_disk' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'capacity' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'cardinality' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'cargo_features' | 'system' | 'build_options' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog' | 'system' | 'databases' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog' | 'system' | 'databases_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog' | 'system' | 'streams_terse' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'catalog_name' | 'information_schema' | 'schemata' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'character_maximum_length' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'character_octet_length' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'character_set_catalog' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'character_set_name' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'character_set_schema' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'check_option' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'client_address' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'client_info' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'cluster' | 'system' | 'clusters' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'cluster_by' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'cluster_by' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'cluster_id' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'collation' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'collation_catalog' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'collation_name' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'collation_schema' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'column_comment' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'column_default' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'column_key' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'column_name' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'column_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'column_name' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'column_type' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'columns' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'command' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'dictionaries' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'notifications' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'comment' | 'system' | 'password_policies' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'procedures' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'task_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'comment' | 'system' | 'tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'comment' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'comment' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'compaction_stats' | 'system' | 'background_tasks' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | +| 'completed_time' | 'system' | 'task_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'condition_text' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'condition_text' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'constraint_catalog' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'constraint_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'constraint_schema' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'copy_options' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'cpu_usage' | 'system' | 'query_log' | 'UInt32' | 'INT UNSIGNED' | '' | '' | 'NO' | '' | +| 'create_time' | 'information_schema' | 'tables' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'background_jobs' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'background_tasks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'dictionaries' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'indexes' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'locks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'notification_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'notifications' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'password_policies' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'procedures' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'roles' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'stages' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'streams' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'tables' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'tables_with_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'tasks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'user_functions' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'users' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'created_on' | 'system' | 'views' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'views_with_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_on' | 'system' | 'virtual_columns' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'created_time' | 'system' | 'processes' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'creator' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'creator' | 'system' | 'background_tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'creator' | 'system' | 'stages' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'current_database' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'current_query_id' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'data_compressed_size' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'data_compressed_size' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'data_free' | 'information_schema' | 'tables' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'data_length' | 'information_schema' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'data_read_bytes' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'data_size' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'data_size' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'data_type' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'data_type' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'data_write_bytes' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'clustering_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'dictionaries' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'streams_terse' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'temporary_tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database' | 'system' | 'virtual_columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'database_id' | 'system' | 'background_tasks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'database_id' | 'system' | 'databases' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'database_id' | 'system' | 'databases_with_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'databases' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'datetime_precision' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'default' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'default' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'default_character_set_catalog' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'default_character_set_name' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'default_character_set_schema' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'default_collation_name' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'default_expression' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'default_kind' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'default_role' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'definition' | 'system' | 'indexes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'definition' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'definition' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'definition' | 'system' | 'user_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'description' | 'system' | 'configs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'description' | 'system' | 'functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'description' | 'system' | 'procedures' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'description' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'description' | 'system' | 'user_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'disabled' | 'system' | 'users' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | +| 'domain_catalog' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'domain_name' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'domain_schema' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'drop_time' | 'information_schema' | 'tables' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'dropped_on' | 'system' | 'databases' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'dropped_on' | 'system' | 'databases_with_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'dropped_on' | 'system' | 'tables' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'dropped_on' | 'system' | 'tables_with_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'dropped_on' | 'system' | 'views' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'dropped_on' | 'system' | 'views_with_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'dummy' | 'system' | 'one' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'enabled' | 'system' | 'notifications' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | +| 'end_time' | 'system' | 'clustering_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'engine' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine' | 'system' | 'temporary_tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine_full' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine_full' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine_full' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'engine_full' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'error_integration' | 'system' | 'tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'error_message' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'errors' | 'system' | 'queries_profiling' | 'Variant' | 'VARIANT' | '' | '' | 'NO' | '' | +| 'event_date' | 'system' | 'query_log' | 'Date' | 'DATE' | '' | '' | 'NO' | '' | +| 'event_time' | 'system' | 'query_log' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'example' | 'system' | 'functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'exception_code' | 'system' | 'query_log' | 'Int32' | 'INT' | '' | '' | 'NO' | '' | +| 'exception_code' | 'system' | 'task_history' | 'Int64' | 'BIGINT' | '' | '' | 'NO' | '' | +| 'exception_text' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'exception_text' | 'system' | 'task_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'extra' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'extra' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'extra_info' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'extra_info' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'file_content_length' | 'system' | 'temp_files' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'file_format_options' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'file_last_modified_time' | 'system' | 'temp_files' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'file_name' | 'system' | 'temp_files' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'file_type' | 'system' | 'temp_files' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'group' | 'system' | 'configs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'group_by_spilled_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'group_by_spilled_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'handler_type' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'has_profile' | 'system' | 'query_log' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | +| 'hit' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'host' | 'system' | 'clusters' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'host' | 'system' | 'processes' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'hostname' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'id' | 'system' | 'background_tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'id' | 'system' | 'notifications' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'id' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'id' | 'system' | 'task_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'id' | 'system' | 'tasks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'index_comment' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'index_length' | 'information_schema' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'index_name' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'index_schema' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'index_size' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'index_size' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'index_type' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'inherited_roles' | 'system' | 'roles' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'inherited_roles_name' | 'system' | 'roles' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'integration_name' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'invalid_reason' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'is_aggregate' | 'system' | 'functions' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | +| 'is_aggregate' | 'system' | 'user_functions' | 'Nullable(Boolean)' | 'BOOLEAN' | '' | '' | 'YES' | '' | +| 'is_attach' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'is_attach' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'is_configured' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'is_insertable_into' | 'information_schema' | 'views' | 'Boolean' | 'BOOLEAN' | '' | '' | 'NO' | '' | +| 'is_nullable' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'is_nullable' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'is_transient' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'is_transient' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'is_trigger_deletable' | 'information_schema' | 'views' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'is_trigger_insertable_into' | 'information_schema' | 'views' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'is_trigger_updatable' | 'information_schema' | 'views' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'is_updatable' | 'information_schema' | 'views' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'job_state' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'job_type' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'join_spilled_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'join_spilled_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'key_names' | 'system' | 'dictionaries' | 'Array(String)' | 'ARRAY(STRING)' | '' | '' | 'NO' | '' | +| 'key_types' | 'system' | 'dictionaries' | 'Array(String)' | 'ARRAY(STRING)' | '' | '' | 'NO' | '' | +| 'keywords' | 'information_schema' | 'keywords' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'kind' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'labels' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'language' | 'system' | 'user_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'last_committed_on' | 'system' | 'tasks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'last_suspended_on' | 'system' | 'tasks' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'last_task_id' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'last_task_run_at' | 'system' | 'background_jobs' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'last_updated' | 'system' | 'background_jobs' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'level' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'license' | 'system' | 'credits' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'location' | 'system' | 'query_cache' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'log_type' | 'system' | 'query_log' | 'Int8' | 'TINYINT' | '' | '' | 'NO' | '' | +| 'log_type_name' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'memory_usage' | 'system' | 'processes' | 'Int64' | 'BIGINT' | '' | '' | 'NO' | '' | +| 'memory_usage' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'message' | 'system' | 'background_jobs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'message' | 'system' | 'background_tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'message' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'message_source' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'metric' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'miss' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'mode' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'mode' | 'system' | 'streams_terse' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'must_change_password' | 'system' | 'users' | 'Nullable(Boolean)' | 'BOOLEAN' | '' | '' | 'YES' | '' | +| 'mysql_connection_id' | 'system' | 'processes' | 'Nullable(UInt32)' | 'INT UNSIGNED' | '' | '' | 'YES' | '' | +| 'name' | 'system' | 'background_jobs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'caches' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'catalogs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'clusters' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'configs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'contributors' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'credits' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'databases' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'databases_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'dictionaries' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'indexes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'malloc_stats_totals' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'notifications' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'password_policies' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'procedures' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'roles' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'streams' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'streams_terse' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'table_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'temporary_tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'user_functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'name' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'network_policy' | 'system' | 'users' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'next_schedule_time' | 'system' | 'tasks' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'next_task_scheduled_time' | 'system' | 'background_jobs' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'node' | 'system' | 'backtrace' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'node' | 'system' | 'caches' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'node' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'node' | 'system' | 'malloc_stats_totals' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'node' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'node' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'node' | 'system' | 'queries_profiling' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'node_id' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'non_unique' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'nullable' | 'information_schema' | 'columns' | 'Nullable(UInt8)' | 'TINYINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'nullable' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'num_items' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'num_rows' | 'system' | 'query_cache' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'num_rows' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'num_rows' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'number_of_blocks' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'number_of_blocks' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'number_of_files' | 'system' | 'stages' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'number_of_segments' | 'system' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'number_of_segments' | 'system' | 'tables_with_history' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'numeric_precision' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'numeric_precision_radix' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'numeric_scale' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'options' | 'system' | 'password_policies' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'ordinal_position' | 'information_schema' | 'columns' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'ordinal_position' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'original' | 'system' | 'indexes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'owner' | 'system' | 'databases' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'owner' | 'system' | 'databases_with_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'owner' | 'system' | 'stages' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'owner' | 'system' | 'streams' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'owner' | 'system' | 'tables' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'owner' | 'system' | 'tables_with_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'owner' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'owner' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'owner' | 'system' | 'views' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'owner' | 'system' | 'views_with_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'packed' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'parent_plan_id' | 'system' | 'queries_profiling' | 'Nullable(UInt32)' | 'INT UNSIGNED' | '' | '' | 'YES' | '' | +| 'partitions_sha' | 'system' | 'query_cache' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'password_policy' | 'system' | 'users' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'plan_id' | 'system' | 'queries_profiling' | 'Nullable(UInt32)' | 'INT UNSIGNED' | '' | '' | 'YES' | '' | +| 'plan_name' | 'system' | 'queries_profiling' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'port' | 'system' | 'clusters' | 'UInt16' | 'SMALLINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'position_in_unique_constraint' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'privileges' | 'information_schema' | 'columns' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'procedure_id' | 'system' | 'procedures' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'processed' | 'system' | 'notification_history' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'projections' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_duration_ms' | 'system' | 'query_log' | 'Int64' | 'BIGINT' | '' | '' | 'NO' | '' | +| 'query_hash' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_id' | 'system' | 'backtrace' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_id' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_id' | 'system' | 'queries_profiling' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_id' | 'system' | 'query_cache' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_id' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_id' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_kind' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_parameterized_hash' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'query_queued_duration_ms' | 'system' | 'query_log' | 'Int64' | 'BIGINT' | '' | '' | 'NO' | '' | +| 'query_start_time' | 'system' | 'query_log' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'query_text' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'range' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'referenced_column_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'referenced_table_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'referenced_table_schema' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'reserved' | 'information_schema' | 'keywords' | 'UInt8' | 'TINYINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'result_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'result_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'result_size' | 'system' | 'query_cache' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'revision' | 'system' | 'locks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'roles' | 'system' | 'users' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'root_task_id' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'row_count' | 'system' | 'clustering_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'run_id' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'scan_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'scan_io_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'scan_io_bytes_cost_ms' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'scan_partitions' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'scan_progress_read_bytes' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'scan_progress_read_rows' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'scan_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'schedule' | 'system' | 'task_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'schedule' | 'system' | 'tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'scheduled_job_cron_expression' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'scheduled_job_cron_timezone' | 'system' | 'background_jobs' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'scheduled_job_interval_secs' | 'system' | 'background_jobs' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'scheduled_time' | 'system' | 'task_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'schema_name' | 'information_schema' | 'schemata' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'schema_owner' | 'information_schema' | 'schemata' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'seq_in_index' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'server_version' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'session_parameters' | 'system' | 'task_history' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | +| 'session_parameters' | 'system' | 'tasks' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | +| 'session_settings' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'size' | 'system' | 'caches' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'snapshot_location' | 'system' | 'streams' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'source' | 'system' | 'dictionaries' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'sql' | 'system' | 'query_cache' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'sql_path' | 'information_schema' | 'schemata' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'sql_user' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'sql_user_privileges' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'sql_user_quota' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'stack' | 'system' | 'backtrace' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'stack_trace' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'stage_params' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'stage_type' | 'system' | 'stages' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'start_time' | 'system' | 'clustering_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'state' | 'system' | 'background_tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'state' | 'system' | 'task_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'state' | 'system' | 'tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'statistics' | 'system' | 'malloc_stats' | 'Variant' | 'VARIANT' | '' | '' | 'NO' | '' | +| 'statistics' | 'system' | 'queries_profiling' | 'Variant' | 'VARIANT' | '' | '' | 'NO' | '' | +| 'status' | 'system' | 'backtrace' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'status' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'status' | 'system' | 'notification_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'status' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'stream_id' | 'system' | 'streams' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'sub_part' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'suspend_task_after_num_failures' | 'system' | 'tasks' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'syntax' | 'system' | 'functions' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table' | 'system' | 'clustering_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table' | 'system' | 'virtual_columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_catalog' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_catalog' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'table_catalog' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'table_catalog' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_catalog' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_collation' | 'information_schema' | 'tables' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'table_comment' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_id' | 'system' | 'background_tasks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'table_id' | 'system' | 'locks' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'table_id' | 'system' | 'streams' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'table_id' | 'system' | 'tables' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'table_id' | 'system' | 'tables_with_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'table_id' | 'system' | 'temporary_tables' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'table_id' | 'system' | 'views' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'table_id' | 'system' | 'views_with_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'table_name' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_name' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'table_name' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'table_name' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_name' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_name' | 'system' | 'streams' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'table_name' | 'system' | 'streams_terse' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'table_rows' | 'information_schema' | 'tables' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'table_schema' | 'information_schema' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_schema' | 'information_schema' | 'key_column_usage' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'table_schema' | 'information_schema' | 'statistics' | 'NULL' | 'NULL' | '' | '' | 'NO' | '' | +| 'table_schema' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_schema' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_type' | 'information_schema' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_type' | 'system' | 'tables' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_type' | 'system' | 'tables_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'table_version' | 'system' | 'streams' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'tables' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'target_features' | 'system' | 'build_options' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'task_running_secs' | 'system' | 'background_tasks' | 'Nullable(UInt64)' | 'BIGINT UNSIGNED' | '' | '' | 'YES' | '' | +| 'task_type' | 'system' | 'background_jobs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'tenant_id' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'time' | 'system' | 'processes' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'total_columns' | 'system' | 'tables' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'total_columns' | 'system' | 'tables_with_history' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'total_partitions' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'trigger' | 'system' | 'background_tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'type' | 'system' | 'background_tasks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'type' | 'system' | 'columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'type' | 'system' | 'indexes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'type' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'type' | 'system' | 'notifications' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'type' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'type' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'unit' | 'system' | 'caches' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'update_on' | 'system' | 'roles' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'update_on' | 'system' | 'users' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'updated_on' | 'system' | 'background_tasks' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'updated_on' | 'system' | 'dictionaries' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'updated_on' | 'system' | 'indexes' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'updated_on' | 'system' | 'password_policies' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'updated_on' | 'system' | 'streams' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'updated_on' | 'system' | 'tables' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'updated_on' | 'system' | 'tables_with_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'updated_on' | 'system' | 'views' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'updated_on' | 'system' | 'views_with_history' | 'Timestamp' | 'TIMESTAMP' | '' | '' | 'NO' | '' | +| 'updated_on' | 'system' | 'virtual_columns' | 'Nullable(Timestamp)' | 'TIMESTAMP' | '' | '' | 'YES' | '' | +| 'user' | 'system' | 'locks' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'user' | 'system' | 'processes' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'user_agent' | 'system' | 'query_log' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'vacuum_stats' | 'system' | 'background_tasks' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | +| 'value' | 'system' | 'configs' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'value' | 'system' | 'malloc_stats_totals' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'value' | 'system' | 'metrics' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'value' | 'system' | 'settings' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'version' | 'system' | 'clusters' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'version' | 'system' | 'credits' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'view_definition' | 'information_schema' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'view_query' | 'system' | 'views' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'view_query' | 'system' | 'views_with_history' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'virtual_columns' | 'system' | 'virtual_columns' | 'String' | 'VARCHAR' | '' | '' | 'NO' | '' | +| 'warehouse' | 'system' | 'task_history' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'warehouse' | 'system' | 'tasks' | 'Nullable(String)' | 'VARCHAR' | '' | '' | 'YES' | '' | +| 'webhook_options' | 'system' | 'notifications' | 'Nullable(Variant)' | 'VARIANT' | '' | '' | 'YES' | '' | +| 'written_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'written_io_bytes' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'written_io_bytes_cost_ms' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | +| 'written_rows' | 'system' | 'query_log' | 'UInt64' | 'BIGINT UNSIGNED' | '' | '' | 'NO' | '' | ++-----------------------------------+----------------------+--------------------------+-----------------------+---------------------+----------+----------+----------+----------+ diff --git a/src/query/service/tests/it/storages/testdata/databases_table.txt b/src/query/service/tests/it/storages/testdata/databases_table.txt index 286957a4934b..a18103a8b1eb 100644 --- a/src/query/service/tests/it/storages/testdata/databases_table.txt +++ b/src/query/service/tests/it/storages/testdata/databases_table.txt @@ -1,12 +1,12 @@ ---------- TABLE INFO ------------ DB.Table: 'system'.'databases', Table: databases-table_id:1, ver:0, Engine: SystemDatabases -------- TABLE CONTENTS ---------- -+-----------+----------------------+---------------------+----------+ -| Column 0 | Column 1 | Column 2 | Column 3 | -+-----------+----------------------+---------------------+----------+ -| 'default' | 'default' | 1 | NULL | -| 'default' | 'information_schema' | 4611686018427387906 | NULL | -| 'default' | 'system' | 4611686018427387905 | NULL | -+-----------+----------------------+---------------------+----------+ ++-----------+----------------------+---------------------+----------+----------+ +| Column 0 | Column 1 | Column 2 | Column 3 | Column 4 | ++-----------+----------------------+---------------------+----------+----------+ +| 'default' | 'default' | 1 | NULL | NULL | +| 'default' | 'information_schema' | 4611686018427387906 | NULL | NULL | +| 'default' | 'system' | 4611686018427387905 | NULL | NULL | ++-----------+----------------------+---------------------+----------+----------+ diff --git a/src/query/service/tests/it/storages/testdata/databases_with_history_table.txt b/src/query/service/tests/it/storages/testdata/databases_with_history_table.txt new file mode 100644 index 000000000000..d9a4ded4d128 --- /dev/null +++ b/src/query/service/tests/it/storages/testdata/databases_with_history_table.txt @@ -0,0 +1,12 @@ +---------- TABLE INFO ------------ +DB.Table: 'system'.'databases_with_history', Table: databases_with_history-table_id:1, ver:0, Engine: SystemDatabases +-------- TABLE CONTENTS ---------- ++-----------+----------------------+---------------------+----------+----------+ +| Column 0 | Column 1 | Column 2 | Column 3 | Column 4 | ++-----------+----------------------+---------------------+----------+----------+ +| 'default' | 'default' | 1 | NULL | NULL | +| 'default' | 'information_schema' | 4611686018427387906 | NULL | NULL | +| 'default' | 'system' | 4611686018427387905 | NULL | NULL | ++-----------+----------------------+---------------------+----------+----------+ + + diff --git a/src/query/sql/src/planner/binder/binder.rs b/src/query/sql/src/planner/binder/binder.rs index c38bdc067f1c..abc243ae2cc0 100644 --- a/src/query/sql/src/planner/binder/binder.rs +++ b/src/query/sql/src/planner/binder/binder.rs @@ -268,6 +268,7 @@ impl<'a> Binder { // Databases Statement::ShowDatabases(stmt) => self.bind_show_databases(bind_context, stmt).await?, + Statement::ShowDropDatabases(stmt) => self.bind_show_drop_databases(bind_context, stmt).await?, Statement::ShowCreateDatabase(stmt) => self.bind_show_create_database(stmt).await?, Statement::CreateDatabase(stmt) => self.bind_create_database(stmt).await?, Statement::DropDatabase(stmt) => self.bind_drop_database(stmt).await?, diff --git a/src/query/sql/src/planner/binder/ddl/database.rs b/src/query/sql/src/planner/binder/ddl/database.rs index ad5028ee3b33..f4991733dd8b 100644 --- a/src/query/sql/src/planner/binder/ddl/database.rs +++ b/src/query/sql/src/planner/binder/ddl/database.rs @@ -23,6 +23,7 @@ use databend_common_ast::ast::DropDatabaseStmt; use databend_common_ast::ast::SQLProperty; use databend_common_ast::ast::ShowCreateDatabaseStmt; use databend_common_ast::ast::ShowDatabasesStmt; +use databend_common_ast::ast::ShowDropDatabasesStmt; use databend_common_ast::ast::ShowLimit; use databend_common_ast::ast::UndropDatabaseStmt; use databend_common_exception::Result; @@ -93,6 +94,47 @@ impl Binder { .await } + #[async_backtrace::framed] + pub(in crate::planner::binder) async fn bind_show_drop_databases( + &mut self, + bind_context: &mut BindContext, + stmt: &ShowDropDatabasesStmt, + ) -> Result { + let ShowDropDatabasesStmt { catalog, limit } = stmt; + let mut select_builder = SelectBuilder::from("system.databases_with_history"); + + let ctl = if let Some(ctl) = catalog { + normalize_identifier(ctl, &self.name_resolution_ctx).name + } else { + self.ctx.get_current_catalog().to_string() + }; + + select_builder.with_filter(format!("catalog = '{ctl}'")); + + select_builder.with_column("catalog"); + select_builder.with_column("name"); + select_builder.with_column("database_id"); + select_builder.with_column("dropped_on"); + + select_builder.with_order_by("catalog"); + select_builder.with_order_by("name"); + + match limit { + Some(ShowLimit::Like { pattern }) => { + select_builder.with_filter(format!("name LIKE '{pattern}'")); + } + Some(ShowLimit::Where { selection }) => { + select_builder.with_filter(format!("({selection})")); + } + None => (), + } + let query = select_builder.build(); + debug!("show databases rewrite to: {:?}", query); + + self.bind_rewrite_to_query(bind_context, query.as_str(), RewriteKind::ShowDropDatabases) + .await + } + #[async_backtrace::framed] pub(in crate::planner::binder) async fn bind_show_create_database( &self, diff --git a/src/query/sql/src/planner/plans/plan.rs b/src/query/sql/src/planner/plans/plan.rs index 80556dbbcdd6..da139fa99e92 100644 --- a/src/query/sql/src/planner/plans/plan.rs +++ b/src/query/sql/src/planner/plans/plan.rs @@ -389,6 +389,7 @@ pub enum RewriteKind { ShowCatalogs, ShowDatabases, + ShowDropDatabases, ShowTables(String, String), ShowColumns(String, String, String), ShowTablesStatus, diff --git a/src/query/storages/hive/hive/src/hive_catalog.rs b/src/query/storages/hive/hive/src/hive_catalog.rs index 990dd0607937..3e547a2258dc 100644 --- a/src/query/storages/hive/hive/src/hive_catalog.rs +++ b/src/query/storages/hive/hive/src/hive_catalog.rs @@ -293,6 +293,11 @@ impl Catalog for HiveCatalog { Ok(res) } + async fn list_databases_history(&self, _tenant: &Tenant) -> Result>> { + // TODO: Implement list_databases_history + unimplemented!() + } + // Get all the databases. #[fastrace::trace] #[async_backtrace::framed] diff --git a/src/query/storages/iceberg/src/catalog.rs b/src/query/storages/iceberg/src/catalog.rs index 92ef717b8685..664cec399f21 100644 --- a/src/query/storages/iceberg/src/catalog.rs +++ b/src/query/storages/iceberg/src/catalog.rs @@ -226,6 +226,10 @@ impl Catalog for IcebergCatalog { Ok(Arc::new(IcebergDatabase::create(self.clone(), db_name))) } + async fn list_databases_history(&self, _tenant: &Tenant) -> Result>> { + unimplemented!() + } + #[async_backtrace::framed] async fn list_databases(&self, _tenant: &Tenant) -> Result>> { let db_names = self diff --git a/src/query/storages/system/src/databases_table.rs b/src/query/storages/system/src/databases_table.rs index cfebe2c1b97f..4adbbb880d73 100644 --- a/src/query/storages/system/src/databases_table.rs +++ b/src/query/storages/system/src/databases_table.rs @@ -16,12 +16,14 @@ use std::sync::Arc; use databend_common_catalog::catalog::Catalog; use databend_common_catalog::catalog::CatalogManager; +use databend_common_catalog::database::Database; use databend_common_catalog::plan::PushDownInfo; use databend_common_catalog::table::Table; use databend_common_catalog::table_context::TableContext; use databend_common_exception::Result; use databend_common_expression::types::NumberDataType; use databend_common_expression::types::StringType; +use databend_common_expression::types::TimestampType; use databend_common_expression::types::UInt64Type; use databend_common_expression::utils::FromData; use databend_common_expression::DataBlock; @@ -33,19 +35,60 @@ use databend_common_meta_app::schema::database_name_ident::DatabaseNameIdent; use databend_common_meta_app::schema::TableIdent; use databend_common_meta_app::schema::TableInfo; use databend_common_meta_app::schema::TableMeta; +use databend_common_meta_app::tenant::Tenant; use databend_common_users::UserApiProvider; use log::warn; use crate::table::AsyncOneBlockSystemTable; use crate::table::AsyncSystemTable; -pub struct DatabasesTable { +pub type DatabasesTableWithHistory = DatabasesTable; +pub type DatabasesTableWithoutHistory = DatabasesTable; + +pub struct DatabasesTable { table_info: TableInfo, } #[async_trait::async_trait] -impl AsyncSystemTable for DatabasesTable { - const NAME: &'static str = "system.databases"; +pub trait HistoryAware { + const TABLE_NAME: &'static str; + async fn list_databases( + catalog: &Arc, + tenant: &Tenant, + with_history: bool, + ) -> Result>>; +} + +macro_rules! impl_history_aware { + ($with_history:expr, $table_name:expr) => { + #[async_trait::async_trait] + impl HistoryAware for DatabasesTable<$with_history> { + const TABLE_NAME: &'static str = $table_name; + + #[async_backtrace::framed] + async fn list_databases( + catalog: &Arc, + tenant: &Tenant, + with_history: bool, + ) -> Result>> { + if with_history { + catalog.list_databases_history(tenant).await + } else { + catalog.list_databases(tenant).await + } + } + } + }; +} + +impl_history_aware!(true, "databases_with_history"); +impl_history_aware!(false, "databases"); + +#[async_trait::async_trait] +impl AsyncSystemTable for DatabasesTable +where DatabasesTable: HistoryAware +{ + const NAME: &'static str = Self::TABLE_NAME; fn get_table_info(&self) -> &TableInfo { &self.table_info @@ -72,57 +115,106 @@ impl AsyncSystemTable for DatabasesTable { let mut db_names = vec![]; let mut db_ids = vec![]; let mut owners: Vec> = vec![]; + let mut dropped_on: Vec> = vec![]; let visibility_checker = ctx.get_visibility_checker().await?; let catalog_dbs = visibility_checker.get_visibility_database(); // None means has global level privileges if let Some(catalog_dbs) = catalog_dbs { - for (catalog, dbs) in catalog_dbs { - let mut catalog_db_ids = vec![]; - let mut catalog_db_names = vec![]; - let ctl = ctx.get_catalog(catalog).await?; - catalog_db_names.extend( - dbs.iter() - .filter_map(|(db_name, _)| *db_name) - .map(|db_name| db_name.to_string()), - ); - catalog_db_ids.extend(dbs.iter().filter_map(|(_, db_id)| *db_id)); - - if let Ok(databases) = ctl - .mget_database_names_by_ids(&tenant, &catalog_db_ids) - .await - { - catalog_db_names.extend(databases.into_iter().flatten()); - } else { - let msg = format!("Failed to get database name by id: {}", ctl.name()); - warn!("{}", msg); + if WITH_HISTORY { + for (ctl_name, dbs) in catalog_dbs { + let catalog = ctx.get_catalog(ctl_name).await?; + let dbs_history = catalog.list_databases_history(&tenant).await?; + for db_history in dbs_history { + let db_name = db_history + .get_db_info() + .name_ident + .database_name() + .to_string(); + let id = db_history.get_db_info().database_id.db_id; + if db_ids.contains(&id) { + continue; + } + if dbs.contains(&(None, Some(&id))) + || db_name.to_lowercase() == "information_schema" + || db_name.to_lowercase() == "system" + { + catalog_names.push(ctl_name.clone()); + db_names.push(db_name); + db_ids.push(id); + owners.push( + user_api + .get_ownership(&tenant, &OwnershipObject::Database { + catalog_name: ctl_name.to_string(), + db_id: id, + }) + .await + .ok() + .and_then(|ownership| ownership.map(|o| o.role.clone())), + ); + dropped_on.push( + db_history + .get_db_info() + .meta + .drop_on + .map(|v| v.timestamp_micros()), + ); + } + } } - - let db_idents = catalog_db_names - .iter() - .map(|name| DatabaseNameIdent::new(&tenant, name)) - .collect::>(); - let dbs = ctl.mget_databases(&tenant, &db_idents).await?; - for db in dbs { - catalog_names.push(catalog.clone()); - db_names.push(db.get_db_info().name_ident.database_name().to_string()); - let db_id = db.get_db_info().database_id.db_id; - db_ids.push(db_id); - owners.push( - user_api - .get_ownership(&tenant, &OwnershipObject::Database { - catalog_name: catalog.to_string(), - db_id, - }) - .await - .ok() - .and_then(|ownership| ownership.map(|o| o.role.clone())), + } else { + for (catalog, dbs) in catalog_dbs { + let mut catalog_db_ids = vec![]; + let mut catalog_db_names = vec![]; + let ctl = ctx.get_catalog(catalog).await?; + catalog_db_names.extend( + dbs.iter() + .filter_map(|(db_name, _)| *db_name) + .map(|db_name| db_name.to_string()), ); + catalog_db_ids.extend(dbs.iter().filter_map(|(_, db_id)| *db_id)); + + if let Ok(databases) = ctl + .mget_database_names_by_ids(&tenant, &catalog_db_ids) + .await + { + catalog_db_names.extend(databases.into_iter().flatten()); + } else { + let msg = format!("Failed to get database name by id: {}", ctl.name()); + warn!("{}", msg); + } + let db_idents = catalog_db_names + .iter() + .map(|name| DatabaseNameIdent::new(&tenant, name)) + .collect::>(); + let dbs = ctl.mget_databases(&tenant, &db_idents).await?; + + for db in dbs { + let db_id = db.get_db_info().database_id.db_id; + if db_ids.contains(&db_id) { + continue; + } + catalog_names.push(catalog.clone()); + db_names.push(db.get_db_info().name_ident.database_name().to_string()); + db_ids.push(db_id); + owners.push( + user_api + .get_ownership(&tenant, &OwnershipObject::Database { + catalog_name: catalog.to_string(), + db_id, + }) + .await + .ok() + .and_then(|ownership| ownership.map(|o| o.role.clone())), + ); + dropped_on + .push(db.get_db_info().meta.drop_on.map(|v| v.timestamp_micros())); + } } } } else { for (ctl_name, catalog) in catalogs.into_iter() { - let databases = catalog.list_databases(&tenant).await?; + let databases = Self::list_databases(&catalog, &tenant, WITH_HISTORY).await?; let final_dbs = databases .into_iter() .filter(|db| { @@ -150,6 +242,7 @@ impl AsyncSystemTable for DatabasesTable { .ok() .and_then(|ownership| ownership.map(|o| o.role.clone())), ); + dropped_on.push(db.get_db_info().meta.drop_on.map(|v| v.timestamp_micros())); } } } @@ -159,11 +252,14 @@ impl AsyncSystemTable for DatabasesTable { StringType::from_data(db_names), UInt64Type::from_data(db_ids), StringType::from_opt_data(owners), + TimestampType::from_opt_data(dropped_on), ])) } } -impl DatabasesTable { +impl DatabasesTable +where DatabasesTable: HistoryAware +{ pub fn create(table_id: u64) -> Arc { let schema = TableSchemaRefExt::create(vec![ TableField::new("catalog", TableDataType::String), @@ -173,11 +269,16 @@ impl DatabasesTable { "owner", TableDataType::Nullable(Box::from(TableDataType::String)), ), + TableField::new( + "dropped_on", + TableDataType::Nullable(Box::new(TableDataType::Timestamp)), + ), ]); + let name = Self::TABLE_NAME; let table_info = TableInfo { - desc: "'system'.'databases'".to_string(), - name: "databases".to_string(), + desc: format!("'system'.'{name}'"), + name: Self::NAME.to_owned(), ident: TableIdent::new(table_id, 0), meta: TableMeta { schema, diff --git a/src/query/storages/system/src/lib.rs b/src/query/storages/system/src/lib.rs index 21210b47148f..8b067b9232e0 100644 --- a/src/query/storages/system/src/lib.rs +++ b/src/query/storages/system/src/lib.rs @@ -84,6 +84,8 @@ pub use configs_table::ConfigsTable; pub use contributors_table::ContributorsTable; pub use credits_table::CreditsTable; pub use databases_table::DatabasesTable; +pub use databases_table::DatabasesTableWithHistory; +pub use databases_table::DatabasesTableWithoutHistory; pub use dictionaries_table::DictionariesTable; pub use engines_table::EnginesTable; pub use functions_table::FunctionsTable; diff --git a/tests/sqllogictests/suites/base/06_show/06_0009_show_databases.test b/tests/sqllogictests/suites/base/06_show/06_0009_show_databases.test index c19550335bba..55ac566855e2 100644 --- a/tests/sqllogictests/suites/base/06_show/06_0009_show_databases.test +++ b/tests/sqllogictests/suites/base/06_show/06_0009_show_databases.test @@ -38,3 +38,8 @@ DROP DATABASE IF EXISTS ss1 statement ok DROP DATABASE IF EXISTS ss2 + +query T +select name, dropped_on is not null from system.databases_with_history where name='ss1' order by dropped_on limit 1; +---- +ss1 1 diff --git a/tests/suites/0_stateless/18_rbac/18_0003_db_visibility.result b/tests/suites/0_stateless/18_rbac/18_0003_db_visibility.result index 1ff68e3a1f7b..c96959197bde 100644 --- a/tests/suites/0_stateless/18_rbac/18_0003_db_visibility.result +++ b/tests/suites/0_stateless/18_rbac/18_0003_db_visibility.result @@ -1,6 +1,10 @@ === test u1 with role1 === information_schema system +true true +db1 true +system +information_schema 1 Error: APIError: ResponseError with 1063: Permission denied: privilege [Select] is required on 'default'.'db_root'.'t1' for user 'u1'@'%' with roles [public,role1] db1 diff --git a/tests/suites/0_stateless/18_rbac/18_0003_db_visibility.sh b/tests/suites/0_stateless/18_rbac/18_0003_db_visibility.sh index ff8970bbfba9..9d0869d9fd99 100755 --- a/tests/suites/0_stateless/18_rbac/18_0003_db_visibility.sh +++ b/tests/suites/0_stateless/18_rbac/18_0003_db_visibility.sh @@ -33,6 +33,12 @@ echo "grant role role1 to u1;" | $BENDSQL_CLIENT_CONNECT export TEST_U1_CONNECT="bendsql --user=u1 --password=123 --host=${QUERY_MYSQL_HANDLER_HOST} --port ${QUERY_HTTP_HANDLER_PORT}" echo "show databases" | $TEST_U1_CONNECT echo "create database db1;" | $TEST_U1_CONNECT +echo "grant delete on db1.* to u1" | $BENDSQL_CLIENT_CONNECT +echo "drop database db1;" | $TEST_U1_CONNECT +echo "select count(name)>0, count(dropped_on is not null)>0 from system.databases_with_history where name='db1'" | $BENDSQL_CLIENT_CONNECT +echo "select name, dropped_on is not null from system.databases_with_history where name='db1'" | $TEST_U1_CONNECT +echo "select name from system.databases_with_history where name!='db1'" | $TEST_U1_CONNECT +echo "create database db1;" | $TEST_U1_CONNECT echo "create table db1.t1(id int);" | $TEST_U1_CONNECT echo "insert into db1.t1 values(1);" | $TEST_U1_CONNECT echo "select * from db1.t1;" | $TEST_U1_CONNECT