From 6dfc163adaf7c5605b0bbccb4062392638d74080 Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Thu, 4 Apr 2024 11:19:29 +0800 Subject: [PATCH 01/12] fix: columns table in information_schema misses some columns --- Cargo.lock | 1 + src/catalog/Cargo.toml | 1 + src/catalog/src/information_schema/columns.rs | 206 +++++- src/datatypes/src/types/datetime_type.rs | 7 + src/query/src/sql.rs | 45 +- .../common/show/show_columns.result | 84 +-- .../common/system/information_schema.result | 664 +++++++++--------- 7 files changed, 607 insertions(+), 401 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 397459043901..704c2e197630 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1290,6 +1290,7 @@ dependencies = [ "serde_json", "session", "snafu", + "sql", "store-api", "table", "tokio", diff --git a/src/catalog/Cargo.toml b/src/catalog/Cargo.toml index 1c0a9a9b170b..ff57e0cb0add 100644 --- a/src/catalog/Cargo.toml +++ b/src/catalog/Cargo.toml @@ -40,6 +40,7 @@ prometheus.workspace = true serde_json.workspace = true session.workspace = true snafu.workspace = true +sql.workspace = true store-api.workspace = true table.workspace = true tokio.workspace = true diff --git a/src/catalog/src/information_schema/columns.rs b/src/catalog/src/information_schema/columns.rs index 8b25ad08ddbf..90229decafcd 100644 --- a/src/catalog/src/information_schema/columns.rs +++ b/src/catalog/src/information_schema/columns.rs @@ -30,9 +30,10 @@ use datatypes::prelude::{ConcreteDataType, DataType}; use datatypes::scalars::ScalarVectorBuilder; use datatypes::schema::{ColumnSchema, Schema, SchemaRef}; use datatypes::value::Value; -use datatypes::vectors::{StringVectorBuilder, VectorRef}; +use datatypes::vectors::{Int64VectorBuilder, StringVectorBuilder, VectorRef}; use futures::TryStreamExt; use snafu::{OptionExt, ResultExt}; +use sql::statements; use store_api::storage::{ScanRequest, TableId}; use super::{InformationTable, COLUMNS}; @@ -52,6 +53,20 @@ pub const TABLE_CATALOG: &str = "table_catalog"; pub const TABLE_SCHEMA: &str = "table_schema"; pub const TABLE_NAME: &str = "table_name"; pub const COLUMN_NAME: &str = "column_name"; +const ORDINAL_POSITION: &str = "ordinal_position"; +const CHARACTER_MAXIMUM_LENGTH: &str = "character_maximum_length"; +const CHARACTER_OCTET_LENGTH: &str = "character_octet_length"; +const NUMERIC_PRECISION: &str = "numeric_precision"; +const NUMERIC_SCALE: &str = "numeric_scale"; +const DATETIME_PRECISION: &str = "datetime_precision"; +const CHARACTER_SET_NAME: &str = "character_set_name"; +pub const COLLATION_NAME: &str = "collation_name"; +pub const COLUMN_KEY: &str = "column_key"; +pub const EXTRA: &str = "extra"; +pub const PRIVILEGES: &str = "privileges"; +const GENERATION_EXPRESSION: &str = "generation_expression"; +// Extension field to keep greptime data type name +pub const GREPTIME_DATA_TYPE: &str = "greptime_data_type"; pub const DATA_TYPE: &str = "data_type"; pub const SEMANTIC_TYPE: &str = "semantic_type"; pub const COLUMN_DEFAULT: &str = "column_default"; @@ -60,6 +75,15 @@ const COLUMN_TYPE: &str = "column_type"; pub const COLUMN_COMMENT: &str = "column_comment"; const INIT_CAPACITY: usize = 42; +// The maximum length of string type +const MAX_STRING_LENGTH: i64 = 2147483647; +const UTF8_CHARSET_NAME: &str = "utf8"; +const UTF8_COLLATE_NAME: &str = "utf8_bin"; +const PRI_COLUMN_KEY: &str = "PRI"; +const TIME_INDEX_COLUMN_KEY: &str = "TIME INDEX"; +const DEFAULT_PRIVILEGES: &str = "select,insert"; +const EMPTY_STR: &str = ""; + impl InformationSchemaColumns { pub(super) fn new(catalog_name: String, catalog_manager: Weak) -> Self { Self { @@ -75,6 +99,39 @@ impl InformationSchemaColumns { ColumnSchema::new(TABLE_SCHEMA, ConcreteDataType::string_datatype(), false), ColumnSchema::new(TABLE_NAME, ConcreteDataType::string_datatype(), false), ColumnSchema::new(COLUMN_NAME, ConcreteDataType::string_datatype(), false), + ColumnSchema::new(ORDINAL_POSITION, ConcreteDataType::int64_datatype(), false), + ColumnSchema::new( + CHARACTER_MAXIMUM_LENGTH, + ConcreteDataType::int64_datatype(), + true, + ), + ColumnSchema::new( + CHARACTER_OCTET_LENGTH, + ConcreteDataType::int64_datatype(), + true, + ), + ColumnSchema::new(NUMERIC_PRECISION, ConcreteDataType::int64_datatype(), true), + ColumnSchema::new(NUMERIC_SCALE, ConcreteDataType::int64_datatype(), true), + ColumnSchema::new(DATETIME_PRECISION, ConcreteDataType::int64_datatype(), true), + ColumnSchema::new( + CHARACTER_SET_NAME, + ConcreteDataType::string_datatype(), + true, + ), + ColumnSchema::new(COLLATION_NAME, ConcreteDataType::string_datatype(), true), + ColumnSchema::new(COLUMN_KEY, ConcreteDataType::string_datatype(), false), + ColumnSchema::new(EXTRA, ConcreteDataType::string_datatype(), false), + ColumnSchema::new(PRIVILEGES, ConcreteDataType::string_datatype(), false), + ColumnSchema::new( + GENERATION_EXPRESSION, + ConcreteDataType::string_datatype(), + false, + ), + ColumnSchema::new( + GREPTIME_DATA_TYPE, + ConcreteDataType::string_datatype(), + false, + ), ColumnSchema::new(DATA_TYPE, ConcreteDataType::string_datatype(), false), ColumnSchema::new(SEMANTIC_TYPE, ConcreteDataType::string_datatype(), false), ColumnSchema::new(COLUMN_DEFAULT, ConcreteDataType::string_datatype(), true), @@ -136,9 +193,21 @@ struct InformationSchemaColumnsBuilder { schema_names: StringVectorBuilder, table_names: StringVectorBuilder, column_names: StringVectorBuilder, + ordinal_positions: Int64VectorBuilder, + character_maximum_lengths: Int64VectorBuilder, + character_octet_lengths: Int64VectorBuilder, + numeric_precisions: Int64VectorBuilder, + numeric_scales: Int64VectorBuilder, + datetime_precisions: Int64VectorBuilder, + character_set_names: StringVectorBuilder, + collation_names: StringVectorBuilder, + column_keys: StringVectorBuilder, + extras: StringVectorBuilder, + privileges: StringVectorBuilder, + generation_expressions: StringVectorBuilder, + greptime_data_types: StringVectorBuilder, data_types: StringVectorBuilder, semantic_types: StringVectorBuilder, - column_defaults: StringVectorBuilder, is_nullables: StringVectorBuilder, column_types: StringVectorBuilder, @@ -159,6 +228,19 @@ impl InformationSchemaColumnsBuilder { schema_names: StringVectorBuilder::with_capacity(INIT_CAPACITY), table_names: StringVectorBuilder::with_capacity(INIT_CAPACITY), column_names: StringVectorBuilder::with_capacity(INIT_CAPACITY), + ordinal_positions: Int64VectorBuilder::with_capacity(INIT_CAPACITY), + character_maximum_lengths: Int64VectorBuilder::with_capacity(INIT_CAPACITY), + character_octet_lengths: Int64VectorBuilder::with_capacity(INIT_CAPACITY), + numeric_precisions: Int64VectorBuilder::with_capacity(INIT_CAPACITY), + numeric_scales: Int64VectorBuilder::with_capacity(INIT_CAPACITY), + datetime_precisions: Int64VectorBuilder::with_capacity(INIT_CAPACITY), + character_set_names: StringVectorBuilder::with_capacity(INIT_CAPACITY), + collation_names: StringVectorBuilder::with_capacity(INIT_CAPACITY), + column_keys: StringVectorBuilder::with_capacity(INIT_CAPACITY), + extras: StringVectorBuilder::with_capacity(INIT_CAPACITY), + privileges: StringVectorBuilder::with_capacity(INIT_CAPACITY), + generation_expressions: StringVectorBuilder::with_capacity(INIT_CAPACITY), + greptime_data_types: StringVectorBuilder::with_capacity(INIT_CAPACITY), data_types: StringVectorBuilder::with_capacity(INIT_CAPACITY), semantic_types: StringVectorBuilder::with_capacity(INIT_CAPACITY), column_defaults: StringVectorBuilder::with_capacity(INIT_CAPACITY), @@ -194,6 +276,7 @@ impl InformationSchemaColumnsBuilder { }; self.add_column( + idx, &predicates, &catalog_name, &schema_name, @@ -208,8 +291,10 @@ impl InformationSchemaColumnsBuilder { self.finish() } + #[allow(clippy::too_many_arguments)] fn add_column( &mut self, + index: usize, predicates: &Predicates, catalog_name: &str, schema_name: &str, @@ -217,7 +302,16 @@ impl InformationSchemaColumnsBuilder { semantic_type: &str, column_schema: &ColumnSchema, ) { - let data_type = &column_schema.data_type.name(); + // Use sql data type name + let data_type = statements::concrete_data_type_to_sql_data_type(&column_schema.data_type) + .map(|dt| dt.to_string().to_lowercase()) + .unwrap_or_else(|_| column_schema.data_type.name()); + + let column_key = match semantic_type { + SEMANTIC_TYPE_PRIMARY_KEY => PRI_COLUMN_KEY, + SEMANTIC_TYPE_TIME_INDEX => TIME_INDEX_COLUMN_KEY, + _ => EMPTY_STR, + }; let row = [ (TABLE_CATALOG, &Value::from(catalog_name)), @@ -226,6 +320,8 @@ impl InformationSchemaColumnsBuilder { (COLUMN_NAME, &Value::from(column_schema.name.as_str())), (DATA_TYPE, &Value::from(data_type.as_str())), (SEMANTIC_TYPE, &Value::from(semantic_type)), + (ORDINAL_POSITION, &Value::from((index + 1) as i64)), + (COLUMN_KEY, &Value::from(column_key)), ]; if !predicates.eval(&row) { @@ -236,7 +332,94 @@ impl InformationSchemaColumnsBuilder { self.schema_names.push(Some(schema_name)); self.table_names.push(Some(table_name)); self.column_names.push(Some(&column_schema.name)); - self.data_types.push(Some(data_type)); + + self.ordinal_positions.push(Some((index + 1) as i64)); + + if column_schema.data_type.is_string() { + self.character_maximum_lengths.push(Some(MAX_STRING_LENGTH)); + self.character_octet_lengths.push(Some(MAX_STRING_LENGTH)); + self.numeric_precisions.push(None); + self.numeric_scales.push(None); + self.datetime_precisions.push(None); + self.character_set_names.push(Some(UTF8_CHARSET_NAME)); + self.collation_names.push(Some(UTF8_COLLATE_NAME)); + } else if column_schema.data_type.is_numeric() || column_schema.data_type.is_decimal() { + self.character_maximum_lengths.push(None); + self.character_octet_lengths.push(None); + + match &column_schema.data_type { + ConcreteDataType::Int8(_) | ConcreteDataType::UInt8(_) => { + self.numeric_precisions.push(Some(3)); + self.numeric_scales.push(Some(0)); + } + ConcreteDataType::Int16(_) | ConcreteDataType::UInt16(_) => { + self.numeric_precisions.push(Some(5)); + self.numeric_scales.push(Some(0)); + } + ConcreteDataType::Int32(_) | ConcreteDataType::UInt32(_) => { + self.numeric_precisions.push(Some(10)); + self.numeric_scales.push(Some(0)); + } + ConcreteDataType::Int64(_) => { + self.numeric_precisions.push(Some(19)); + self.numeric_scales.push(Some(0)); + } + ConcreteDataType::UInt64(_) => { + self.numeric_precisions.push(Some(20)); + self.numeric_scales.push(Some(0)); + } + ConcreteDataType::Float32(_) => { + self.numeric_precisions.push(Some(12)); + self.numeric_scales.push(None); + } + ConcreteDataType::Float64(_) => { + self.numeric_precisions.push(Some(22)); + self.numeric_scales.push(None); + } + ConcreteDataType::Decimal128(decimal_type) => { + self.numeric_precisions + .push(Some(decimal_type.precision() as i64)); + self.numeric_scales.push(Some(decimal_type.scale() as i64)); + } + _ => unreachable!(), + } + + self.datetime_precisions.push(None); + self.character_set_names.push(None); + self.collation_names.push(None); + } else { + self.character_maximum_lengths.push(None); + self.character_octet_lengths.push(None); + self.numeric_precisions.push(None); + self.numeric_scales.push(None); + + match &column_schema.data_type { + ConcreteDataType::DateTime(datetime_type) => { + self.datetime_precisions + .push(Some(datetime_type.precision() as i64)); + } + ConcreteDataType::Timestamp(ts_type) => { + self.datetime_precisions + .push(Some(ts_type.precision() as i64)); + } + ConcreteDataType::Time(time_type) => { + self.datetime_precisions + .push(Some(time_type.precision() as i64)); + } + _ => self.datetime_precisions.push(None), + } + + self.character_set_names.push(None); + self.collation_names.push(None); + } + + self.column_keys.push(Some(column_key)); + self.extras.push(Some(EMPTY_STR)); + self.privileges.push(Some(DEFAULT_PRIVILEGES)); + self.generation_expressions.push(Some(EMPTY_STR)); + self.greptime_data_types + .push(Some(&column_schema.data_type.name())); + self.data_types.push(Some(&data_type)); self.semantic_types.push(Some(semantic_type)); self.column_defaults.push( column_schema @@ -249,7 +432,7 @@ impl InformationSchemaColumnsBuilder { } else { self.is_nullables.push(Some("No")); } - self.column_types.push(Some(data_type)); + self.column_types.push(Some(&data_type)); self.column_comments .push(column_schema.column_comment().map(|x| x.as_ref())); } @@ -260,6 +443,19 @@ impl InformationSchemaColumnsBuilder { Arc::new(self.schema_names.finish()), Arc::new(self.table_names.finish()), Arc::new(self.column_names.finish()), + Arc::new(self.ordinal_positions.finish()), + Arc::new(self.character_maximum_lengths.finish()), + Arc::new(self.character_octet_lengths.finish()), + Arc::new(self.numeric_precisions.finish()), + Arc::new(self.numeric_scales.finish()), + Arc::new(self.datetime_precisions.finish()), + Arc::new(self.character_set_names.finish()), + Arc::new(self.collation_names.finish()), + Arc::new(self.column_keys.finish()), + Arc::new(self.extras.finish()), + Arc::new(self.privileges.finish()), + Arc::new(self.generation_expressions.finish()), + Arc::new(self.greptime_data_types.finish()), Arc::new(self.data_types.finish()), Arc::new(self.semantic_types.finish()), Arc::new(self.column_defaults.finish()), diff --git a/src/datatypes/src/types/datetime_type.rs b/src/datatypes/src/types/datetime_type.rs index 699eea3067ea..10e55000c276 100644 --- a/src/datatypes/src/types/datetime_type.rs +++ b/src/datatypes/src/types/datetime_type.rs @@ -23,10 +23,17 @@ use crate::prelude::{LogicalTypeId, MutableVector, ScalarVectorBuilder, Value, V use crate::types::LogicalPrimitiveType; use crate::vectors::{DateTimeVector, DateTimeVectorBuilder, PrimitiveVector}; +const MILLISECOND_VARIATION: u64 = 3; /// Data type for [`DateTime`]. #[derive(Debug, Default, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] pub struct DateTimeType; +impl DateTimeType { + pub fn precision(&self) -> u64 { + MILLISECOND_VARIATION + } +} + impl DataType for DateTimeType { fn name(&self) -> String { "DateTime".to_string() diff --git a/src/query/src/sql.rs b/src/query/src/sql.rs index b3a0c4806eaf..26a2641bbfe9 100644 --- a/src/query/src/sql.rs +++ b/src/query/src/sql.rs @@ -65,6 +65,7 @@ const TABLES_COLUMN: &str = "Tables"; const FIELD_COLUMN: &str = "Field"; const TABLE_TYPE_COLUMN: &str = "Table_type"; const COLUMN_NAME_COLUMN: &str = "Column"; +const COLUMN_GREPTIME_TYPE_COLUMN: &str = "Greptime_Type"; const COLUMN_TYPE_COLUMN: &str = "Type"; const COLUMN_KEY_COLUMN: &str = "Key"; const COLUMN_EXTRA_COLUMN: &str = "Extra"; @@ -293,54 +294,28 @@ pub async fn show_columns( query_ctx.current_schema().to_owned() }; - let select = vec![ - // '' as `Extra` - lit("").alias(COLUMN_EXTRA_COLUMN), - // 'select,insert,update,references' as `Privileges` - lit("select,insert,update,references").alias(COLUMN_PRIVILEGES_COLUMN), - // case `datatype` - // when 'String' then 'utf8_bin' - // else NULL - // end - case(col(columns::DATA_TYPE)) - .when(lit("String"), lit("utf8_bin")) - .otherwise(null()) - .context(error::PlanSqlSnafu)? - .alias(COLUMN_COLLATION_COLUMN), - // case `semantic_type` - // when 'TAG' then 'PRI' - // when 'TIMESTAMP' then 'TIME INDEX' - // else '' - // end as `Key` - case(col(columns::SEMANTIC_TYPE)) - .when(lit(SEMANTIC_TYPE_PRIMARY_KEY), lit(PRI_KEY)) - .when(lit(SEMANTIC_TYPE_TIME_INDEX), lit(TIME_INDEX)) - .otherwise(lit("")) - .context(error::PlanSqlSnafu)? - .alias(COLUMN_KEY_COLUMN), - Expr::Wildcard, - ]; - let projects = if stmt.full { vec![ (columns::COLUMN_NAME, FIELD_COLUMN), (columns::DATA_TYPE, COLUMN_TYPE_COLUMN), - (COLUMN_COLLATION_COLUMN, COLUMN_COLLATION_COLUMN), + (columns::COLLATION_NAME, COLUMN_COLLATION_COLUMN), (columns::IS_NULLABLE, COLUMN_NULLABLE_COLUMN), - (COLUMN_KEY_COLUMN, COLUMN_KEY_COLUMN), + (columns::COLUMN_KEY, COLUMN_KEY_COLUMN), (columns::COLUMN_DEFAULT, COLUMN_DEFAULT_COLUMN), (columns::COLUMN_COMMENT, COLUMN_COMMENT_COLUMN), - (COLUMN_PRIVILEGES_COLUMN, COLUMN_PRIVILEGES_COLUMN), - (COLUMN_EXTRA_COLUMN, COLUMN_EXTRA_COLUMN), + (columns::PRIVILEGES, COLUMN_PRIVILEGES_COLUMN), + (columns::EXTRA, COLUMN_EXTRA_COLUMN), + (columns::GREPTIME_DATA_TYPE, COLUMN_GREPTIME_TYPE_COLUMN), ] } else { vec![ (columns::COLUMN_NAME, FIELD_COLUMN), (columns::DATA_TYPE, COLUMN_TYPE_COLUMN), (columns::IS_NULLABLE, COLUMN_NULLABLE_COLUMN), - (COLUMN_KEY_COLUMN, COLUMN_KEY_COLUMN), + (columns::COLUMN_KEY, COLUMN_KEY_COLUMN), (columns::COLUMN_DEFAULT, COLUMN_DEFAULT_COLUMN), - (COLUMN_EXTRA_COLUMN, COLUMN_EXTRA_COLUMN), + (columns::EXTRA, COLUMN_EXTRA_COLUMN), + (columns::GREPTIME_DATA_TYPE, COLUMN_GREPTIME_TYPE_COLUMN), ] }; @@ -357,7 +332,7 @@ pub async fn show_columns( catalog_manager, query_ctx, COLUMNS, - select, + vec![], projects, filters, like_field, diff --git a/tests/cases/standalone/common/show/show_columns.result b/tests/cases/standalone/common/show/show_columns.result index 1af23bb4696c..5206170b3e3d 100644 --- a/tests/cases/standalone/common/show/show_columns.result +++ b/tests/cases/standalone/common/show/show_columns.result @@ -17,60 +17,60 @@ Error: 2000(InvalidSyntax), Unexpected token while parsing SQL statement: SHOW C SHOW COLUMNS FROM system_metrics; -+-------------+----------------------+------+------------+---------------------+-------+ -| Field | Type | Null | Key | Default | Extra | -+-------------+----------------------+------+------------+---------------------+-------+ -| cpu_util | Float64 | Yes | | | | -| disk_util | Float64 | Yes | | | | -| host | String | Yes | PRI | | | -| idc | String | Yes | PRI | | | -| memory_util | Float64 | Yes | | | | -| ts | TimestampMillisecond | No | TIME INDEX | current_timestamp() | | -+-------------+----------------------+------+------------+---------------------+-------+ ++-------------+--------------+------+------------+---------------------+-------+----------------------+ +| Field | Type | Null | Key | Default | Extra | Greptime_Type | ++-------------+--------------+------+------------+---------------------+-------+----------------------+ +| cpu_util | double | Yes | | | | Float64 | +| disk_util | double | Yes | | | | Float64 | +| host | string | Yes | PRI | | | String | +| idc | string | Yes | PRI | | | String | +| memory_util | double | Yes | | | | Float64 | +| ts | timestamp(3) | No | TIME INDEX | current_timestamp() | | TimestampMillisecond | ++-------------+--------------+------+------------+---------------------+-------+----------------------+ SHOW COLUMNS FROM system_metrics in public; -+-------------+----------------------+------+------------+---------------------+-------+ -| Field | Type | Null | Key | Default | Extra | -+-------------+----------------------+------+------------+---------------------+-------+ -| cpu_util | Float64 | Yes | | | | -| disk_util | Float64 | Yes | | | | -| host | String | Yes | PRI | | | -| idc | String | Yes | PRI | | | -| memory_util | Float64 | Yes | | | | -| ts | TimestampMillisecond | No | TIME INDEX | current_timestamp() | | -+-------------+----------------------+------+------------+---------------------+-------+ ++-------------+--------------+------+------------+---------------------+-------+----------------------+ +| Field | Type | Null | Key | Default | Extra | Greptime_Type | ++-------------+--------------+------+------------+---------------------+-------+----------------------+ +| cpu_util | double | Yes | | | | Float64 | +| disk_util | double | Yes | | | | Float64 | +| host | string | Yes | PRI | | | String | +| idc | string | Yes | PRI | | | String | +| memory_util | double | Yes | | | | Float64 | +| ts | timestamp(3) | No | TIME INDEX | current_timestamp() | | TimestampMillisecond | ++-------------+--------------+------+------------+---------------------+-------+----------------------+ SHOW FULL COLUMNS FROM `system_metrics`; -+-------------+----------------------+-----------+------+------------+---------------------+---------+---------------------------------+-------+ -| Field | Type | Collation | Null | Key | Default | Comment | Privileges | Extra | -+-------------+----------------------+-----------+------+------------+---------------------+---------+---------------------------------+-------+ -| cpu_util | Float64 | | Yes | | | | select,insert,update,references | | -| disk_util | Float64 | | Yes | | | | select,insert,update,references | | -| host | String | utf8_bin | Yes | PRI | | | select,insert,update,references | | -| idc | String | utf8_bin | Yes | PRI | | | select,insert,update,references | | -| memory_util | Float64 | | Yes | | | | select,insert,update,references | | -| ts | TimestampMillisecond | | No | TIME INDEX | current_timestamp() | | select,insert,update,references | | -+-------------+----------------------+-----------+------+------------+---------------------+---------+---------------------------------+-------+ ++-------------+--------------+-----------+------+------------+---------------------+---------+---------------+-------+----------------------+ +| Field | Type | Collation | Null | Key | Default | Comment | Privileges | Extra | Greptime_Type | ++-------------+--------------+-----------+------+------------+---------------------+---------+---------------+-------+----------------------+ +| cpu_util | double | | Yes | | | | select,insert | | Float64 | +| disk_util | double | | Yes | | | | select,insert | | Float64 | +| host | string | utf8_bin | Yes | PRI | | | select,insert | | String | +| idc | string | utf8_bin | Yes | PRI | | | select,insert | | String | +| memory_util | double | | Yes | | | | select,insert | | Float64 | +| ts | timestamp(3) | | No | TIME INDEX | current_timestamp() | | select,insert | | TimestampMillisecond | ++-------------+--------------+-----------+------+------------+---------------------+---------+---------------+-------+----------------------+ SHOW COLUMNS FROM system_metrics like '%util%'; -+-------------+---------+------+-----+---------+-------+ -| Field | Type | Null | Key | Default | Extra | -+-------------+---------+------+-----+---------+-------+ -| cpu_util | Float64 | Yes | | | | -| disk_util | Float64 | Yes | | | | -| memory_util | Float64 | Yes | | | | -+-------------+---------+------+-----+---------+-------+ ++-------------+--------+------+-----+---------+-------+---------------+ +| Field | Type | Null | Key | Default | Extra | Greptime_Type | ++-------------+--------+------+-----+---------+-------+---------------+ +| cpu_util | double | Yes | | | | Float64 | +| disk_util | double | Yes | | | | Float64 | +| memory_util | double | Yes | | | | Float64 | ++-------------+--------+------+-----+---------+-------+---------------+ SHOW COLUMNS FROM system_metrics WHERE Field = 'cpu_util'; -+----------+---------+------+-----+---------+-------+ -| Field | Type | Null | Key | Default | Extra | -+----------+---------+------+-----+---------+-------+ -| cpu_util | Float64 | Yes | | | | -+----------+---------+------+-----+---------+-------+ ++----------+--------+------+-----+---------+-------+---------------+ +| Field | Type | Null | Key | Default | Extra | Greptime_Type | ++----------+--------+------+-----+---------+-------+---------------+ +| cpu_util | double | Yes | | | | Float64 | ++----------+--------+------+-----+---------+-------+---------------+ DROP TABLE system_metrics; diff --git a/tests/cases/standalone/common/system/information_schema.result b/tests/cases/standalone/common/system/information_schema.result index 76e565bec5bb..f22e9d6525ab 100644 --- a/tests/cases/standalone/common/system/information_schema.result +++ b/tests/cases/standalone/common/system/information_schema.result @@ -44,300 +44,313 @@ order by table_schema, table_name; select * from information_schema.columns order by table_schema, table_name, column_name; -+---------------+--------------------+---------------------------------------+-----------------------------------+----------------------+---------------+----------------+-------------+----------------------+----------------+ -| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | column_default | is_nullable | column_type | column_comment | -+---------------+--------------------+---------------------------------------+-----------------------------------+----------------------+---------------+----------------+-------------+----------------------+----------------+ -| greptime | information_schema | build_info | git_branch | String | FIELD | | No | String | | -| greptime | information_schema | build_info | git_commit | String | FIELD | | No | String | | -| greptime | information_schema | build_info | git_commit_short | String | FIELD | | No | String | | -| greptime | information_schema | build_info | git_dirty | String | FIELD | | No | String | | -| greptime | information_schema | build_info | pkg_version | String | FIELD | | No | String | | -| greptime | information_schema | character_sets | character_set_name | String | FIELD | | No | String | | -| greptime | information_schema | character_sets | default_collate_name | String | FIELD | | No | String | | -| greptime | information_schema | character_sets | description | String | FIELD | | No | String | | -| greptime | information_schema | character_sets | maxlen | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | check_constraints | check_clause | String | FIELD | | No | String | | -| greptime | information_schema | check_constraints | constraint_catalog | String | FIELD | | No | String | | -| greptime | information_schema | check_constraints | constraint_name | String | FIELD | | No | String | | -| greptime | information_schema | check_constraints | constraint_schema | String | FIELD | | No | String | | -| greptime | information_schema | collation_character_set_applicability | character_set_name | String | FIELD | | No | String | | -| greptime | information_schema | collation_character_set_applicability | collation_name | String | FIELD | | No | String | | -| greptime | information_schema | collations | character_set_name | String | FIELD | | No | String | | -| greptime | information_schema | collations | collation_name | String | FIELD | | No | String | | -| greptime | information_schema | collations | id | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | collations | is_compiled | String | FIELD | | No | String | | -| greptime | information_schema | collations | is_default | String | FIELD | | No | String | | -| greptime | information_schema | collations | sortlen | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | column_privileges | column_name | String | FIELD | | No | String | | -| greptime | information_schema | column_privileges | grantee | String | FIELD | | No | String | | -| greptime | information_schema | column_privileges | is_grantable | String | FIELD | | No | String | | -| greptime | information_schema | column_privileges | privilege_type | String | FIELD | | No | String | | -| greptime | information_schema | column_privileges | table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | column_privileges | table_name | String | FIELD | | No | String | | -| greptime | information_schema | column_privileges | table_schema | String | FIELD | | No | String | | -| greptime | information_schema | column_statistics | column_name | String | FIELD | | No | String | | -| greptime | information_schema | column_statistics | histogram | String | FIELD | | No | String | | -| greptime | information_schema | column_statistics | schema_name | String | FIELD | | No | String | | -| greptime | information_schema | column_statistics | table_name | String | FIELD | | No | String | | -| greptime | information_schema | columns | column_comment | String | FIELD | | Yes | String | | -| greptime | information_schema | columns | column_default | String | FIELD | | Yes | String | | -| greptime | information_schema | columns | column_name | String | FIELD | | No | String | | -| greptime | information_schema | columns | column_type | String | FIELD | | No | String | | -| greptime | information_schema | columns | data_type | String | FIELD | | No | String | | -| greptime | information_schema | columns | is_nullable | String | FIELD | | No | String | | -| greptime | information_schema | columns | semantic_type | String | FIELD | | No | String | | -| greptime | information_schema | columns | table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | columns | table_name | String | FIELD | | No | String | | -| greptime | information_schema | columns | table_schema | String | FIELD | | No | String | | -| greptime | information_schema | engines | comment | String | FIELD | | No | String | | -| greptime | information_schema | engines | engine | String | FIELD | | No | String | | -| greptime | information_schema | engines | savepoints | String | FIELD | | No | String | | -| greptime | information_schema | engines | support | String | FIELD | | No | String | | -| greptime | information_schema | engines | transactions | String | FIELD | | No | String | | -| greptime | information_schema | engines | xa | String | FIELD | | No | String | | -| greptime | information_schema | events | character_set_client | String | FIELD | | No | String | | -| greptime | information_schema | events | collation_connection | String | FIELD | | No | String | | -| greptime | information_schema | events | created | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | events | database_collation | String | FIELD | | No | String | | -| greptime | information_schema | events | definer | String | FIELD | | No | String | | -| greptime | information_schema | events | ends | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | events | event_body | String | FIELD | | No | String | | -| greptime | information_schema | events | event_catalog | String | FIELD | | No | String | | -| greptime | information_schema | events | event_comment | String | FIELD | | No | String | | -| greptime | information_schema | events | event_definition | String | FIELD | | No | String | | -| greptime | information_schema | events | event_name | String | FIELD | | No | String | | -| greptime | information_schema | events | event_schema | String | FIELD | | No | String | | -| greptime | information_schema | events | event_type | String | FIELD | | No | String | | -| greptime | information_schema | events | execute_at | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | events | interval_field | String | FIELD | | No | String | | -| greptime | information_schema | events | interval_value | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | events | last_altered | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | events | last_executed | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | events | on_completion | String | FIELD | | No | String | | -| greptime | information_schema | events | originator | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | events | sql_mode | String | FIELD | | No | String | | -| greptime | information_schema | events | starts | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | events | status | String | FIELD | | No | String | | -| greptime | information_schema | events | time_zone | String | FIELD | | No | String | | -| greptime | information_schema | files | autoextend_size | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | avg_row_length | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | check_time | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | files | checksum | String | FIELD | | No | String | | -| greptime | information_schema | files | create_time | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | files | creation_time | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | files | data_free | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | data_length | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | deleted_rows | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | engine | String | FIELD | | No | String | | -| greptime | information_schema | files | extent_size | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | extra | String | FIELD | | No | String | | -| greptime | information_schema | files | file_id | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | file_name | String | FIELD | | No | String | | -| greptime | information_schema | files | file_type | String | FIELD | | No | String | | -| greptime | information_schema | files | free_extents | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | fulltext_keys | String | FIELD | | No | String | | -| greptime | information_schema | files | index_length | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | initial_size | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | last_access_time | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | files | last_update_time | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | files | logfile_group_name | String | FIELD | | No | String | | -| greptime | information_schema | files | logfile_group_number | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | max_data_length | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | maximum_size | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | recover_time | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | files | row_format | String | FIELD | | No | String | | -| greptime | information_schema | files | status | String | FIELD | | No | String | | -| greptime | information_schema | files | table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | files | table_name | String | FIELD | | No | String | | -| greptime | information_schema | files | table_rows | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | table_schema | String | FIELD | | No | String | | -| greptime | information_schema | files | tablespace_name | String | FIELD | | No | String | | -| greptime | information_schema | files | total_extents | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | transaction_counter | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | update_count | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | files | update_time | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | files | version | String | FIELD | | No | String | | -| greptime | information_schema | global_status | variable_name | String | FIELD | | No | String | | -| greptime | information_schema | global_status | variable_value | String | FIELD | | No | String | | -| greptime | information_schema | greptime_region_peers | down_seconds | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | greptime_region_peers | is_leader | String | FIELD | | Yes | String | | -| greptime | information_schema | greptime_region_peers | peer_addr | String | FIELD | | Yes | String | | -| greptime | information_schema | greptime_region_peers | peer_id | UInt64 | FIELD | | Yes | UInt64 | | -| greptime | information_schema | greptime_region_peers | region_id | UInt64 | FIELD | | No | UInt64 | | -| greptime | information_schema | greptime_region_peers | status | String | FIELD | | Yes | String | | -| greptime | information_schema | key_column_usage | column_name | String | FIELD | | No | String | | -| greptime | information_schema | key_column_usage | constraint_catalog | String | FIELD | | No | String | | -| greptime | information_schema | key_column_usage | constraint_name | String | FIELD | | No | String | | -| greptime | information_schema | key_column_usage | constraint_schema | String | FIELD | | No | String | | -| greptime | information_schema | key_column_usage | ordinal_position | UInt32 | FIELD | | No | UInt32 | | -| greptime | information_schema | key_column_usage | position_in_unique_constraint | UInt32 | FIELD | | Yes | UInt32 | | -| greptime | information_schema | key_column_usage | real_table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | key_column_usage | referenced_column_name | String | FIELD | | Yes | String | | -| greptime | information_schema | key_column_usage | referenced_table_name | String | FIELD | | Yes | String | | -| greptime | information_schema | key_column_usage | referenced_table_schema | String | FIELD | | Yes | String | | -| greptime | information_schema | key_column_usage | table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | key_column_usage | table_name | String | FIELD | | No | String | | -| greptime | information_schema | key_column_usage | table_schema | String | FIELD | | No | String | | -| greptime | information_schema | optimizer_trace | insufficient_privileges | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | optimizer_trace | missing_bytes_beyond_max_mem_size | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | optimizer_trace | query | String | FIELD | | No | String | | -| greptime | information_schema | optimizer_trace | trace | String | FIELD | | No | String | | -| greptime | information_schema | parameters | character_maximum_length | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | parameters | character_octet_length | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | parameters | character_set_name | String | FIELD | | No | String | | -| greptime | information_schema | parameters | collation_name | String | FIELD | | No | String | | -| greptime | information_schema | parameters | data_type | String | FIELD | | No | String | | -| greptime | information_schema | parameters | datetime_precision | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | parameters | dtd_identifier | String | FIELD | | No | String | | -| greptime | information_schema | parameters | numeric_precision | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | parameters | numeric_scale | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | parameters | ordinal_position | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | parameters | parameter_mode | String | FIELD | | No | String | | -| greptime | information_schema | parameters | parameter_name | String | FIELD | | No | String | | -| greptime | information_schema | parameters | routine_type | String | FIELD | | No | String | | -| greptime | information_schema | parameters | specific_catalog | String | FIELD | | No | String | | -| greptime | information_schema | parameters | specific_name | String | FIELD | | No | String | | -| greptime | information_schema | parameters | specific_schema | String | FIELD | | No | String | | -| greptime | information_schema | partitions | avg_row_length | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | check_time | DateTime | FIELD | | Yes | DateTime | | -| greptime | information_schema | partitions | checksum | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | create_time | DateTime | FIELD | | Yes | DateTime | | -| greptime | information_schema | partitions | data_free | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | data_length | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | greptime_partition_id | UInt64 | FIELD | | Yes | UInt64 | | -| greptime | information_schema | partitions | index_length | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | max_data_length | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | nodegroup | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | partition_comment | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | partition_description | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | partition_expression | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | partition_method | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | partition_name | String | FIELD | | No | String | | -| greptime | information_schema | partitions | partition_ordinal_position | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | subpartition_expression | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | subpartition_method | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | subpartition_name | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | subpartition_ordinal_position | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | partitions | table_name | String | FIELD | | No | String | | -| greptime | information_schema | partitions | table_rows | Int64 | FIELD | | Yes | Int64 | | -| greptime | information_schema | partitions | table_schema | String | FIELD | | No | String | | -| greptime | information_schema | partitions | tablespace_name | String | FIELD | | Yes | String | | -| greptime | information_schema | partitions | update_time | DateTime | FIELD | | Yes | DateTime | | -| greptime | information_schema | profiling | block_ops_in | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | block_ops_out | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | context_involuntary | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | context_voluntary | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | cpu_system | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | cpu_user | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | duration | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | messages_received | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | messages_sent | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | page_faults_major | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | page_faults_minor | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | query_id | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | seq | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | source_file | String | FIELD | | No | String | | -| greptime | information_schema | profiling | source_function | String | FIELD | | No | String | | -| greptime | information_schema | profiling | source_line | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | profiling | state | String | FIELD | | No | String | | -| greptime | information_schema | profiling | swaps | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | referential_constraints | constraint_catalog | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | constraint_name | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | constraint_schema | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | delete_rule | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | match_option | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | referenced_table_name | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | table_name | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | unique_constraint_catalog | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | unique_constraint_name | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | unique_constraint_schema | String | FIELD | | No | String | | -| greptime | information_schema | referential_constraints | update_rule | String | FIELD | | No | String | | -| greptime | information_schema | routines | character_maximum_length | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | routines | character_octet_length | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | routines | character_set_client | String | FIELD | | No | String | | -| greptime | information_schema | routines | character_set_name | String | FIELD | | No | String | | -| greptime | information_schema | routines | collation_connection | String | FIELD | | No | String | | -| greptime | information_schema | routines | collation_name | String | FIELD | | No | String | | -| greptime | information_schema | routines | created | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | routines | data_type | String | FIELD | | No | String | | -| greptime | information_schema | routines | database_collation | String | FIELD | | No | String | | -| greptime | information_schema | routines | datetime_precision | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | routines | definer | String | FIELD | | No | String | | -| greptime | information_schema | routines | dtd_identifier | String | FIELD | | No | String | | -| greptime | information_schema | routines | external_language | String | FIELD | | No | String | | -| greptime | information_schema | routines | external_name | String | FIELD | | No | String | | -| greptime | information_schema | routines | is_deterministic | String | FIELD | | No | String | | -| greptime | information_schema | routines | last_altered | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | routines | numeric_precision | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | routines | numeric_scale | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | routines | parameter_style | String | FIELD | | No | String | | -| greptime | information_schema | routines | routine_body | String | FIELD | | No | String | | -| greptime | information_schema | routines | routine_catalog | String | FIELD | | No | String | | -| greptime | information_schema | routines | routine_comment | String | FIELD | | No | String | | -| greptime | information_schema | routines | routine_definition | String | FIELD | | No | String | | -| greptime | information_schema | routines | routine_name | String | FIELD | | No | String | | -| greptime | information_schema | routines | routine_schema | String | FIELD | | No | String | | -| greptime | information_schema | routines | routine_type | String | FIELD | | No | String | | -| greptime | information_schema | routines | security_type | String | FIELD | | No | String | | -| greptime | information_schema | routines | specific_name | String | FIELD | | No | String | | -| greptime | information_schema | routines | sql_data_access | String | FIELD | | No | String | | -| greptime | information_schema | routines | sql_mode | String | FIELD | | No | String | | -| greptime | information_schema | routines | sql_path | String | FIELD | | No | String | | -| greptime | information_schema | runtime_metrics | labels | String | FIELD | | Yes | String | | -| greptime | information_schema | runtime_metrics | metric_name | String | FIELD | | No | String | | -| greptime | information_schema | runtime_metrics | node | String | FIELD | | No | String | | -| greptime | information_schema | runtime_metrics | node_type | String | FIELD | | No | String | | -| greptime | information_schema | runtime_metrics | timestamp | TimestampMillisecond | FIELD | | No | TimestampMillisecond | | -| greptime | information_schema | runtime_metrics | value | Float64 | FIELD | | No | Float64 | | -| greptime | information_schema | schema_privileges | grantee | String | FIELD | | No | String | | -| greptime | information_schema | schema_privileges | is_grantable | String | FIELD | | No | String | | -| greptime | information_schema | schema_privileges | privilege_type | String | FIELD | | No | String | | -| greptime | information_schema | schema_privileges | table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | schema_privileges | table_schema | String | FIELD | | No | String | | -| greptime | information_schema | schemata | catalog_name | String | FIELD | | No | String | | -| greptime | information_schema | schemata | default_character_set_name | String | FIELD | | No | String | | -| greptime | information_schema | schemata | default_collation_name | String | FIELD | | No | String | | -| greptime | information_schema | schemata | schema_name | String | FIELD | | No | String | | -| greptime | information_schema | schemata | sql_path | String | FIELD | | Yes | String | | -| greptime | information_schema | session_status | variable_name | String | FIELD | | No | String | | -| greptime | information_schema | session_status | variable_value | String | FIELD | | No | String | | -| greptime | information_schema | table_privileges | grantee | String | FIELD | | No | String | | -| greptime | information_schema | table_privileges | is_grantable | String | FIELD | | No | String | | -| greptime | information_schema | table_privileges | privilege_type | String | FIELD | | No | String | | -| greptime | information_schema | table_privileges | table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | table_privileges | table_name | String | FIELD | | No | String | | -| greptime | information_schema | table_privileges | table_schema | String | FIELD | | No | String | | -| greptime | information_schema | tables | engine | String | FIELD | | Yes | String | | -| greptime | information_schema | tables | table_catalog | String | FIELD | | No | String | | -| greptime | information_schema | tables | table_id | UInt32 | FIELD | | Yes | UInt32 | | -| greptime | information_schema | tables | table_name | String | FIELD | | No | String | | -| greptime | information_schema | tables | table_schema | String | FIELD | | No | String | | -| greptime | information_schema | tables | table_type | String | FIELD | | No | String | | -| greptime | information_schema | triggers | action_condition | String | FIELD | | No | String | | -| greptime | information_schema | triggers | action_order | Int64 | FIELD | | No | Int64 | | -| greptime | information_schema | triggers | action_orientation | String | FIELD | | No | String | | -| greptime | information_schema | triggers | action_reference_new_row | String | FIELD | | No | String | | -| greptime | information_schema | triggers | action_reference_new_table | String | FIELD | | No | String | | -| greptime | information_schema | triggers | action_reference_old_row | String | FIELD | | No | String | | -| greptime | information_schema | triggers | action_reference_old_table | String | FIELD | | No | String | | -| greptime | information_schema | triggers | action_statement | String | FIELD | | No | String | | -| greptime | information_schema | triggers | action_timing | String | FIELD | | No | String | | -| greptime | information_schema | triggers | character_set_client | String | FIELD | | No | String | | -| greptime | information_schema | triggers | collation_connection | String | FIELD | | No | String | | -| greptime | information_schema | triggers | created | DateTime | FIELD | | No | DateTime | | -| greptime | information_schema | triggers | database_collation | String | FIELD | | No | String | | -| greptime | information_schema | triggers | definer | String | FIELD | | No | String | | -| greptime | information_schema | triggers | event_manipulation | String | FIELD | | No | String | | -| greptime | information_schema | triggers | event_object_catalog | String | FIELD | | No | String | | -| greptime | information_schema | triggers | event_object_schema | String | FIELD | | No | String | | -| greptime | information_schema | triggers | event_object_table | String | FIELD | | No | String | | -| greptime | information_schema | triggers | sql_mode | String | FIELD | | No | String | | -| greptime | information_schema | triggers | trigger_catalog | String | FIELD | | No | String | | -| greptime | information_schema | triggers | trigger_name | String | FIELD | | No | String | | -| greptime | information_schema | triggers | trigger_schema | String | FIELD | | No | String | | -| greptime | public | numbers | number | UInt32 | TAG | | No | UInt32 | | -+---------------+--------------------+---------------------------------------+-----------------------------------+----------------------+---------------+----------------+-------------+----------------------+----------------+ ++---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+ +| table_catalog | table_schema | table_name | column_name | ordinal_position | character_maximum_length | character_octet_length | numeric_precision | numeric_scale | datetime_precision | character_set_name | collation_name | column_key | extra | privileges | generation_expression | greptime_data_type | data_type | semantic_type | column_default | is_nullable | column_type | column_comment | ++---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+ +| greptime | information_schema | build_info | git_branch | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | build_info | git_commit | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | build_info | git_commit_short | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | build_info | git_dirty | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | build_info | pkg_version | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | character_sets | character_set_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | character_sets | default_collate_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | character_sets | description | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | character_sets | maxlen | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | check_constraints | check_clause | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | check_constraints | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | check_constraints | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | check_constraints | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | collation_character_set_applicability | character_set_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | collation_character_set_applicability | collation_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | collations | character_set_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | collations | collation_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | collations | id | 3 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | collations | is_compiled | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | collations | is_default | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | collations | sortlen | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | column_privileges | column_name | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_privileges | is_grantable | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_privileges | privilege_type | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_privileges | table_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_statistics | column_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_statistics | histogram | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_statistics | schema_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | column_statistics | table_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | character_maximum_length | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | columns | character_octet_length | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | columns | character_set_name | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | columns | collation_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | columns | column_comment | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | columns | column_default | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | columns | column_key | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | column_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | column_type | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | data_type | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | datetime_precision | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | columns | extra | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | generation_expression | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | greptime_data_type | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | is_nullable | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | numeric_precision | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | columns | numeric_scale | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | columns | ordinal_position | 5 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | columns | privileges | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | semantic_type | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | columns | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | engines | comment | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | engines | engine | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | engines | savepoints | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | engines | support | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | engines | transactions | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | engines | xa | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | character_set_client | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | collation_connection | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | created | 17 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | events | database_collation | 24 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | definer | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | ends | 14 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | events | event_body | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | event_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | event_comment | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | event_definition | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | event_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | event_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | event_type | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | execute_at | 9 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | events | interval_field | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | interval_value | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | events | last_altered | 18 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | events | last_executed | 19 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | events | on_completion | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | originator | 21 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | events | sql_mode | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | starts | 13 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | events | status | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | events | time_zone | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | autoextend_size | 19 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | avg_row_length | 28 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | check_time | 35 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | files | checksum | 36 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | create_time | 33 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | files | creation_time | 20 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | files | data_free | 32 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | data_length | 29 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | deleted_rows | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | engine | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | extent_size | 16 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | extra | 38 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | file_id | 1 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | file_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | file_type | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | free_extents | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | fulltext_keys | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | index_length | 31 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | initial_size | 17 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | last_access_time | 22 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | files | last_update_time | 21 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | files | logfile_group_name | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | logfile_group_number | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | max_data_length | 30 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | maximum_size | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | recover_time | 23 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | files | row_format | 26 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | status | 37 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | table_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | table_name | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | table_rows | 27 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | table_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | tablespace_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | files | total_extents | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | transaction_counter | 24 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | update_count | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | files | update_time | 34 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | files | version | 25 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | global_status | variable_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | global_status | variable_value | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | greptime_region_peers | down_seconds | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | greptime_region_peers | is_leader | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | greptime_region_peers | peer_addr | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | greptime_region_peers | peer_id | 2 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | Yes | bigint unsigned | | +| greptime | information_schema | greptime_region_peers | region_id | 1 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | No | bigint unsigned | | +| greptime | information_schema | greptime_region_peers | status | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | key_column_usage | column_name | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | key_column_usage | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | key_column_usage | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | key_column_usage | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | key_column_usage | ordinal_position | 9 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | No | int unsigned | | +| greptime | information_schema | key_column_usage | position_in_unique_constraint | 10 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | Yes | int unsigned | | +| greptime | information_schema | key_column_usage | real_table_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | key_column_usage | referenced_column_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | key_column_usage | referenced_table_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | key_column_usage | referenced_table_schema | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | key_column_usage | table_catalog | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | key_column_usage | table_name | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | key_column_usage | table_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | optimizer_trace | insufficient_privileges | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | optimizer_trace | missing_bytes_beyond_max_mem_size | 3 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | optimizer_trace | query | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | optimizer_trace | trace | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | character_maximum_length | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | parameters | character_octet_length | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | parameters | character_set_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | collation_name | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | data_type | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | datetime_precision | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | parameters | dtd_identifier | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | numeric_precision | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | parameters | numeric_scale | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | parameters | ordinal_position | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | parameters | parameter_mode | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | parameter_name | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | routine_type | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | specific_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | specific_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | parameters | specific_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | partitions | avg_row_length | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | check_time | 21 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | +| greptime | information_schema | partitions | checksum | 22 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | create_time | 19 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | +| greptime | information_schema | partitions | data_free | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | data_length | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | greptime_partition_id | 26 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | Yes | bigint unsigned | | +| greptime | information_schema | partitions | index_length | 17 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | max_data_length | 16 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | nodegroup | 24 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | partition_comment | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | partition_description | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | partition_expression | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | partition_method | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | partition_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | partitions | partition_ordinal_position | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | subpartition_expression | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | subpartition_method | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | subpartition_name | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | subpartition_ordinal_position | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | partitions | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | partitions | table_rows | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | +| greptime | information_schema | partitions | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | partitions | tablespace_name | 25 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | partitions | update_time | 20 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | +| greptime | information_schema | profiling | block_ops_in | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | block_ops_out | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | context_involuntary | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | context_voluntary | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | cpu_system | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | cpu_user | 5 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | duration | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | messages_received | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | messages_sent | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | page_faults_major | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | page_faults_minor | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | query_id | 1 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | seq | 2 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | source_file | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | profiling | source_function | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | profiling | source_line | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | profiling | state | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | profiling | swaps | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | referential_constraints | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | delete_rule | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | match_option | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | referenced_table_name | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | table_name | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | unique_constraint_catalog | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | unique_constraint_name | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | unique_constraint_schema | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | referential_constraints | update_rule | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | character_maximum_length | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | routines | character_octet_length | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | routines | character_set_client | 29 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | character_set_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | collation_connection | 30 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | collation_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | created | 24 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | routines | data_type | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | database_collation | 31 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | datetime_precision | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | routines | definer | 28 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | dtd_identifier | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | external_language | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | external_name | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | is_deterministic | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | last_altered | 25 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | routines | numeric_precision | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | routines | numeric_scale | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | routines | parameter_style | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | routine_body | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | routine_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | routine_comment | 27 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | routine_definition | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | routine_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | routine_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | routine_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | security_type | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | specific_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | sql_data_access | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | sql_mode | 26 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | routines | sql_path | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | runtime_metrics | labels | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | runtime_metrics | metric_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | runtime_metrics | node | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | runtime_metrics | node_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | runtime_metrics | timestamp | 6 | | | | | 3 | | | | | select,insert | | TimestampMillisecond | timestamp(3) | FIELD | | No | timestamp(3) | | +| greptime | information_schema | runtime_metrics | value | 2 | | | 22 | | | | | | | select,insert | | Float64 | double | FIELD | | No | double | | +| greptime | information_schema | schema_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schema_privileges | is_grantable | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schema_privileges | privilege_type | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schema_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schema_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schemata | catalog_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schemata | default_character_set_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schemata | default_collation_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schemata | schema_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | schemata | sql_path | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | session_status | variable_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | session_status | variable_value | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | table_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | table_privileges | is_grantable | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | table_privileges | privilege_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | table_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | table_privileges | table_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | table_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | tables | engine | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | +| greptime | information_schema | tables | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | tables | table_id | 5 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | Yes | int unsigned | | +| greptime | information_schema | tables | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | tables | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | tables | table_type | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | action_condition | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | action_order | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | +| greptime | information_schema | triggers | action_orientation | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | action_reference_new_row | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | action_reference_new_table | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | action_reference_old_row | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | action_reference_old_table | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | action_statement | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | action_timing | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | character_set_client | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | collation_connection | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | created | 17 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | +| greptime | information_schema | triggers | database_collation | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | definer | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | event_manipulation | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | event_object_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | event_object_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | event_object_table | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | sql_mode | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | trigger_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | trigger_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | information_schema | triggers | trigger_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | +| greptime | public | numbers | number | 1 | | | 10 | 0 | | | | PRI | | select,insert | | UInt32 | int unsigned | TAG | | No | int unsigned | | ++---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+ create database my_db; @@ -420,11 +433,11 @@ where table_catalog = 'greptime' and table_schema != 'information_schema' order by table_schema, table_name, column_name; -+---------------+--------------+------------+-------------+----------------------+---------------+ -| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | -+---------------+--------------+------------+-------------+----------------------+---------------+ -| greptime | my_db | foo | ts | TimestampMillisecond | TIMESTAMP | -+---------------+--------------+------------+-------------+----------------------+---------------+ ++---------------+--------------+------------+-------------+--------------+---------------+ +| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | ++---------------+--------------+------------+-------------+--------------+---------------+ +| greptime | my_db | foo | ts | timestamp(3) | TIMESTAMP | ++---------------+--------------+------------+-------------+--------------+---------------+ -- test query filter for columns -- select table_catalog, table_schema, table_name, column_name, data_type, semantic_type @@ -435,12 +448,12 @@ where table_catalog = 'greptime' table_schema == 'my_db') order by table_schema, table_name, column_name; -+---------------+--------------+------------+-------------+----------------------+---------------+ -| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | -+---------------+--------------+------------+-------------+----------------------+---------------+ -| greptime | my_db | foo | ts | TimestampMillisecond | TIMESTAMP | -| greptime | public | numbers | number | UInt32 | TAG | -+---------------+--------------+------------+-------------+----------------------+---------------+ ++---------------+--------------+------------+-------------+--------------+---------------+ +| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | ++---------------+--------------+------------+-------------+--------------+---------------+ +| greptime | my_db | foo | ts | timestamp(3) | TIMESTAMP | +| greptime | public | numbers | number | int unsigned | TAG | ++---------------+--------------+------------+-------------+--------------+---------------+ use public; @@ -682,20 +695,33 @@ Affected Rows: 0 DESC COLUMNS; -+----------------+--------+-----+------+---------+---------------+ -| Column | Type | Key | Null | Default | Semantic Type | -+----------------+--------+-----+------+---------+---------------+ -| table_catalog | String | | NO | | FIELD | -| table_schema | String | | NO | | FIELD | -| table_name | String | | NO | | FIELD | -| column_name | String | | NO | | FIELD | -| data_type | String | | NO | | FIELD | -| semantic_type | String | | NO | | FIELD | -| column_default | String | | YES | | FIELD | -| is_nullable | String | | NO | | FIELD | -| column_type | String | | NO | | FIELD | -| column_comment | String | | YES | | FIELD | -+----------------+--------+-----+------+---------+---------------+ ++--------------------------+--------+-----+------+---------+---------------+ +| Column | Type | Key | Null | Default | Semantic Type | ++--------------------------+--------+-----+------+---------+---------------+ +| table_catalog | String | | NO | | FIELD | +| table_schema | String | | NO | | FIELD | +| table_name | String | | NO | | FIELD | +| column_name | String | | NO | | FIELD | +| ordinal_position | Int64 | | NO | | FIELD | +| character_maximum_length | Int64 | | YES | | FIELD | +| character_octet_length | Int64 | | YES | | FIELD | +| numeric_precision | Int64 | | YES | | FIELD | +| numeric_scale | Int64 | | YES | | FIELD | +| datetime_precision | Int64 | | YES | | FIELD | +| character_set_name | String | | YES | | FIELD | +| collation_name | String | | YES | | FIELD | +| column_key | String | | NO | | FIELD | +| extra | String | | NO | | FIELD | +| privileges | String | | NO | | FIELD | +| generation_expression | String | | NO | | FIELD | +| greptime_data_type | String | | NO | | FIELD | +| data_type | String | | NO | | FIELD | +| semantic_type | String | | NO | | FIELD | +| column_default | String | | YES | | FIELD | +| is_nullable | String | | NO | | FIELD | +| column_type | String | | NO | | FIELD | +| column_comment | String | | YES | | FIELD | ++--------------------------+--------+-----+------+---------+---------------+ drop table my_db.foo; From 5a39ee0a3b96d74042069a76b355de3766026728 Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Thu, 4 Apr 2024 11:59:19 +0800 Subject: [PATCH 02/12] fix: test_information_schema_dot_columns --- tests-integration/src/tests/instance_test.rs | 110 ++++++++++++------- 1 file changed, 68 insertions(+), 42 deletions(-) diff --git a/tests-integration/src/tests/instance_test.rs b/tests-integration/src/tests/instance_test.rs index 0c8aeaf09b99..f88c95cd3501 100644 --- a/tests-integration/src/tests/instance_test.rs +++ b/tests-integration/src/tests/instance_test.rs @@ -1901,53 +1901,79 @@ async fn test_information_schema_dot_columns(instance: Arc) { let output = execute_sql(&instance, sql).await.data; let expected = "\ -+---------------+--------------------+------------+----------------+-----------+---------------+ -| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | -+---------------+--------------------+------------+----------------+-----------+---------------+ -| greptime | information_schema | columns | table_catalog | String | FIELD | -| greptime | information_schema | columns | table_schema | String | FIELD | -| greptime | information_schema | columns | table_name | String | FIELD | -| greptime | information_schema | columns | column_name | String | FIELD | -| greptime | information_schema | columns | data_type | String | FIELD | -| greptime | information_schema | columns | semantic_type | String | FIELD | -| greptime | information_schema | columns | column_default | String | FIELD | -| greptime | information_schema | columns | is_nullable | String | FIELD | -| greptime | information_schema | columns | column_type | String | FIELD | -| greptime | information_schema | columns | column_comment | String | FIELD | -| greptime | public | numbers | number | UInt32 | TAG | -| greptime | information_schema | tables | table_catalog | String | FIELD | -| greptime | information_schema | tables | table_schema | String | FIELD | -| greptime | information_schema | tables | table_name | String | FIELD | -| greptime | information_schema | tables | table_type | String | FIELD | -| greptime | information_schema | tables | table_id | UInt32 | FIELD | -| greptime | information_schema | tables | engine | String | FIELD | -+---------------+--------------------+------------+----------------+-----------+---------------+"; ++---------------+--------------------+------------+--------------------------+--------------+---------------+ +| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | ++---------------+--------------------+------------+--------------------------+--------------+---------------+ +| greptime | information_schema | columns | numeric_scale | bigint | FIELD | +| greptime | information_schema | columns | privileges | string | FIELD | +| greptime | information_schema | columns | column_comment | string | FIELD | +| greptime | information_schema | columns | column_type | string | FIELD | +| greptime | information_schema | columns | is_nullable | string | FIELD | +| greptime | information_schema | columns | column_default | string | FIELD | +| greptime | information_schema | columns | table_catalog | string | FIELD | +| greptime | information_schema | columns | table_schema | string | FIELD | +| greptime | information_schema | columns | table_name | string | FIELD | +| greptime | information_schema | columns | column_name | string | FIELD | +| greptime | information_schema | columns | ordinal_position | bigint | FIELD | +| greptime | information_schema | columns | character_maximum_length | bigint | FIELD | +| greptime | information_schema | columns | character_octet_length | bigint | FIELD | +| greptime | information_schema | columns | numeric_precision | bigint | FIELD | +| greptime | information_schema | columns | semantic_type | string | FIELD | +| greptime | information_schema | columns | data_type | string | FIELD | +| greptime | information_schema | columns | greptime_data_type | string | FIELD | +| greptime | information_schema | columns | collation_name | string | FIELD | +| greptime | information_schema | columns | column_key | string | FIELD | +| greptime | information_schema | columns | extra | string | FIELD | +| greptime | information_schema | columns | datetime_precision | bigint | FIELD | +| greptime | information_schema | columns | generation_expression | string | FIELD | +| greptime | information_schema | columns | character_set_name | string | FIELD | +| greptime | public | numbers | number | int unsigned | TAG | +| greptime | information_schema | tables | table_catalog | string | FIELD | +| greptime | information_schema | tables | table_schema | string | FIELD | +| greptime | information_schema | tables | engine | string | FIELD | +| greptime | information_schema | tables | table_id | int unsigned | FIELD | +| greptime | information_schema | tables | table_type | string | FIELD | +| greptime | information_schema | tables | table_name | string | FIELD | ++---------------+--------------------+------------+--------------------------+--------------+---------------+"; check_output_stream(output, expected).await; let output = execute_sql_with(&instance, sql, query_ctx).await.data; let expected = "\ -+-----------------+--------------------+---------------+----------------+----------------------+---------------+ -| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | -+-----------------+--------------------+---------------+----------------+----------------------+---------------+ -| another_catalog | another_schema | another_table | i | TimestampMillisecond | TIMESTAMP | -| another_catalog | information_schema | columns | table_catalog | String | FIELD | -| another_catalog | information_schema | columns | table_schema | String | FIELD | -| another_catalog | information_schema | columns | table_name | String | FIELD | -| another_catalog | information_schema | columns | column_name | String | FIELD | -| another_catalog | information_schema | columns | data_type | String | FIELD | -| another_catalog | information_schema | columns | semantic_type | String | FIELD | -| another_catalog | information_schema | columns | column_default | String | FIELD | -| another_catalog | information_schema | columns | is_nullable | String | FIELD | -| another_catalog | information_schema | columns | column_type | String | FIELD | -| another_catalog | information_schema | columns | column_comment | String | FIELD | -| another_catalog | information_schema | tables | table_catalog | String | FIELD | -| another_catalog | information_schema | tables | table_schema | String | FIELD | -| another_catalog | information_schema | tables | table_name | String | FIELD | -| another_catalog | information_schema | tables | table_type | String | FIELD | -| another_catalog | information_schema | tables | table_id | UInt32 | FIELD | -| another_catalog | information_schema | tables | engine | String | FIELD | -+-----------------+--------------------+---------------+----------------+----------------------+---------------+"; ++-----------------+--------------------+---------------+--------------------------+--------------+---------------+ +| table_catalog | table_schema | table_name | column_name | data_type | semantic_type | ++-----------------+--------------------+---------------+--------------------------+--------------+---------------+ +| another_catalog | another_schema | another_table | i | timestamp(3) | TIMESTAMP | +| another_catalog | information_schema | columns | numeric_precision | bigint | FIELD | +| another_catalog | information_schema | columns | extra | string | FIELD | +| another_catalog | information_schema | columns | column_comment | string | FIELD | +| another_catalog | information_schema | columns | column_type | string | FIELD | +| another_catalog | information_schema | columns | is_nullable | string | FIELD | +| another_catalog | information_schema | columns | column_default | string | FIELD | +| another_catalog | information_schema | columns | table_catalog | string | FIELD | +| another_catalog | information_schema | columns | table_schema | string | FIELD | +| another_catalog | information_schema | columns | table_name | string | FIELD | +| another_catalog | information_schema | columns | column_name | string | FIELD | +| another_catalog | information_schema | columns | ordinal_position | bigint | FIELD | +| another_catalog | information_schema | columns | character_maximum_length | bigint | FIELD | +| another_catalog | information_schema | columns | character_octet_length | bigint | FIELD | +| another_catalog | information_schema | columns | semantic_type | string | FIELD | +| another_catalog | information_schema | columns | data_type | string | FIELD | +| another_catalog | information_schema | columns | character_set_name | string | FIELD | +| another_catalog | information_schema | columns | numeric_scale | bigint | FIELD | +| another_catalog | information_schema | columns | collation_name | string | FIELD | +| another_catalog | information_schema | columns | column_key | string | FIELD | +| another_catalog | information_schema | columns | datetime_precision | bigint | FIELD | +| another_catalog | information_schema | columns | privileges | string | FIELD | +| another_catalog | information_schema | columns | generation_expression | string | FIELD | +| another_catalog | information_schema | columns | greptime_data_type | string | FIELD | +| another_catalog | information_schema | tables | table_schema | string | FIELD | +| another_catalog | information_schema | tables | table_catalog | string | FIELD | +| another_catalog | information_schema | tables | engine | string | FIELD | +| another_catalog | information_schema | tables | table_id | int unsigned | FIELD | +| another_catalog | information_schema | tables | table_type | string | FIELD | +| another_catalog | information_schema | tables | table_name | string | FIELD | ++-----------------+--------------------+---------------+--------------------------+--------------+---------------+"; check_output_stream(output, expected).await; } From fcc58930612b8bdbe2e7e271298d2e756e788bf4 Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Thu, 4 Apr 2024 12:15:46 +0800 Subject: [PATCH 03/12] fix: fuzz test --- tests-fuzz/src/validator/column.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests-fuzz/src/validator/column.rs b/tests-fuzz/src/validator/column.rs index 0736bbb48da4..349057817bf8 100644 --- a/tests-fuzz/src/validator/column.rs +++ b/tests-fuzz/src/validator/column.rs @@ -211,7 +211,7 @@ where for<'c> String: Encode<'c, DB> + Type, for<'c> &'c str: ColumnIndex<::Row>, { - let sql = "SELECT * FROM information_schema.columns WHERE table_schema = ? AND table_name = ?"; + let sql = "SELECT table_schema, table_name, column_name, greptime_data_type as data_type, semantic_type, column_default, is_nullable FROM information_schema.columns WHERE table_schema = ? AND table_name = ?"; sqlx::query_as::<_, ColumnEntry>(sql) .bind(schema_name.value.to_string()) .bind(table_name.value.to_string()) From 4fccdf0d86ce423593e991c22007965274d23e6a Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Sat, 6 Apr 2024 09:43:19 +0800 Subject: [PATCH 04/12] feat: adds srs_id and refactor some columns with constant vector --- src/catalog/src/information_schema/columns.rs | 85 +-- src/datatypes/src/data_type.rs | 32 + .../common/system/information_schema.result | 616 +++++++++--------- 3 files changed, 375 insertions(+), 358 deletions(-) diff --git a/src/catalog/src/information_schema/columns.rs b/src/catalog/src/information_schema/columns.rs index 90229decafcd..ef355585733d 100644 --- a/src/catalog/src/information_schema/columns.rs +++ b/src/catalog/src/information_schema/columns.rs @@ -26,11 +26,13 @@ use common_recordbatch::{RecordBatch, SendableRecordBatchStream}; use datafusion::physical_plan::stream::RecordBatchStreamAdapter as DfRecordBatchStreamAdapter; use datafusion::physical_plan::streaming::PartitionStream as DfPartitionStream; use datafusion::physical_plan::SendableRecordBatchStream as DfSendableRecordBatchStream; -use datatypes::prelude::{ConcreteDataType, DataType}; +use datatypes::prelude::{ConcreteDataType, DataType, MutableVector}; use datatypes::scalars::ScalarVectorBuilder; use datatypes::schema::{ColumnSchema, Schema, SchemaRef}; use datatypes::value::Value; -use datatypes::vectors::{Int64VectorBuilder, StringVectorBuilder, VectorRef}; +use datatypes::vectors::{ + ConstantVector, Int64Vector, Int64VectorBuilder, StringVector, StringVectorBuilder, VectorRef, +}; use futures::TryStreamExt; use snafu::{OptionExt, ResultExt}; use sql::statements; @@ -73,6 +75,7 @@ pub const COLUMN_DEFAULT: &str = "column_default"; pub const IS_NULLABLE: &str = "is_nullable"; const COLUMN_TYPE: &str = "column_type"; pub const COLUMN_COMMENT: &str = "column_comment"; +const SRS_ID: &str = "srs_id"; const INIT_CAPACITY: usize = 42; // The maximum length of string type @@ -138,6 +141,7 @@ impl InformationSchemaColumns { ColumnSchema::new(IS_NULLABLE, ConcreteDataType::string_datatype(), false), ColumnSchema::new(COLUMN_TYPE, ConcreteDataType::string_datatype(), false), ColumnSchema::new(COLUMN_COMMENT, ConcreteDataType::string_datatype(), true), + ColumnSchema::new(SRS_ID, ConcreteDataType::int64_datatype(), true), ])) } @@ -202,9 +206,6 @@ struct InformationSchemaColumnsBuilder { character_set_names: StringVectorBuilder, collation_names: StringVectorBuilder, column_keys: StringVectorBuilder, - extras: StringVectorBuilder, - privileges: StringVectorBuilder, - generation_expressions: StringVectorBuilder, greptime_data_types: StringVectorBuilder, data_types: StringVectorBuilder, semantic_types: StringVectorBuilder, @@ -237,9 +238,6 @@ impl InformationSchemaColumnsBuilder { character_set_names: StringVectorBuilder::with_capacity(INIT_CAPACITY), collation_names: StringVectorBuilder::with_capacity(INIT_CAPACITY), column_keys: StringVectorBuilder::with_capacity(INIT_CAPACITY), - extras: StringVectorBuilder::with_capacity(INIT_CAPACITY), - privileges: StringVectorBuilder::with_capacity(INIT_CAPACITY), - generation_expressions: StringVectorBuilder::with_capacity(INIT_CAPACITY), greptime_data_types: StringVectorBuilder::with_capacity(INIT_CAPACITY), data_types: StringVectorBuilder::with_capacity(INIT_CAPACITY), semantic_types: StringVectorBuilder::with_capacity(INIT_CAPACITY), @@ -332,7 +330,7 @@ impl InformationSchemaColumnsBuilder { self.schema_names.push(Some(schema_name)); self.table_names.push(Some(table_name)); self.column_names.push(Some(&column_schema.name)); - + // Starts from 1 self.ordinal_positions.push(Some((index + 1) as i64)); if column_schema.data_type.is_string() { @@ -347,42 +345,14 @@ impl InformationSchemaColumnsBuilder { self.character_maximum_lengths.push(None); self.character_octet_lengths.push(None); - match &column_schema.data_type { - ConcreteDataType::Int8(_) | ConcreteDataType::UInt8(_) => { - self.numeric_precisions.push(Some(3)); - self.numeric_scales.push(Some(0)); - } - ConcreteDataType::Int16(_) | ConcreteDataType::UInt16(_) => { - self.numeric_precisions.push(Some(5)); - self.numeric_scales.push(Some(0)); - } - ConcreteDataType::Int32(_) | ConcreteDataType::UInt32(_) => { - self.numeric_precisions.push(Some(10)); - self.numeric_scales.push(Some(0)); - } - ConcreteDataType::Int64(_) => { - self.numeric_precisions.push(Some(19)); - self.numeric_scales.push(Some(0)); - } - ConcreteDataType::UInt64(_) => { - self.numeric_precisions.push(Some(20)); - self.numeric_scales.push(Some(0)); - } - ConcreteDataType::Float32(_) => { - self.numeric_precisions.push(Some(12)); - self.numeric_scales.push(None); - } - ConcreteDataType::Float64(_) => { - self.numeric_precisions.push(Some(22)); - self.numeric_scales.push(None); - } - ConcreteDataType::Decimal128(decimal_type) => { - self.numeric_precisions - .push(Some(decimal_type.precision() as i64)); - self.numeric_scales.push(Some(decimal_type.scale() as i64)); - } - _ => unreachable!(), - } + self.numeric_precisions.push( + column_schema + .data_type + .numeric_precision() + .map(|x| x as i64), + ); + self.numeric_scales + .push(column_schema.data_type.numeric_scale().map(|x| x as i64)); self.datetime_precisions.push(None); self.character_set_names.push(None); @@ -414,9 +384,6 @@ impl InformationSchemaColumnsBuilder { } self.column_keys.push(Some(column_key)); - self.extras.push(Some(EMPTY_STR)); - self.privileges.push(Some(DEFAULT_PRIVILEGES)); - self.generation_expressions.push(Some(EMPTY_STR)); self.greptime_data_types .push(Some(&column_schema.data_type.name())); self.data_types.push(Some(&data_type)); @@ -438,6 +405,21 @@ impl InformationSchemaColumnsBuilder { } fn finish(&mut self) -> Result { + let rows_num = self.collation_names.len(); + + let privileges = Arc::new(ConstantVector::new( + Arc::new(StringVector::from(vec![DEFAULT_PRIVILEGES])), + rows_num, + )); + let empty_string = Arc::new(ConstantVector::new( + Arc::new(StringVector::from(vec![EMPTY_STR])), + rows_num, + )); + let srs_ids = Arc::new(ConstantVector::new( + Arc::new(Int64Vector::from(vec![None])), + rows_num, + )); + let columns: Vec = vec![ Arc::new(self.catalog_names.finish()), Arc::new(self.schema_names.finish()), @@ -452,9 +434,9 @@ impl InformationSchemaColumnsBuilder { Arc::new(self.character_set_names.finish()), Arc::new(self.collation_names.finish()), Arc::new(self.column_keys.finish()), - Arc::new(self.extras.finish()), - Arc::new(self.privileges.finish()), - Arc::new(self.generation_expressions.finish()), + empty_string.clone(), + privileges, + empty_string, Arc::new(self.greptime_data_types.finish()), Arc::new(self.data_types.finish()), Arc::new(self.semantic_types.finish()), @@ -462,6 +444,7 @@ impl InformationSchemaColumnsBuilder { Arc::new(self.is_nullables.finish()), Arc::new(self.column_types.finish()), Arc::new(self.column_comments.finish()), + srs_ids, ]; RecordBatch::new(self.schema.clone(), columns).context(CreateRecordBatchSnafu) diff --git a/src/datatypes/src/data_type.rs b/src/datatypes/src/data_type.rs index 6f715755e7d5..2214b0ec6c33 100644 --- a/src/datatypes/src/data_type.rs +++ b/src/datatypes/src/data_type.rs @@ -266,6 +266,38 @@ impl ConcreteDataType { } } + /// Try to get numeric precision, returns `None` if it's not numeric type + pub fn numeric_precision(&self) -> Option { + match self { + ConcreteDataType::Int8(_) | ConcreteDataType::UInt8(_) => Some(3), + ConcreteDataType::Int16(_) | ConcreteDataType::UInt16(_) => Some(5), + ConcreteDataType::Int32(_) | ConcreteDataType::UInt32(_) => Some(10), + ConcreteDataType::Int64(_) => Some(19), + ConcreteDataType::UInt64(_) => Some(20), + ConcreteDataType::Float32(_) => Some(12), + ConcreteDataType::Float64(_) => Some(22), + ConcreteDataType::Decimal128(decimal_type) => Some(decimal_type.precision()), + _ => None, + } + } + + /// Try to get numeric scale, returns `None` if it's not numeric type + pub fn numeric_scale(&self) -> Option { + match self { + ConcreteDataType::Int8(_) + | ConcreteDataType::UInt8(_) + | ConcreteDataType::Int16(_) + | ConcreteDataType::UInt16(_) + | ConcreteDataType::Int32(_) + | ConcreteDataType::UInt32(_) + | ConcreteDataType::Int64(_) + | ConcreteDataType::UInt64(_) => Some(0), + ConcreteDataType::Float32(_) | ConcreteDataType::Float64(_) => None, + ConcreteDataType::Decimal128(decimal_type) => Some(decimal_type.scale()), + _ => None, + } + } + /// Try to cast data type as a [`TimeType`]. pub fn as_time(&self) -> Option { match self { diff --git a/tests/cases/standalone/common/system/information_schema.result b/tests/cases/standalone/common/system/information_schema.result index f22e9d6525ab..30914c39eeb7 100644 --- a/tests/cases/standalone/common/system/information_schema.result +++ b/tests/cases/standalone/common/system/information_schema.result @@ -44,313 +44,314 @@ order by table_schema, table_name; select * from information_schema.columns order by table_schema, table_name, column_name; -+---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+ -| table_catalog | table_schema | table_name | column_name | ordinal_position | character_maximum_length | character_octet_length | numeric_precision | numeric_scale | datetime_precision | character_set_name | collation_name | column_key | extra | privileges | generation_expression | greptime_data_type | data_type | semantic_type | column_default | is_nullable | column_type | column_comment | -+---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+ -| greptime | information_schema | build_info | git_branch | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | build_info | git_commit | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | build_info | git_commit_short | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | build_info | git_dirty | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | build_info | pkg_version | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | character_sets | character_set_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | character_sets | default_collate_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | character_sets | description | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | character_sets | maxlen | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | check_constraints | check_clause | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | check_constraints | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | check_constraints | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | check_constraints | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | collation_character_set_applicability | character_set_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | collation_character_set_applicability | collation_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | collations | character_set_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | collations | collation_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | collations | id | 3 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | collations | is_compiled | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | collations | is_default | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | collations | sortlen | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | column_privileges | column_name | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_privileges | is_grantable | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_privileges | privilege_type | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_privileges | table_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_statistics | column_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_statistics | histogram | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_statistics | schema_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | column_statistics | table_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | character_maximum_length | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | columns | character_octet_length | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | columns | character_set_name | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | columns | collation_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | columns | column_comment | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | columns | column_default | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | columns | column_key | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | column_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | column_type | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | data_type | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | datetime_precision | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | columns | extra | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | generation_expression | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | greptime_data_type | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | is_nullable | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | numeric_precision | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | columns | numeric_scale | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | columns | ordinal_position | 5 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | columns | privileges | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | semantic_type | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | columns | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | engines | comment | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | engines | engine | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | engines | savepoints | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | engines | support | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | engines | transactions | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | engines | xa | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | character_set_client | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | collation_connection | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | created | 17 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | events | database_collation | 24 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | definer | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | ends | 14 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | events | event_body | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | event_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | event_comment | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | event_definition | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | event_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | event_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | event_type | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | execute_at | 9 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | events | interval_field | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | interval_value | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | events | last_altered | 18 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | events | last_executed | 19 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | events | on_completion | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | originator | 21 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | events | sql_mode | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | starts | 13 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | events | status | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | events | time_zone | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | autoextend_size | 19 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | avg_row_length | 28 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | check_time | 35 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | files | checksum | 36 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | create_time | 33 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | files | creation_time | 20 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | files | data_free | 32 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | data_length | 29 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | deleted_rows | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | engine | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | extent_size | 16 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | extra | 38 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | file_id | 1 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | file_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | file_type | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | free_extents | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | fulltext_keys | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | index_length | 31 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | initial_size | 17 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | last_access_time | 22 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | files | last_update_time | 21 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | files | logfile_group_name | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | logfile_group_number | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | max_data_length | 30 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | maximum_size | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | recover_time | 23 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | files | row_format | 26 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | status | 37 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | table_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | table_name | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | table_rows | 27 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | table_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | tablespace_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | files | total_extents | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | transaction_counter | 24 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | update_count | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | files | update_time | 34 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | files | version | 25 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | global_status | variable_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | global_status | variable_value | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | greptime_region_peers | down_seconds | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | greptime_region_peers | is_leader | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | greptime_region_peers | peer_addr | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | greptime_region_peers | peer_id | 2 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | Yes | bigint unsigned | | -| greptime | information_schema | greptime_region_peers | region_id | 1 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | No | bigint unsigned | | -| greptime | information_schema | greptime_region_peers | status | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | key_column_usage | column_name | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | key_column_usage | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | key_column_usage | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | key_column_usage | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | key_column_usage | ordinal_position | 9 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | No | int unsigned | | -| greptime | information_schema | key_column_usage | position_in_unique_constraint | 10 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | Yes | int unsigned | | -| greptime | information_schema | key_column_usage | real_table_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | key_column_usage | referenced_column_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | key_column_usage | referenced_table_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | key_column_usage | referenced_table_schema | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | key_column_usage | table_catalog | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | key_column_usage | table_name | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | key_column_usage | table_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | optimizer_trace | insufficient_privileges | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | optimizer_trace | missing_bytes_beyond_max_mem_size | 3 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | optimizer_trace | query | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | optimizer_trace | trace | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | character_maximum_length | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | parameters | character_octet_length | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | parameters | character_set_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | collation_name | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | data_type | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | datetime_precision | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | parameters | dtd_identifier | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | numeric_precision | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | parameters | numeric_scale | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | parameters | ordinal_position | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | parameters | parameter_mode | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | parameter_name | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | routine_type | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | specific_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | specific_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | parameters | specific_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | partitions | avg_row_length | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | check_time | 21 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | -| greptime | information_schema | partitions | checksum | 22 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | create_time | 19 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | -| greptime | information_schema | partitions | data_free | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | data_length | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | greptime_partition_id | 26 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | Yes | bigint unsigned | | -| greptime | information_schema | partitions | index_length | 17 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | max_data_length | 16 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | nodegroup | 24 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | partition_comment | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | partition_description | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | partition_expression | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | partition_method | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | partition_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | partitions | partition_ordinal_position | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | subpartition_expression | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | subpartition_method | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | subpartition_name | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | subpartition_ordinal_position | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | partitions | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | partitions | table_rows | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | -| greptime | information_schema | partitions | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | partitions | tablespace_name | 25 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | partitions | update_time | 20 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | -| greptime | information_schema | profiling | block_ops_in | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | block_ops_out | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | context_involuntary | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | context_voluntary | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | cpu_system | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | cpu_user | 5 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | duration | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | messages_received | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | messages_sent | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | page_faults_major | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | page_faults_minor | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | query_id | 1 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | seq | 2 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | source_file | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | profiling | source_function | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | profiling | source_line | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | profiling | state | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | profiling | swaps | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | referential_constraints | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | delete_rule | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | match_option | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | referenced_table_name | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | table_name | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | unique_constraint_catalog | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | unique_constraint_name | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | unique_constraint_schema | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | referential_constraints | update_rule | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | character_maximum_length | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | routines | character_octet_length | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | routines | character_set_client | 29 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | character_set_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | collation_connection | 30 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | collation_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | created | 24 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | routines | data_type | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | database_collation | 31 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | datetime_precision | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | routines | definer | 28 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | dtd_identifier | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | external_language | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | external_name | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | is_deterministic | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | last_altered | 25 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | routines | numeric_precision | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | routines | numeric_scale | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | routines | parameter_style | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | routine_body | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | routine_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | routine_comment | 27 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | routine_definition | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | routine_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | routine_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | routine_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | security_type | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | specific_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | sql_data_access | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | sql_mode | 26 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | routines | sql_path | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | runtime_metrics | labels | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | runtime_metrics | metric_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | runtime_metrics | node | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | runtime_metrics | node_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | runtime_metrics | timestamp | 6 | | | | | 3 | | | | | select,insert | | TimestampMillisecond | timestamp(3) | FIELD | | No | timestamp(3) | | -| greptime | information_schema | runtime_metrics | value | 2 | | | 22 | | | | | | | select,insert | | Float64 | double | FIELD | | No | double | | -| greptime | information_schema | schema_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schema_privileges | is_grantable | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schema_privileges | privilege_type | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schema_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schema_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schemata | catalog_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schemata | default_character_set_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schemata | default_collation_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schemata | schema_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | schemata | sql_path | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | session_status | variable_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | session_status | variable_value | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | table_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | table_privileges | is_grantable | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | table_privileges | privilege_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | table_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | table_privileges | table_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | table_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | tables | engine | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | -| greptime | information_schema | tables | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | tables | table_id | 5 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | Yes | int unsigned | | -| greptime | information_schema | tables | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | tables | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | tables | table_type | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | action_condition | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | action_order | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | -| greptime | information_schema | triggers | action_orientation | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | action_reference_new_row | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | action_reference_new_table | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | action_reference_old_row | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | action_reference_old_table | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | action_statement | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | action_timing | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | character_set_client | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | collation_connection | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | created | 17 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | -| greptime | information_schema | triggers | database_collation | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | definer | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | event_manipulation | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | event_object_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | event_object_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | event_object_table | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | sql_mode | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | trigger_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | trigger_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | information_schema | triggers | trigger_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | -| greptime | public | numbers | number | 1 | | | 10 | 0 | | | | PRI | | select,insert | | UInt32 | int unsigned | TAG | | No | int unsigned | | -+---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+ ++---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+--------+ +| table_catalog | table_schema | table_name | column_name | ordinal_position | character_maximum_length | character_octet_length | numeric_precision | numeric_scale | datetime_precision | character_set_name | collation_name | column_key | extra | privileges | generation_expression | greptime_data_type | data_type | semantic_type | column_default | is_nullable | column_type | column_comment | srs_id | ++---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+--------+ +| greptime | information_schema | build_info | git_branch | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | build_info | git_commit | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | build_info | git_commit_short | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | build_info | git_dirty | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | build_info | pkg_version | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | character_sets | character_set_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | character_sets | default_collate_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | character_sets | description | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | character_sets | maxlen | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | check_constraints | check_clause | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | check_constraints | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | check_constraints | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | check_constraints | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | collation_character_set_applicability | character_set_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | collation_character_set_applicability | collation_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | collations | character_set_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | collations | collation_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | collations | id | 3 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | collations | is_compiled | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | collations | is_default | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | collations | sortlen | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | column_privileges | column_name | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_privileges | is_grantable | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_privileges | privilege_type | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_privileges | table_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_statistics | column_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_statistics | histogram | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_statistics | schema_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | column_statistics | table_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | character_maximum_length | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | columns | character_octet_length | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | columns | character_set_name | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | columns | collation_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | columns | column_comment | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | columns | column_default | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | columns | column_key | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | column_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | column_type | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | data_type | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | datetime_precision | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | columns | extra | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | generation_expression | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | greptime_data_type | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | is_nullable | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | numeric_precision | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | columns | numeric_scale | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | columns | ordinal_position | 5 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | columns | privileges | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | semantic_type | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | srs_id | 24 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | columns | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | columns | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | engines | comment | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | engines | engine | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | engines | savepoints | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | engines | support | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | engines | transactions | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | engines | xa | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | character_set_client | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | collation_connection | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | created | 17 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | events | database_collation | 24 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | definer | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | ends | 14 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | events | event_body | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | event_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | event_comment | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | event_definition | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | event_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | event_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | event_type | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | execute_at | 9 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | events | interval_field | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | interval_value | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | events | last_altered | 18 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | events | last_executed | 19 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | events | on_completion | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | originator | 21 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | events | sql_mode | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | starts | 13 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | events | status | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | events | time_zone | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | autoextend_size | 19 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | avg_row_length | 28 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | check_time | 35 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | files | checksum | 36 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | create_time | 33 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | files | creation_time | 20 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | files | data_free | 32 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | data_length | 29 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | deleted_rows | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | engine | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | extent_size | 16 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | extra | 38 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | file_id | 1 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | file_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | file_type | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | free_extents | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | fulltext_keys | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | index_length | 31 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | initial_size | 17 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | last_access_time | 22 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | files | last_update_time | 21 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | files | logfile_group_name | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | logfile_group_number | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | max_data_length | 30 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | maximum_size | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | recover_time | 23 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | files | row_format | 26 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | status | 37 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | table_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | table_name | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | table_rows | 27 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | table_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | tablespace_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | files | total_extents | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | transaction_counter | 24 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | update_count | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | files | update_time | 34 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | files | version | 25 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | global_status | variable_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | global_status | variable_value | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | greptime_region_peers | down_seconds | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | greptime_region_peers | is_leader | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | greptime_region_peers | peer_addr | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | greptime_region_peers | peer_id | 2 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | Yes | bigint unsigned | | | +| greptime | information_schema | greptime_region_peers | region_id | 1 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | No | bigint unsigned | | | +| greptime | information_schema | greptime_region_peers | status | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | key_column_usage | column_name | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | key_column_usage | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | key_column_usage | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | key_column_usage | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | key_column_usage | ordinal_position | 9 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | No | int unsigned | | | +| greptime | information_schema | key_column_usage | position_in_unique_constraint | 10 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | Yes | int unsigned | | | +| greptime | information_schema | key_column_usage | real_table_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | key_column_usage | referenced_column_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | key_column_usage | referenced_table_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | key_column_usage | referenced_table_schema | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | key_column_usage | table_catalog | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | key_column_usage | table_name | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | key_column_usage | table_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | optimizer_trace | insufficient_privileges | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | optimizer_trace | missing_bytes_beyond_max_mem_size | 3 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | optimizer_trace | query | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | optimizer_trace | trace | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | character_maximum_length | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | parameters | character_octet_length | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | parameters | character_set_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | collation_name | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | data_type | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | datetime_precision | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | parameters | dtd_identifier | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | numeric_precision | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | parameters | numeric_scale | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | parameters | ordinal_position | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | parameters | parameter_mode | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | parameter_name | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | routine_type | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | specific_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | specific_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | parameters | specific_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | partitions | avg_row_length | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | check_time | 21 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | | +| greptime | information_schema | partitions | checksum | 22 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | create_time | 19 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | | +| greptime | information_schema | partitions | data_free | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | data_length | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | greptime_partition_id | 26 | | | 20 | 0 | | | | | | select,insert | | UInt64 | bigint unsigned | FIELD | | Yes | bigint unsigned | | | +| greptime | information_schema | partitions | index_length | 17 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | max_data_length | 16 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | nodegroup | 24 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | partition_comment | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | partition_description | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | partition_expression | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | partition_method | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | partition_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | partitions | partition_ordinal_position | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | subpartition_expression | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | subpartition_method | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | subpartition_name | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | subpartition_ordinal_position | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | partitions | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | partitions | table_rows | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | Yes | bigint | | | +| greptime | information_schema | partitions | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | partitions | tablespace_name | 25 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | partitions | update_time | 20 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | Yes | datetime | | | +| greptime | information_schema | profiling | block_ops_in | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | block_ops_out | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | context_involuntary | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | context_voluntary | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | cpu_system | 6 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | cpu_user | 5 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | duration | 4 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | messages_received | 12 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | messages_sent | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | page_faults_major | 13 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | page_faults_minor | 14 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | query_id | 1 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | seq | 2 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | source_file | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | profiling | source_function | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | profiling | source_line | 18 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | profiling | state | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | profiling | swaps | 15 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | referential_constraints | constraint_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | constraint_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | constraint_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | delete_rule | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | match_option | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | referenced_table_name | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | table_name | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | unique_constraint_catalog | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | unique_constraint_name | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | unique_constraint_schema | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | referential_constraints | update_rule | 8 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | character_maximum_length | 7 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | routines | character_octet_length | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | routines | character_set_client | 29 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | character_set_name | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | collation_connection | 30 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | collation_name | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | created | 24 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | routines | data_type | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | database_collation | 31 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | datetime_precision | 11 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | routines | definer | 28 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | dtd_identifier | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | external_language | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | external_name | 17 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | is_deterministic | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | last_altered | 25 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | routines | numeric_precision | 9 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | routines | numeric_scale | 10 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | routines | parameter_style | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | routine_body | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | routine_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | routine_comment | 27 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | routine_definition | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | routine_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | routine_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | routine_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | security_type | 23 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | specific_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | sql_data_access | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | sql_mode | 26 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | routines | sql_path | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | runtime_metrics | labels | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | runtime_metrics | metric_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | runtime_metrics | node | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | runtime_metrics | node_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | runtime_metrics | timestamp | 6 | | | | | 3 | | | | | select,insert | | TimestampMillisecond | timestamp(3) | FIELD | | No | timestamp(3) | | | +| greptime | information_schema | runtime_metrics | value | 2 | | | 22 | | | | | | | select,insert | | Float64 | double | FIELD | | No | double | | | +| greptime | information_schema | schema_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schema_privileges | is_grantable | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schema_privileges | privilege_type | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schema_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schema_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schemata | catalog_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schemata | default_character_set_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schemata | default_collation_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schemata | schema_name | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | schemata | sql_path | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | session_status | variable_name | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | session_status | variable_value | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | table_privileges | grantee | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | table_privileges | is_grantable | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | table_privileges | privilege_type | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | table_privileges | table_catalog | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | table_privileges | table_name | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | table_privileges | table_schema | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | tables | engine | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | Yes | string | | | +| greptime | information_schema | tables | table_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | tables | table_id | 5 | | | 10 | 0 | | | | | | select,insert | | UInt32 | int unsigned | FIELD | | Yes | int unsigned | | | +| greptime | information_schema | tables | table_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | tables | table_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | tables | table_type | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | action_condition | 9 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | action_order | 8 | | | 19 | 0 | | | | | | select,insert | | Int64 | bigint | FIELD | | No | bigint | | | +| greptime | information_schema | triggers | action_orientation | 11 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | action_reference_new_row | 16 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | action_reference_new_table | 14 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | action_reference_old_row | 15 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | action_reference_old_table | 13 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | action_statement | 10 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | action_timing | 12 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | character_set_client | 20 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | collation_connection | 21 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | created | 17 | | | | | 3 | | | | | select,insert | | DateTime | datetime | FIELD | | No | datetime | | | +| greptime | information_schema | triggers | database_collation | 22 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | definer | 19 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | event_manipulation | 4 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | event_object_catalog | 5 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | event_object_schema | 6 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | event_object_table | 7 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | sql_mode | 18 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | trigger_catalog | 1 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | trigger_name | 3 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | information_schema | triggers | trigger_schema | 2 | 2147483647 | 2147483647 | | | | utf8 | utf8_bin | | | select,insert | | String | string | FIELD | | No | string | | | +| greptime | public | numbers | number | 1 | | | 10 | 0 | | | | PRI | | select,insert | | UInt32 | int unsigned | TAG | | No | int unsigned | | | ++---------------+--------------------+---------------------------------------+-----------------------------------+------------------+--------------------------+------------------------+-------------------+---------------+--------------------+--------------------+----------------+------------+-------+---------------+-----------------------+----------------------+-----------------+---------------+----------------+-------------+-----------------+----------------+--------+ create database my_db; @@ -721,6 +722,7 @@ DESC COLUMNS; | is_nullable | String | | NO | | FIELD | | column_type | String | | NO | | FIELD | | column_comment | String | | YES | | FIELD | +| srs_id | Int64 | | YES | | FIELD | +--------------------------+--------+-----+------+---------+---------------+ drop table my_db.foo; From 6d3dd40bc9e023c1d147359fb79d026d3e57a479 Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Sat, 6 Apr 2024 11:04:29 +0800 Subject: [PATCH 05/12] fix: test_information_schema_dot_columns --- tests-integration/src/tests/instance_test.rs | 80 ++++++++++---------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/tests-integration/src/tests/instance_test.rs b/tests-integration/src/tests/instance_test.rs index f88c95cd3501..622bb3d861d1 100644 --- a/tests-integration/src/tests/instance_test.rs +++ b/tests-integration/src/tests/instance_test.rs @@ -1897,43 +1897,44 @@ async fn test_information_schema_dot_columns(instance: Arc) { // User can only see information schema under current catalog. // A necessary requirement to GreptimeCloud. - let sql = "select table_catalog, table_schema, table_name, column_name, data_type, semantic_type from information_schema.columns where table_name in ('columns', 'numbers', 'tables', 'another_table') order by table_name"; + let sql = "select table_catalog, table_schema, table_name, column_name, data_type, semantic_type from information_schema.columns where table_name in ('columns', 'numbers', 'tables', 'another_table') order by table_name, column_name"; let output = execute_sql(&instance, sql).await.data; let expected = "\ +---------------+--------------------+------------+--------------------------+--------------+---------------+ | table_catalog | table_schema | table_name | column_name | data_type | semantic_type | +---------------+--------------------+------------+--------------------------+--------------+---------------+ -| greptime | information_schema | columns | numeric_scale | bigint | FIELD | -| greptime | information_schema | columns | privileges | string | FIELD | -| greptime | information_schema | columns | column_comment | string | FIELD | -| greptime | information_schema | columns | column_type | string | FIELD | -| greptime | information_schema | columns | is_nullable | string | FIELD | -| greptime | information_schema | columns | column_default | string | FIELD | -| greptime | information_schema | columns | table_catalog | string | FIELD | -| greptime | information_schema | columns | table_schema | string | FIELD | -| greptime | information_schema | columns | table_name | string | FIELD | -| greptime | information_schema | columns | column_name | string | FIELD | -| greptime | information_schema | columns | ordinal_position | bigint | FIELD | | greptime | information_schema | columns | character_maximum_length | bigint | FIELD | | greptime | information_schema | columns | character_octet_length | bigint | FIELD | -| greptime | information_schema | columns | numeric_precision | bigint | FIELD | -| greptime | information_schema | columns | semantic_type | string | FIELD | -| greptime | information_schema | columns | data_type | string | FIELD | -| greptime | information_schema | columns | greptime_data_type | string | FIELD | +| greptime | information_schema | columns | character_set_name | string | FIELD | | greptime | information_schema | columns | collation_name | string | FIELD | +| greptime | information_schema | columns | column_comment | string | FIELD | +| greptime | information_schema | columns | column_default | string | FIELD | | greptime | information_schema | columns | column_key | string | FIELD | -| greptime | information_schema | columns | extra | string | FIELD | +| greptime | information_schema | columns | column_name | string | FIELD | +| greptime | information_schema | columns | column_type | string | FIELD | +| greptime | information_schema | columns | data_type | string | FIELD | | greptime | information_schema | columns | datetime_precision | bigint | FIELD | +| greptime | information_schema | columns | extra | string | FIELD | | greptime | information_schema | columns | generation_expression | string | FIELD | -| greptime | information_schema | columns | character_set_name | string | FIELD | +| greptime | information_schema | columns | greptime_data_type | string | FIELD | +| greptime | information_schema | columns | is_nullable | string | FIELD | +| greptime | information_schema | columns | numeric_precision | bigint | FIELD | +| greptime | information_schema | columns | numeric_scale | bigint | FIELD | +| greptime | information_schema | columns | ordinal_position | bigint | FIELD | +| greptime | information_schema | columns | privileges | string | FIELD | +| greptime | information_schema | columns | semantic_type | string | FIELD | +| greptime | information_schema | columns | srs_id | bigint | FIELD | +| greptime | information_schema | columns | table_catalog | string | FIELD | +| greptime | information_schema | columns | table_name | string | FIELD | +| greptime | information_schema | columns | table_schema | string | FIELD | | greptime | public | numbers | number | int unsigned | TAG | -| greptime | information_schema | tables | table_catalog | string | FIELD | -| greptime | information_schema | tables | table_schema | string | FIELD | | greptime | information_schema | tables | engine | string | FIELD | +| greptime | information_schema | tables | table_catalog | string | FIELD | | greptime | information_schema | tables | table_id | int unsigned | FIELD | -| greptime | information_schema | tables | table_type | string | FIELD | | greptime | information_schema | tables | table_name | string | FIELD | +| greptime | information_schema | tables | table_schema | string | FIELD | +| greptime | information_schema | tables | table_type | string | FIELD | +---------------+--------------------+------------+--------------------------+--------------+---------------+"; check_output_stream(output, expected).await; @@ -1944,35 +1945,36 @@ async fn test_information_schema_dot_columns(instance: Arc) { | table_catalog | table_schema | table_name | column_name | data_type | semantic_type | +-----------------+--------------------+---------------+--------------------------+--------------+---------------+ | another_catalog | another_schema | another_table | i | timestamp(3) | TIMESTAMP | -| another_catalog | information_schema | columns | numeric_precision | bigint | FIELD | -| another_catalog | information_schema | columns | extra | string | FIELD | -| another_catalog | information_schema | columns | column_comment | string | FIELD | -| another_catalog | information_schema | columns | column_type | string | FIELD | -| another_catalog | information_schema | columns | is_nullable | string | FIELD | -| another_catalog | information_schema | columns | column_default | string | FIELD | -| another_catalog | information_schema | columns | table_catalog | string | FIELD | -| another_catalog | information_schema | columns | table_schema | string | FIELD | -| another_catalog | information_schema | columns | table_name | string | FIELD | -| another_catalog | information_schema | columns | column_name | string | FIELD | -| another_catalog | information_schema | columns | ordinal_position | bigint | FIELD | | another_catalog | information_schema | columns | character_maximum_length | bigint | FIELD | | another_catalog | information_schema | columns | character_octet_length | bigint | FIELD | -| another_catalog | information_schema | columns | semantic_type | string | FIELD | -| another_catalog | information_schema | columns | data_type | string | FIELD | | another_catalog | information_schema | columns | character_set_name | string | FIELD | -| another_catalog | information_schema | columns | numeric_scale | bigint | FIELD | | another_catalog | information_schema | columns | collation_name | string | FIELD | +| another_catalog | information_schema | columns | column_comment | string | FIELD | +| another_catalog | information_schema | columns | column_default | string | FIELD | | another_catalog | information_schema | columns | column_key | string | FIELD | +| another_catalog | information_schema | columns | column_name | string | FIELD | +| another_catalog | information_schema | columns | column_type | string | FIELD | +| another_catalog | information_schema | columns | data_type | string | FIELD | | another_catalog | information_schema | columns | datetime_precision | bigint | FIELD | -| another_catalog | information_schema | columns | privileges | string | FIELD | +| another_catalog | information_schema | columns | extra | string | FIELD | | another_catalog | information_schema | columns | generation_expression | string | FIELD | | another_catalog | information_schema | columns | greptime_data_type | string | FIELD | -| another_catalog | information_schema | tables | table_schema | string | FIELD | -| another_catalog | information_schema | tables | table_catalog | string | FIELD | +| another_catalog | information_schema | columns | is_nullable | string | FIELD | +| another_catalog | information_schema | columns | numeric_precision | bigint | FIELD | +| another_catalog | information_schema | columns | numeric_scale | bigint | FIELD | +| another_catalog | information_schema | columns | ordinal_position | bigint | FIELD | +| another_catalog | information_schema | columns | privileges | string | FIELD | +| another_catalog | information_schema | columns | semantic_type | string | FIELD | +| another_catalog | information_schema | columns | srs_id | bigint | FIELD | +| another_catalog | information_schema | columns | table_catalog | string | FIELD | +| another_catalog | information_schema | columns | table_name | string | FIELD | +| another_catalog | information_schema | columns | table_schema | string | FIELD | | another_catalog | information_schema | tables | engine | string | FIELD | +| another_catalog | information_schema | tables | table_catalog | string | FIELD | | another_catalog | information_schema | tables | table_id | int unsigned | FIELD | -| another_catalog | information_schema | tables | table_type | string | FIELD | | another_catalog | information_schema | tables | table_name | string | FIELD | +| another_catalog | information_schema | tables | table_schema | string | FIELD | +| another_catalog | information_schema | tables | table_type | string | FIELD | +-----------------+--------------------+---------------+--------------------------+--------------+---------------+"; check_output_stream(output, expected).await; From 1b260aaed8218563759163e7724dd0709020f83f Mon Sep 17 00:00:00 2001 From: dennis zhuang Date: Mon, 8 Apr 2024 08:54:38 +0800 Subject: [PATCH 06/12] chore: update comment Co-authored-by: JeremyHi --- src/datatypes/src/data_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datatypes/src/data_type.rs b/src/datatypes/src/data_type.rs index 2214b0ec6c33..a73c7df86698 100644 --- a/src/datatypes/src/data_type.rs +++ b/src/datatypes/src/data_type.rs @@ -281,7 +281,7 @@ impl ConcreteDataType { } } - /// Try to get numeric scale, returns `None` if it's not numeric type + /// Try to get numeric scale, returns `None` if it's float or not numeric type pub fn numeric_scale(&self) -> Option { match self { ConcreteDataType::Int8(_) From f9a28b6d925cb6eeee4e54bf7787280fa4b80f56 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:02:19 -0700 Subject: [PATCH 07/12] build(deps): bump h2 from 0.3.24 to 0.3.26 (#3642) Bumps [h2](https://github.com/hyperium/h2) from 0.3.24 to 0.3.26. - [Release notes](https://github.com/hyperium/h2/releases) - [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md) - [Commits](https://github.com/hyperium/h2/compare/v0.3.24...v0.3.26) --- updated-dependencies: - dependency-name: h2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 704c2e197630..f37e37d527f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3794,9 +3794,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", From d5adf7575c8aa77e3e9a13a6fb618d68dbfe022c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:02:36 -0700 Subject: [PATCH 08/12] build(deps): bump whoami from 1.4.1 to 1.5.1 (#3643) Bumps [whoami](https://github.com/ardaku/whoami) from 1.4.1 to 1.5.1. - [Changelog](https://github.com/ardaku/whoami/blob/v1/CHANGELOG.md) - [Commits](https://github.com/ardaku/whoami/compare/v1.4.1...v1.5.1) --- updated-dependencies: - dependency-name: whoami dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f37e37d527f3..e865f6fa484f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10997,7 +10997,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 0.1.10", "rand", "static_assertions", ] @@ -11445,6 +11445,12 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" version = "0.2.89" @@ -11600,11 +11606,12 @@ dependencies = [ [[package]] name = "whoami" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22fc3756b8a9133049b26c7f61ab35416c130e8c09b660f5b3958b446f52cc50" +checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" dependencies = [ - "wasm-bindgen", + "redox_syscall 0.4.1", + "wasite", "web-sys", ] From 54e4ed607ebcb54e056eb59cb77b8efc819e452f Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Sun, 7 Apr 2024 00:09:21 -0700 Subject: [PATCH 09/12] feat: adding victoriametrics remote write (#3641) * feat: adding victoria metrics remote write * test: add e2e tests for prom and vm remote writes --- Cargo.lock | 2 + Cargo.toml | 1 + src/servers/Cargo.toml | 1 + src/servers/src/error.rs | 17 ++++++-- src/servers/src/http/prom_store.rs | 65 +++++++++++++++++++++++------- src/servers/src/prom_store.rs | 7 +++- tests-integration/Cargo.toml | 2 + tests-integration/tests/http.rs | 65 ++++++++++++++++++++++++++++++ 8 files changed, 140 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e865f6fa484f..e4f36669e8f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9122,6 +9122,7 @@ dependencies = [ "tower", "tower-http", "urlencoding", + "zstd 0.13.0", ] [[package]] @@ -10166,6 +10167,7 @@ dependencies = [ "tonic 0.10.2", "tower", "uuid", + "zstd 0.13.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0bf04f17b82a..6cfcebdff4e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -155,6 +155,7 @@ tokio-util = { version = "0.7", features = ["io-util", "compat"] } toml = "0.8.8" tonic = { version = "0.10", features = ["tls"] } uuid = { version = "1", features = ["serde", "v4", "fast-rng"] } +zstd = "0.13" ## workspaces members api = { path = "src/api" } diff --git a/src/servers/Cargo.toml b/src/servers/Cargo.toml index 19f4a9f09d7b..c86770246df5 100644 --- a/src/servers/Cargo.toml +++ b/src/servers/Cargo.toml @@ -102,6 +102,7 @@ tonic-reflection = "0.10" tower = { version = "0.4", features = ["full"] } tower-http = { version = "0.4", features = ["full"] } urlencoding = "2.1" +zstd.workspace = true [target.'cfg(not(windows))'.dependencies] tikv-jemalloc-ctl = { version = "0.5", features = ["use_std"] } diff --git a/src/servers/src/error.rs b/src/servers/src/error.rs index 2d47547e65a6..1d4baa605e77 100644 --- a/src/servers/src/error.rs +++ b/src/servers/src/error.rs @@ -219,13 +219,20 @@ pub enum Error { error: prost::DecodeError, }, - #[snafu(display("Failed to decompress prometheus remote request"))] - DecompressPromRemoteRequest { + #[snafu(display("Failed to decompress snappy prometheus remote request"))] + DecompressSnappyPromRemoteRequest { location: Location, #[snafu(source)] error: snap::Error, }, + #[snafu(display("Failed to decompress zstd prometheus remote request"))] + DecompressZstdPromRemoteRequest { + location: Location, + #[snafu(source)] + error: std::io::Error, + }, + #[snafu(display("Failed to send prometheus remote request"))] SendPromRemoteRequest { location: Location, @@ -504,7 +511,8 @@ impl ErrorExt for Error { | DecodePromRemoteRequest { .. } | DecodeOtlpRequest { .. } | CompressPromRemoteRequest { .. } - | DecompressPromRemoteRequest { .. } + | DecompressSnappyPromRemoteRequest { .. } + | DecompressZstdPromRemoteRequest { .. } | InvalidPromRemoteRequest { .. } | InvalidExportMetricsConfig { .. } | InvalidFlightTicket { .. } @@ -657,7 +665,8 @@ impl IntoResponse for Error { | Error::InvalidOpentsdbJsonRequest { .. } | Error::DecodePromRemoteRequest { .. } | Error::DecodeOtlpRequest { .. } - | Error::DecompressPromRemoteRequest { .. } + | Error::DecompressSnappyPromRemoteRequest { .. } + | Error::DecompressZstdPromRemoteRequest { .. } | Error::InvalidPromRemoteRequest { .. } | Error::InvalidQuery { .. } | Error::TimePrecision { .. } => HttpStatusCode::BAD_REQUEST, diff --git a/src/servers/src/http/prom_store.rs b/src/servers/src/http/prom_store.rs index bf3f248eb005..1d4bd7a37d9f 100644 --- a/src/servers/src/http/prom_store.rs +++ b/src/servers/src/http/prom_store.rs @@ -19,7 +19,7 @@ use api::v1::RowInsertRequests; use axum::extract::{Query, RawBody, State}; use axum::http::{header, HeaderValue, StatusCode}; use axum::response::IntoResponse; -use axum::Extension; +use axum::{Extension, TypedHeader}; use bytes::Bytes; use common_catalog::consts::DEFAULT_SCHEMA_NAME; use common_query::prelude::GREPTIME_PHYSICAL_TABLE; @@ -35,7 +35,7 @@ use snafu::prelude::*; use super::header::{write_cost_header_map, GREPTIME_DB_HEADER_METRICS}; use crate::error::{self, Result, UnexpectedPhysicalTableSnafu}; -use crate::prom_store::snappy_decompress; +use crate::prom_store::{snappy_decompress, zstd_decompress}; use crate::proto::PromWriteRequest; use crate::query_handler::{PromStoreProtocolHandlerRef, PromStoreResponse}; @@ -45,19 +45,26 @@ lazy_static! { Pool::new(256, PromWriteRequest::default); } +pub const DEFAULT_ENCODING: &str = "snappy"; +pub const VM_ENCODING: &str = "zstd"; +pub const VM_PROTO_VERSION: &str = "1"; + #[derive(Debug, Serialize, Deserialize, JsonSchema)] -pub struct DatabaseQuery { +pub struct RemoteWriteQuery { pub db: Option, /// Specify which physical table to use for storing metrics. /// This only works on remote write requests. pub physical_table: Option, + /// For VictoriaMetrics modified remote write protocol + pub get_vm_proto_version: Option, } -impl Default for DatabaseQuery { - fn default() -> DatabaseQuery { +impl Default for RemoteWriteQuery { + fn default() -> RemoteWriteQuery { Self { db: Some(DEFAULT_SCHEMA_NAME.to_string()), physical_table: Some(GREPTIME_PHYSICAL_TABLE.to_string()), + get_vm_proto_version: None, } } } @@ -66,16 +73,23 @@ impl Default for DatabaseQuery { #[axum_macros::debug_handler] pub async fn route_write_without_metric_engine( State(handler): State, - Query(params): Query, + Query(params): Query, Extension(query_ctx): Extension, + content_encoding: TypedHeader, RawBody(body): RawBody, ) -> Result { + // VictoriaMetrics handshake + if let Some(_vm_handshake) = params.get_vm_proto_version { + return Ok(VM_PROTO_VERSION.into_response()); + } + let db = params.db.clone().unwrap_or_default(); let _timer = crate::metrics::METRIC_HTTP_PROM_STORE_WRITE_ELAPSED .with_label_values(&[db.as_str()]) .start_timer(); - let (request, samples) = decode_remote_write_request(body).await?; + let is_zstd = content_encoding.contains(VM_ENCODING); + let (request, samples) = decode_remote_write_request(is_zstd, body).await?; // reject if physical table is specified when metric engine is disabled if params.physical_table.is_some() { return UnexpectedPhysicalTableSnafu {}.fail(); @@ -86,7 +100,8 @@ pub async fn route_write_without_metric_engine( Ok(( StatusCode::NO_CONTENT, write_cost_header_map(output.meta.cost), - )) + ) + .into_response()) } #[axum_macros::debug_handler] @@ -96,16 +111,23 @@ pub async fn route_write_without_metric_engine( )] pub async fn remote_write( State(handler): State, - Query(params): Query, + Query(params): Query, Extension(mut query_ctx): Extension, + content_encoding: TypedHeader, RawBody(body): RawBody, ) -> Result { + // VictoriaMetrics handshake + if let Some(_vm_handshake) = params.get_vm_proto_version { + return Ok(VM_PROTO_VERSION.into_response()); + } + let db = params.db.clone().unwrap_or_default(); let _timer = crate::metrics::METRIC_HTTP_PROM_STORE_WRITE_ELAPSED .with_label_values(&[db.as_str()]) .start_timer(); - let (request, samples) = decode_remote_write_request_to_row_inserts(body).await?; + let is_zstd = content_encoding.contains(VM_ENCODING); + let (request, samples) = decode_remote_write_request_to_row_inserts(is_zstd, body).await?; if let Some(physical_table) = params.physical_table { let mut new_query_ctx = query_ctx.as_ref().clone(); @@ -118,7 +140,8 @@ pub async fn remote_write( Ok(( StatusCode::NO_CONTENT, write_cost_header_map(output.meta.cost), - )) + ) + .into_response()) } impl IntoResponse for PromStoreResponse { @@ -147,7 +170,7 @@ impl IntoResponse for PromStoreResponse { )] pub async fn remote_read( State(handler): State, - Query(params): Query, + Query(params): Query, Extension(query_ctx): Extension, RawBody(body): RawBody, ) -> Result { @@ -162,6 +185,7 @@ pub async fn remote_read( } async fn decode_remote_write_request_to_row_inserts( + is_zstd: bool, body: Body, ) -> Result<(RowInsertRequests, usize)> { let _timer = crate::metrics::METRIC_HTTP_PROM_STORE_DECODE_ELAPSED.start_timer(); @@ -169,7 +193,11 @@ async fn decode_remote_write_request_to_row_inserts( .await .context(error::HyperSnafu)?; - let buf = Bytes::from(snappy_decompress(&body[..])?); + let buf = Bytes::from(if is_zstd { + zstd_decompress(&body[..])? + } else { + snappy_decompress(&body[..])? + }); let mut request = PROM_WRITE_REQUEST_POOL.pull(PromWriteRequest::default); request @@ -178,13 +206,20 @@ async fn decode_remote_write_request_to_row_inserts( Ok(request.as_row_insert_requests()) } -async fn decode_remote_write_request(body: Body) -> Result<(RowInsertRequests, usize)> { +async fn decode_remote_write_request( + is_zstd: bool, + body: Body, +) -> Result<(RowInsertRequests, usize)> { let _timer = crate::metrics::METRIC_HTTP_PROM_STORE_DECODE_ELAPSED.start_timer(); let body = hyper::body::to_bytes(body) .await .context(error::HyperSnafu)?; - let buf = Bytes::from(snappy_decompress(&body[..])?); + let buf = Bytes::from(if is_zstd { + zstd_decompress(&body[..])? + } else { + snappy_decompress(&body[..])? + }); let mut request = PromWriteRequest::default(); request diff --git a/src/servers/src/prom_store.rs b/src/servers/src/prom_store.rs index 7553d9791225..23c7e45c38f0 100644 --- a/src/servers/src/prom_store.rs +++ b/src/servers/src/prom_store.rs @@ -389,7 +389,7 @@ pub fn snappy_decompress(buf: &[u8]) -> Result> { let mut decoder = Decoder::new(); decoder .decompress_vec(buf) - .context(error::DecompressPromRemoteRequestSnafu) + .context(error::DecompressSnappyPromRemoteRequestSnafu) } #[inline] @@ -400,6 +400,11 @@ pub fn snappy_compress(buf: &[u8]) -> Result> { .context(error::CompressPromRemoteRequestSnafu) } +#[inline] +pub fn zstd_decompress(buf: &[u8]) -> Result> { + zstd::stream::decode_all(buf).context(error::DecompressZstdPromRemoteRequestSnafu) +} + /// Mock timeseries for test, it is both used in servers and frontend crate /// So we present it here pub fn mock_timeseries() -> Vec { diff --git a/tests-integration/Cargo.toml b/tests-integration/Cargo.toml index aa40cae92ac0..99438540e209 100644 --- a/tests-integration/Cargo.toml +++ b/tests-integration/Cargo.toml @@ -46,6 +46,7 @@ mysql_async = { version = "0.33", default-features = false, features = [ ] } object-store.workspace = true operator.workspace = true +prost.workspace = true query.workspace = true rstest = "0.17" rstest_reuse = "0.5" @@ -68,6 +69,7 @@ tokio.workspace = true tonic.workspace = true tower = "0.4" uuid.workspace = true +zstd.workspace = true [dev-dependencies] datafusion.workspace = true diff --git a/tests-integration/tests/http.rs b/tests-integration/tests/http.rs index b2b3230ca456..bc8b458ee5d1 100644 --- a/tests-integration/tests/http.rs +++ b/tests-integration/tests/http.rs @@ -14,10 +14,12 @@ use std::collections::BTreeMap; +use api::prom_store::remote::WriteRequest; use auth::user_provider_from_option; use axum::http::{HeaderName, StatusCode}; use axum_test_helper::TestClient; use common_error::status_code::StatusCode as ErrorCode; +use prost::Message; use serde_json::json; use servers::http::error_result::ErrorResponse; use servers::http::greptime_result_v1::GreptimedbV1Response; @@ -26,6 +28,7 @@ use servers::http::header::GREPTIME_TIMEZONE_HEADER_NAME; use servers::http::influxdb_result_v1::{InfluxdbOutput, InfluxdbV1Response}; use servers::http::prometheus::{PrometheusJsonResponse, PrometheusResponse}; use servers::http::GreptimeQueryOutput; +use servers::prom_store; use tests_integration::test_util::{ setup_test_http_app, setup_test_http_app_with_frontend, setup_test_http_app_with_frontend_and_user_provider, setup_test_prom_app_with_frontend, @@ -71,6 +74,8 @@ macro_rules! http_tests { test_status_api, test_config_api, test_dashboard_path, + test_prometheus_remote_write, + test_vm_proto_remote_write, ); )* }; @@ -896,3 +901,63 @@ pub async fn test_dashboard_path(store_type: StorageType) { #[cfg(not(feature = "dashboard"))] pub async fn test_dashboard_path(_: StorageType) {} + +pub async fn test_prometheus_remote_write(store_type: StorageType) { + common_telemetry::init_default_ut_logging(); + let (app, mut guard) = + setup_test_prom_app_with_frontend(store_type, "prometheus_remote_write").await; + let client = TestClient::new(app); + + // write snappy encoded data + let write_request = WriteRequest { + timeseries: prom_store::mock_timeseries(), + ..Default::default() + }; + let serialized_request = write_request.encode_to_vec(); + let compressed_request = + prom_store::snappy_compress(&serialized_request).expect("failed to encode snappy"); + + let res = client + .post("/v1/prometheus/write") + .header("Content-Encoding", "snappy") + .body(compressed_request) + .send() + .await; + assert_eq!(res.status(), StatusCode::NO_CONTENT); + + guard.remove_all().await; +} + +pub async fn test_vm_proto_remote_write(store_type: StorageType) { + common_telemetry::init_default_ut_logging(); + let (app, mut guard) = + setup_test_prom_app_with_frontend(store_type, "vm_proto_remote_write").await; + + // handshake + let client = TestClient::new(app); + let res = client + .post("/v1/prometheus/write?get_vm_proto_version=1") + .send() + .await; + assert_eq!(res.status(), StatusCode::OK); + assert_eq!(res.text().await, "1"); + + // write zstd encoded data + let write_request = WriteRequest { + timeseries: prom_store::mock_timeseries(), + ..Default::default() + }; + let serialized_request = write_request.encode_to_vec(); + let compressed_request = + zstd::stream::encode_all(&serialized_request[..], 1).expect("Failed to encode zstd"); + + let res = client + .post("/v1/prometheus/write") + .header("Content-Encoding", "zstd") + .body(compressed_request) + .send() + .await; + assert_eq!(res.status(), StatusCode::NO_CONTENT); + + guard.remove_all().await; +} From bb601fa3bf91ac8076c4b6ed60d47d538208a633 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Sun, 7 Apr 2024 17:11:52 +0900 Subject: [PATCH 10/12] fix: construct correct pk list with pre-existing pk (#3614) * fix: construct correct pk list with pre-existing pk Signed-off-by: Ruihang Xia * update UT Signed-off-by: Ruihang Xia --------- Signed-off-by: Ruihang Xia --- src/metric-engine/src/engine/create.rs | 7 ++- .../common/create/create_metric_table.result | 62 +++++++++++++++++++ .../common/create/create_metric_table.sql | 28 +++++++++ 3 files changed, 94 insertions(+), 3 deletions(-) diff --git a/src/metric-engine/src/engine/create.rs b/src/metric-engine/src/engine/create.rs index b8b39a11ddf6..0ff5bb75f8a2 100644 --- a/src/metric-engine/src/engine/create.rs +++ b/src/metric-engine/src/engine/create.rs @@ -405,6 +405,7 @@ impl MetricEngineInner { request: &RegionCreateRequest, ) -> RegionCreateRequest { let mut data_region_request = request.clone(); + let mut primary_key = vec![ReservedColumnId::table_id(), ReservedColumnId::tsid()]; // concat region dir data_region_request.region_dir = join_dir(&request.region_dir, DATA_REGION_SUBDIR); @@ -416,6 +417,7 @@ impl MetricEngineInner { .for_each(|metadata| { if metadata.semantic_type == SemanticType::Tag { metadata.column_schema.set_nullable(); + primary_key.push(metadata.column_id); } }); @@ -423,8 +425,7 @@ impl MetricEngineInner { let [table_id_col, tsid_col] = Self::internal_column_metadata(); data_region_request.column_metadatas.push(table_id_col); data_region_request.column_metadatas.push(tsid_col); - data_region_request.primary_key = - vec![ReservedColumnId::table_id(), ReservedColumnId::tsid()]; + data_region_request.primary_key = primary_key; // set index options set_index_options_for_data_region(&mut data_region_request.options); @@ -608,7 +609,7 @@ mod test { assert_eq!(data_region_request.column_metadatas.len(), 4); assert_eq!( data_region_request.primary_key, - vec![ReservedColumnId::table_id(), ReservedColumnId::tsid()] + vec![ReservedColumnId::table_id(), ReservedColumnId::tsid(), 1] ); } } diff --git a/tests/cases/standalone/common/create/create_metric_table.result b/tests/cases/standalone/common/create/create_metric_table.result index 0a153ec733fc..5256f9d1b91b 100644 --- a/tests/cases/standalone/common/create/create_metric_table.result +++ b/tests/cases/standalone/common/create/create_metric_table.result @@ -84,3 +84,65 @@ DROP TABLE phy; Affected Rows: 0 +-- create one with other primary keys +CREATE TABLE phy2 (ts timestamp time index, val double, abc string, def string, primary key (abc, def)) engine=metric with ("physical_metric_table" = ""); + +Affected Rows: 0 + +DESC TABLE phy2; + ++--------+----------------------+-----+------+---------+---------------+ +| Column | Type | Key | Null | Default | Semantic Type | ++--------+----------------------+-----+------+---------+---------------+ +| ts | TimestampMillisecond | PRI | NO | | TIMESTAMP | +| val | Float64 | | YES | | FIELD | +| abc | String | PRI | YES | | TAG | +| def | String | PRI | YES | | TAG | ++--------+----------------------+-----+------+---------+---------------+ + +DROP TABLE phy2; + +Affected Rows: 0 + +-- fuzz test case https://github.com/GreptimeTeam/greptimedb/issues/3612 +CREATE TABLE `auT`( + incidunt TIMESTAMP(3) TIME INDEX, + `QuaErAT` BOOLEAN, + `REPREHenDERIt` BOOLEAN DEFAULT true, + `Et` INT NULL, + `AutEM` INT, + esse DOUBLE, + `Tempore` BOOLEAN, + `reruM` BOOLEAN, + `eRrOR` BOOLEAN NULL, + `cOMmodi` BOOLEAN, + `PERfERENdIS` DOUBLE, + `eSt` FLOAT DEFAULT 0.70978713, + PRIMARY KEY(`cOMmodi`, `PERfERENdIS`, esse) +) ENGINE = metric with ("physical_metric_table" = ""); + +Affected Rows: 0 + +DESC TABLE `auT`; + ++---------------+----------------------+-----+------+------------+---------------+ +| Column | Type | Key | Null | Default | Semantic Type | ++---------------+----------------------+-----+------+------------+---------------+ +| incidunt | TimestampMillisecond | PRI | NO | | TIMESTAMP | +| QuaErAT | Boolean | | YES | | FIELD | +| REPREHenDERIt | Boolean | | YES | true | FIELD | +| Et | Int32 | | YES | | FIELD | +| AutEM | Int32 | | YES | | FIELD | +| esse | Float64 | PRI | YES | | TAG | +| Tempore | Boolean | | YES | | FIELD | +| reruM | Boolean | | YES | | FIELD | +| eRrOR | Boolean | | YES | | FIELD | +| cOMmodi | Boolean | PRI | YES | | TAG | +| PERfERENdIS | Float64 | PRI | YES | | TAG | +| eSt | Float32 | | YES | 0.70978713 | FIELD | ++---------------+----------------------+-----+------+------------+---------------+ + +DROP TABLE `auT`; + +Affected Rows: 0 + diff --git a/tests/cases/standalone/common/create/create_metric_table.sql b/tests/cases/standalone/common/create/create_metric_table.sql index fcc41ff11541..a5be70c95502 100644 --- a/tests/cases/standalone/common/create/create_metric_table.sql +++ b/tests/cases/standalone/common/create/create_metric_table.sql @@ -23,3 +23,31 @@ DROP TABLE t1; DROP TABLE t2; DROP TABLE phy; + +-- create one with other primary keys +CREATE TABLE phy2 (ts timestamp time index, val double, abc string, def string, primary key (abc, def)) engine=metric with ("physical_metric_table" = ""); + +DESC TABLE phy2; + +DROP TABLE phy2; + +-- fuzz test case https://github.com/GreptimeTeam/greptimedb/issues/3612 +CREATE TABLE `auT`( + incidunt TIMESTAMP(3) TIME INDEX, + `QuaErAT` BOOLEAN, + `REPREHenDERIt` BOOLEAN DEFAULT true, + `Et` INT NULL, + `AutEM` INT, + esse DOUBLE, + `Tempore` BOOLEAN, + `reruM` BOOLEAN, + `eRrOR` BOOLEAN NULL, + `cOMmodi` BOOLEAN, + `PERfERENdIS` DOUBLE, + `eSt` FLOAT DEFAULT 0.70978713, + PRIMARY KEY(`cOMmodi`, `PERfERENdIS`, esse) +) ENGINE = metric with ("physical_metric_table" = ""); + +DESC TABLE `auT`; + +DROP TABLE `auT`; From 48ccca8efba255af406274632d1fd12a934e3400 Mon Sep 17 00:00:00 2001 From: Weny Xu Date: Sun, 7 Apr 2024 17:35:34 +0800 Subject: [PATCH 11/12] test(sqlness): release databases after tests (#3648) --- .../common/create/create_database.result | 4 ++++ .../standalone/common/create/create_database.sql | 2 ++ .../common/create/upper_case_table_name.result | 4 ++++ .../common/create/upper_case_table_name.sql | 2 ++ .../common/show/show_databases_tables.result | 16 +++++++--------- .../common/system/information_schema.result | 14 ++++++-------- .../standalone/common/tql/case_sensitive.result | 4 ++++ .../standalone/common/tql/case_sensitive.sql | 2 ++ 8 files changed, 31 insertions(+), 17 deletions(-) diff --git a/tests/cases/standalone/common/create/create_database.result b/tests/cases/standalone/common/create/create_database.result index da409471c2bb..9c1e6a095623 100644 --- a/tests/cases/standalone/common/create/create_database.result +++ b/tests/cases/standalone/common/create/create_database.result @@ -21,3 +21,7 @@ show databases; | public | +--------------------+ +drop database 'illegal-database'; + +Affected Rows: 0 + diff --git a/tests/cases/standalone/common/create/create_database.sql b/tests/cases/standalone/common/create/create_database.sql index 0116e2bcce1a..4c6a854f8b3b 100644 --- a/tests/cases/standalone/common/create/create_database.sql +++ b/tests/cases/standalone/common/create/create_database.sql @@ -5,3 +5,5 @@ create database 'illegal-database'; create database '㊙️database'; show databases; + +drop database 'illegal-database'; diff --git a/tests/cases/standalone/common/create/upper_case_table_name.result b/tests/cases/standalone/common/create/upper_case_table_name.result index 13a00fd8d913..33e186a63d5b 100644 --- a/tests/cases/standalone/common/create/upper_case_table_name.result +++ b/tests/cases/standalone/common/create/upper_case_table_name.result @@ -98,6 +98,10 @@ drop table abcdefge; Affected Rows: 0 +drop database upper_case_table_name; + +Affected Rows: 0 + use public; Affected Rows: 0 diff --git a/tests/cases/standalone/common/create/upper_case_table_name.sql b/tests/cases/standalone/common/create/upper_case_table_name.sql index 5cade9edfd05..76625e0159af 100644 --- a/tests/cases/standalone/common/create/upper_case_table_name.sql +++ b/tests/cases/standalone/common/create/upper_case_table_name.sql @@ -40,4 +40,6 @@ desc table abcdefge; drop table abcdefge; +drop database upper_case_table_name; + use public; diff --git a/tests/cases/standalone/common/show/show_databases_tables.result b/tests/cases/standalone/common/show/show_databases_tables.result index 90fc27f88bb5..1f35687d20ed 100644 --- a/tests/cases/standalone/common/show/show_databases_tables.result +++ b/tests/cases/standalone/common/show/show_databases_tables.result @@ -1,14 +1,12 @@ show databases; -+-----------------------+ -| Database | -+-----------------------+ -| greptime_private | -| illegal-database | -| information_schema | -| public | -| upper_case_table_name | -+-----------------------+ ++--------------------+ +| Database | ++--------------------+ +| greptime_private | +| information_schema | +| public | ++--------------------+ use information_schema; diff --git a/tests/cases/standalone/common/system/information_schema.result b/tests/cases/standalone/common/system/information_schema.result index 30914c39eeb7..e325f8c938e7 100644 --- a/tests/cases/standalone/common/system/information_schema.result +++ b/tests/cases/standalone/common/system/information_schema.result @@ -515,14 +515,12 @@ desc table schemata; select * from schemata where catalog_name = 'greptime' and schema_name != 'public' order by catalog_name, schema_name; -+--------------+-----------------------+----------------------------+------------------------+----------+ -| catalog_name | schema_name | default_character_set_name | default_collation_name | sql_path | -+--------------+-----------------------+----------------------------+------------------------+----------+ -| greptime | greptime_private | utf8 | utf8_bin | | -| greptime | illegal-database | utf8 | utf8_bin | | -| greptime | information_schema | utf8 | utf8_bin | | -| greptime | upper_case_table_name | utf8 | utf8_bin | | -+--------------+-----------------------+----------------------------+------------------------+----------+ ++--------------+--------------------+----------------------------+------------------------+----------+ +| catalog_name | schema_name | default_character_set_name | default_collation_name | sql_path | ++--------------+--------------------+----------------------------+------------------------+----------+ +| greptime | greptime_private | utf8 | utf8_bin | | +| greptime | information_schema | utf8 | utf8_bin | | ++--------------+--------------------+----------------------------+------------------------+----------+ -- test engines select * from engines; diff --git a/tests/cases/standalone/common/tql/case_sensitive.result b/tests/cases/standalone/common/tql/case_sensitive.result index e98e41a71b3e..e4e305a27e6c 100644 --- a/tests/cases/standalone/common/tql/case_sensitive.result +++ b/tests/cases/standalone/common/tql/case_sensitive.result @@ -75,3 +75,7 @@ drop table "AnotherSchema"."MemTotal"; Affected Rows: 0 +drop schema "AnotherSchema"; + +Affected Rows: 0 + diff --git a/tests/cases/standalone/common/tql/case_sensitive.sql b/tests/cases/standalone/common/tql/case_sensitive.sql index 6e75974abfc9..2aea15bb8387 100644 --- a/tests/cases/standalone/common/tql/case_sensitive.sql +++ b/tests/cases/standalone/common/tql/case_sensitive.sql @@ -37,3 +37,5 @@ tql eval (0,10,'5s') sum(MemAvailable / 4) + sum({__name__="AnotherSchema.MemTot drop table "MemAvailable"; drop table "AnotherSchema"."MemTotal"; + +drop schema "AnotherSchema"; From d79068db9bdd41e4ea74d0a2421ccc0f0b3655ea Mon Sep 17 00:00:00 2001 From: Dennis Zhuang Date: Mon, 8 Apr 2024 08:59:49 +0800 Subject: [PATCH 12/12] refactor: rename Greptime_Type to Greptime_type --- src/query/src/sql.rs | 2 +- tests/cases/standalone/common/show/show_columns.result | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/query/src/sql.rs b/src/query/src/sql.rs index 26a2641bbfe9..645bac9f3158 100644 --- a/src/query/src/sql.rs +++ b/src/query/src/sql.rs @@ -65,7 +65,7 @@ const TABLES_COLUMN: &str = "Tables"; const FIELD_COLUMN: &str = "Field"; const TABLE_TYPE_COLUMN: &str = "Table_type"; const COLUMN_NAME_COLUMN: &str = "Column"; -const COLUMN_GREPTIME_TYPE_COLUMN: &str = "Greptime_Type"; +const COLUMN_GREPTIME_TYPE_COLUMN: &str = "Greptime_type"; const COLUMN_TYPE_COLUMN: &str = "Type"; const COLUMN_KEY_COLUMN: &str = "Key"; const COLUMN_EXTRA_COLUMN: &str = "Extra"; diff --git a/tests/cases/standalone/common/show/show_columns.result b/tests/cases/standalone/common/show/show_columns.result index 5206170b3e3d..2e9bdaae47fb 100644 --- a/tests/cases/standalone/common/show/show_columns.result +++ b/tests/cases/standalone/common/show/show_columns.result @@ -18,7 +18,7 @@ Error: 2000(InvalidSyntax), Unexpected token while parsing SQL statement: SHOW C SHOW COLUMNS FROM system_metrics; +-------------+--------------+------+------------+---------------------+-------+----------------------+ -| Field | Type | Null | Key | Default | Extra | Greptime_Type | +| Field | Type | Null | Key | Default | Extra | Greptime_type | +-------------+--------------+------+------------+---------------------+-------+----------------------+ | cpu_util | double | Yes | | | | Float64 | | disk_util | double | Yes | | | | Float64 | @@ -31,7 +31,7 @@ SHOW COLUMNS FROM system_metrics; SHOW COLUMNS FROM system_metrics in public; +-------------+--------------+------+------------+---------------------+-------+----------------------+ -| Field | Type | Null | Key | Default | Extra | Greptime_Type | +| Field | Type | Null | Key | Default | Extra | Greptime_type | +-------------+--------------+------+------------+---------------------+-------+----------------------+ | cpu_util | double | Yes | | | | Float64 | | disk_util | double | Yes | | | | Float64 | @@ -44,7 +44,7 @@ SHOW COLUMNS FROM system_metrics in public; SHOW FULL COLUMNS FROM `system_metrics`; +-------------+--------------+-----------+------+------------+---------------------+---------+---------------+-------+----------------------+ -| Field | Type | Collation | Null | Key | Default | Comment | Privileges | Extra | Greptime_Type | +| Field | Type | Collation | Null | Key | Default | Comment | Privileges | Extra | Greptime_type | +-------------+--------------+-----------+------+------------+---------------------+---------+---------------+-------+----------------------+ | cpu_util | double | | Yes | | | | select,insert | | Float64 | | disk_util | double | | Yes | | | | select,insert | | Float64 | @@ -57,7 +57,7 @@ SHOW FULL COLUMNS FROM `system_metrics`; SHOW COLUMNS FROM system_metrics like '%util%'; +-------------+--------+------+-----+---------+-------+---------------+ -| Field | Type | Null | Key | Default | Extra | Greptime_Type | +| Field | Type | Null | Key | Default | Extra | Greptime_type | +-------------+--------+------+-----+---------+-------+---------------+ | cpu_util | double | Yes | | | | Float64 | | disk_util | double | Yes | | | | Float64 | @@ -67,7 +67,7 @@ SHOW COLUMNS FROM system_metrics like '%util%'; SHOW COLUMNS FROM system_metrics WHERE Field = 'cpu_util'; +----------+--------+------+-----+---------+-------+---------------+ -| Field | Type | Null | Key | Default | Extra | Greptime_Type | +| Field | Type | Null | Key | Default | Extra | Greptime_type | +----------+--------+------+-----+---------+-------+---------------+ | cpu_util | double | Yes | | | | Float64 | +----------+--------+------+-----+---------+-------+---------------+