Skip to content

Commit de52dd6

Browse files
committed
fix projection don't contain ts field
1 parent 3b91658 commit de52dd6

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

Cargo.lock

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ hash_ext = { path = "components/hash_ext" }
115115
hex = "0.4.3"
116116
hyperloglog = { git = "https://github.com/jedisct1/rust-hyperloglog.git", rev = "425487ce910f26636fbde8c4d640b538431aad50" }
117117
id_allocator = { path = "components/id_allocator" }
118-
influxql-logical-planner = { git = "https://github.com/CeresDB/influxql.git", rev = "239265c", package = "iox_query_influxql" }
119-
influxql-parser = { git = "https://github.com/CeresDB/influxql.git", rev = "239265c", package = "influxdb_influxql_parser" }
120-
influxql-query = { git = "https://github.com/CeresDB/influxql.git", rev = "239265c", package = "iox_query" }
121-
influxql-schema = { git = "https://github.com/CeresDB/influxql.git", rev = "239265c", package = "schema" }
118+
influxql-logical-planner = { git = "https://github.com/CeresDB/influxql.git", rev = "9aad6f1", package = "iox_query_influxql" }
119+
influxql-parser = { git = "https://github.com/CeresDB/influxql.git", rev = "9aad6f1", package = "influxdb_influxql_parser" }
120+
influxql-query = { git = "https://github.com/CeresDB/influxql.git", rev = "9aad6f1", package = "iox_query" }
121+
influxql-schema = { git = "https://github.com/CeresDB/influxql.git", rev = "9aad6f1", package = "schema" }
122122
interpreters = { path = "interpreters" }
123123
itertools = "0.10.5"
124124
lz4_flex = { version = "0.11", default-features = false, features = ["frame"] }

query_frontend/src/plan.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ impl QueryPlan {
104104
/// query.
105105
pub fn extract_time_range(&self) -> Option<TimeRange> {
106106
let ts_column = if let Some(v) = self.find_timestamp_column() {
107+
v
108+
} else {
107109
warn!(
108110
"Couldn't find time column, plan:{:?}, table_name:{:?}",
109111
self.df_plan, self.table_name
110112
);
111-
v
112-
} else {
113113
return Some(TimeRange::min_to_max());
114114
};
115115
let time_range = match influxql_query::logical_optimizer::range_predicate::find_time_range(
@@ -308,6 +308,10 @@ mod tests {
308308
"select * from test_table where key2 > 1 and key2 < 10",
309309
Some((2, 10)),
310310
),
311+
(
312+
"select field1 from test_table where key2 > 1 and key2 < 10",
313+
Some((2, 10)),
314+
),
311315
(
312316
"select * from test_table where key2 >= 1 and key2 <= 10",
313317
Some((1, 11)),

0 commit comments

Comments
 (0)