mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-19 06:20:38 +00:00
fix: reset tags when creating an empty metric in prom call (#6056)
* Revert "chore: remove debug logs" This reverts commit f73f3a7373c83db974d8ed80cb47f5f87317b490. * chore: more logs * fix: reset tags and fields * test: add binary time fn test * chore: remove logs * test: sort result
This commit is contained in:
@@ -761,6 +761,8 @@ impl PromPlanner {
|
||||
} else {
|
||||
self.ctx.time_index_column = Some(SPECIAL_TIME_FUNCTION.to_string());
|
||||
self.ctx.reset_table_name_and_schema();
|
||||
self.ctx.tag_columns = vec![];
|
||||
self.ctx.field_columns = vec![DEFAULT_FIELD_COLUMN.to_string()];
|
||||
LogicalPlan::Extension(Extension {
|
||||
node: Arc::new(
|
||||
EmptyMetric::new(
|
||||
@@ -2828,6 +2830,7 @@ impl PromPlanner {
|
||||
let project_fields = non_field_columns_iter
|
||||
.chain(field_columns_iter)
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
|
||||
LogicalPlanBuilder::from(input)
|
||||
.project(project_fields)
|
||||
.context(DataFusionPlanningSnafu)?
|
||||
|
||||
Reference in New Issue
Block a user