mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
fix: the way to retrieve time index column
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -165,7 +165,7 @@ fn fetch_partition_range(input: Arc<dyn ExecutionPlan>) -> DataFusionResult<Opti
|
||||
|
||||
if let Some(region_scan_exec) = plan.as_any().downcast_ref::<RegionScanExec>() {
|
||||
partition_ranges = Some(region_scan_exec.get_uncollapsed_partition_ranges());
|
||||
time_index = region_scan_exec.time_index();
|
||||
time_index = Some(region_scan_exec.time_index());
|
||||
tag_columns = Some(region_scan_exec.tag_columns());
|
||||
|
||||
// set distinguish_partition_ranges to true, this is an incorrect workaround
|
||||
|
||||
@@ -146,13 +146,15 @@ impl RegionScanExec {
|
||||
let _ = scanner.prepare(partition_ranges, distinguish_partition_range);
|
||||
}
|
||||
|
||||
pub fn time_index(&self) -> Option<String> {
|
||||
pub fn time_index(&self) -> String {
|
||||
self.scanner
|
||||
.lock()
|
||||
.unwrap()
|
||||
.schema()
|
||||
.timestamp_column()
|
||||
.map(|x| x.name.clone())
|
||||
.metadata()
|
||||
.time_index_column()
|
||||
.column_schema
|
||||
.name
|
||||
.clone()
|
||||
}
|
||||
|
||||
pub fn tag_columns(&self) -> Vec<String> {
|
||||
|
||||
Reference in New Issue
Block a user