Skip to content

Commit

Permalink
fix: some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
v0y4g3r committed May 21, 2024
1 parent def4ede commit 0faa6af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/mito2/src/read/scan_region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::sync::Arc;
use std::time::Instant;

use common_recordbatch::SendableRecordBatchStream;
use common_telemetry::{debug, error, info, warn};
use common_telemetry::{debug, error, warn};
use common_time::range::TimestampRange;
use store_api::storage::ScanRequest;
use table::predicate::{build_time_range_predicate, Predicate};
Expand Down Expand Up @@ -269,7 +269,6 @@ impl ScanRegion {
);

let index_applier = self.build_index_applier();
info!("Request filters: {:?}", self.request.filters);
let predicate = Predicate::new(self.request.filters.clone());
// The mapper always computes projected column ids as the schema of SSTs may change.
let mapper = match &self.request.projection {
Expand Down
6 changes: 3 additions & 3 deletions src/query/src/tests/time_range_filter_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ struct TimeRangeTester {
impl TimeRangeTester {
async fn check(&self, sql: &str, expect: TimestampRange) {
let _ = exec_selection(self.engine.clone(), sql).await;
let mut filters = self.get_filters();
let mut filters = self.take_filters();

let range = build_time_range_predicate("ts", TimeUnit::Millisecond, &mut filters);
assert_eq!(expect, range);
}

fn get_filters(&self) -> Vec<Expr> {
self.filter.write().unwrap().drain(..).collect()
fn take_filters(&self) -> Vec<Expr> {
std::mem::take(&mut self.filter.write().unwrap())
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/table/src/table/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use std::sync::{Arc, Mutex};

use common_query::logical_plan::Expr;
use common_recordbatch::OrderOption;
use common_telemetry::info;
use datafusion::arrow::datatypes::SchemaRef as DfSchemaRef;
use datafusion::datasource::{TableProvider, TableType as DfTableType};
use datafusion::error::Result as DfResult;
Expand Down Expand Up @@ -86,7 +85,6 @@ impl TableProvider for DfTableProviderAdapter {
limit: Option<usize>,
) -> DfResult<Arc<dyn ExecutionPlan>> {
let filters: Vec<Expr> = filters.iter().map(Clone::clone).map(Into::into).collect();
info!("Filters: {:?}", filters);
let request = {
let mut request = self.scan_req.lock().unwrap();
request.filters = filters;
Expand Down

0 comments on commit 0faa6af

Please sign in to comment.