feat: add common_version customization (#7869)

* feat: add product name customization

* chore: update tests
This commit is contained in:
Ning Sun
2026-03-26 18:18:06 +08:00
committed by GitHub
parent 1118fe243f
commit 08ded45c7a
15 changed files with 44 additions and 17 deletions

View File

@@ -21,6 +21,7 @@ use std::sync::Arc;
use common_query::Output;
use common_recordbatch::RecordBatches;
use common_time::timezone::system_timezone_name;
use common_version;
use datatypes::prelude::ConcreteDataType;
use datatypes::schema::{ColumnSchema, Schema};
use datatypes::vectors::StringVector;
@@ -119,7 +120,7 @@ static VAR_VALUES: Lazy<HashMap<&str, &str>> = Lazy::new(|| {
("interactive_timeout", "31536000"),
("wait_timeout", "31536000"),
("net_write_timeout", "31536000"),
("version_comment", "Greptime"),
("version_comment", common_version::product_name()),
])
});
@@ -380,7 +381,7 @@ mod test {
+-------------------+
| @@version_comment |
+-------------------+
| Greptime |
| GreptimeDB |
+-------------------+";
test(query, expected);

View File

@@ -50,7 +50,11 @@ pub(crate) struct GreptimeDBStartupParameters {
impl GreptimeDBStartupParameters {
fn new() -> GreptimeDBStartupParameters {
GreptimeDBStartupParameters {
version: format!("16.3-greptimedb-{}", common_version::version()),
version: format!(
"16.3-{}-{}",
common_version::product_name(),
common_version::version()
),
}
}
}