Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
waynexia authored Nov 17, 2023
1 parent f99657c commit fb23173
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/query/src/range_select/plan_rewrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))];
}
Expand Down
2 changes: 1 addition & 1 deletion tests/cases/standalone/common/range/by.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;
DROP TABLE host;

0 comments on commit fb23173

Please sign in to comment.