From fb231737e7d7b6b695a0e17617ec66ecde8a1af2 Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Fri, 17 Nov 2023 19:08:41 +0800 Subject: [PATCH] Apply suggestions from code review --- src/query/src/range_select/plan_rewrite.rs | 3 ++- tests/cases/standalone/common/range/by.sql | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/query/src/range_select/plan_rewrite.rs b/src/query/src/range_select/plan_rewrite.rs index 023b61ad095e..fb1872c37580 100644 --- a/src/query/src/range_select/plan_rewrite.rs +++ b/src/query/src/range_select/plan_rewrite.rs @@ -343,7 +343,8 @@ impl RangePlanRewriter { .map(|key| Expr::Column(Column::new(Some(table_ref.clone()), key))) .collect(); // If the user does not specify a primary key when creating a table, - // then by default all data will be aggregated into one time series, which is equivalent to using `by(1)` in SQL + // then by default all data will be aggregated into one time series, + // which is equivalent to using `by(1)` in SQL if default_by.is_empty() { default_by = vec![Expr::Literal(ScalarValue::Int64(Some(1)))]; } diff --git a/tests/cases/standalone/common/range/by.sql b/tests/cases/standalone/common/range/by.sql index 0edb95534ea4..b7aae24c97e9 100644 --- a/tests/cases/standalone/common/range/by.sql +++ b/tests/cases/standalone/common/range/by.sql @@ -57,4 +57,4 @@ INSERT INTO TABLE host VALUES SELECT ts, max(val) RANGE '5s' FROM host ALIGN '20s' ORDER BY ts; -DROP TABLE host; \ No newline at end of file +DROP TABLE host;