mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-27 02:10:38 +00:00
feat: supports value aliasing in TQL (#7041)
* feat: supports value aliasing in TQL Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * fix: invalid checking Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * chore: remove invalid checking Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * test: add explain test Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * chore: improve parser Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * test: add explain TQL-CTE Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
This commit is contained in:
@@ -174,7 +174,7 @@ impl StatementExecutor {
|
||||
) -> Result<Output> {
|
||||
match stmt {
|
||||
QueryStatement::Sql(stmt) => self.execute_sql(stmt, query_ctx).await,
|
||||
QueryStatement::Promql(_) => self.plan_exec(stmt, query_ctx).await,
|
||||
QueryStatement::Promql(_, _) => self.plan_exec(stmt, query_ctx).await,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ impl StatementExecutor {
|
||||
lookback: eval
|
||||
.lookback
|
||||
.unwrap_or_else(|| DEFAULT_LOOKBACK_STRING.to_string()),
|
||||
alias: eval.alias,
|
||||
};
|
||||
QueryLanguageParser::parse_promql(&promql, query_ctx).context(ParseQuerySnafu)?
|
||||
}
|
||||
@@ -82,6 +83,7 @@ impl StatementExecutor {
|
||||
lookback: analyze
|
||||
.lookback
|
||||
.unwrap_or_else(|| DEFAULT_LOOKBACK_STRING.to_string()),
|
||||
alias: analyze.alias,
|
||||
};
|
||||
let analyze_node_name = if analyze.is_verbose {
|
||||
ANALYZE_VERBOSE_NODE_NAME
|
||||
|
||||
Reference in New Issue
Block a user