mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-16 18:22:55 +00:00
feat: adds metric engine to information_schema engines table (#3599)
* feat: adds metric engine to information_schema engines table * fix: support value for metric engine
This commit is contained in:
@@ -14,13 +14,15 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use common_catalog::consts::MITO_ENGINE;
|
||||
use common_catalog::consts::{METRIC_ENGINE, MITO_ENGINE};
|
||||
use datatypes::prelude::{ConcreteDataType, VectorRef};
|
||||
use datatypes::schema::{ColumnSchema, Schema, SchemaRef};
|
||||
use datatypes::vectors::{Int64Vector, StringVector};
|
||||
|
||||
use crate::information_schema::table_names::*;
|
||||
|
||||
const NO_VALUE: &str = "NO";
|
||||
|
||||
/// Find the schema and columns by the table_name, only valid for memory tables.
|
||||
/// Safety: the user MUST ensure the table schema exists, panic otherwise.
|
||||
pub fn get_schema_columns(table_name: &str) -> (SchemaRef, Vec<VectorRef>) {
|
||||
@@ -59,14 +61,15 @@ pub fn get_schema_columns(table_name: &str) -> (SchemaRef, Vec<VectorRef>) {
|
||||
"SAVEPOINTS",
|
||||
]),
|
||||
vec![
|
||||
Arc::new(StringVector::from(vec![MITO_ENGINE])),
|
||||
Arc::new(StringVector::from(vec!["DEFAULT"])),
|
||||
Arc::new(StringVector::from(vec![MITO_ENGINE, METRIC_ENGINE])),
|
||||
Arc::new(StringVector::from(vec!["DEFAULT", "YES"])),
|
||||
Arc::new(StringVector::from(vec![
|
||||
"Storage engine for time-series data",
|
||||
"Storage engine for observability scenarios, which is adept at handling a large number of small tables, making it particularly suitable for cloud-native monitoring",
|
||||
])),
|
||||
Arc::new(StringVector::from(vec!["NO"])),
|
||||
Arc::new(StringVector::from(vec!["NO"])),
|
||||
Arc::new(StringVector::from(vec!["NO"])),
|
||||
Arc::new(StringVector::from(vec![NO_VALUE, NO_VALUE])),
|
||||
Arc::new(StringVector::from(vec![NO_VALUE, NO_VALUE])),
|
||||
Arc::new(StringVector::from(vec![NO_VALUE, NO_VALUE])),
|
||||
],
|
||||
),
|
||||
|
||||
|
||||
@@ -512,11 +512,12 @@ select * from schemata where catalog_name = 'greptime' and schema_name != 'publi
|
||||
-- test engines
|
||||
select * from engines;
|
||||
|
||||
+--------+---------+-------------------------------------+--------------+----+------------+
|
||||
| engine | support | comment | transactions | xa | savepoints |
|
||||
+--------+---------+-------------------------------------+--------------+----+------------+
|
||||
| mito | DEFAULT | Storage engine for time-series data | NO | NO | NO |
|
||||
+--------+---------+-------------------------------------+--------------+----+------------+
|
||||
+--------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----+------------+
|
||||
| engine | support | comment | transactions | xa | savepoints |
|
||||
+--------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----+------------+
|
||||
| mito | DEFAULT | Storage engine for time-series data | NO | NO | NO |
|
||||
| metric | YES | Storage engine for observability scenarios, which is adept at handling a large number of small tables, making it particularly suitable for cloud-native monitoring | NO | NO | NO |
|
||||
+--------+---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+----+------------+
|
||||
|
||||
desc table build_info;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user