refactor: add macro tto compare output of explains
parent
aa867601e5
commit
60ad929721
|
@ -147,7 +147,6 @@ impl IOxExecutionContext {
|
|||
pub fn prepare_sql(&mut self, sql: &str) -> Result<Arc<dyn ExecutionPlan>> {
|
||||
debug!(text=%sql, "SQL");
|
||||
let logical_plan = self.inner.sql(sql)?.to_logical_plan();
|
||||
|
||||
self.prepare_plan(&logical_plan)
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ use datafusion::{
|
|||
physical_plan::ExecutionPlan,
|
||||
};
|
||||
use internal_types::schema::{builder::SchemaMerger, Schema};
|
||||
use observability_deps::tracing::debug;
|
||||
|
||||
use crate::{predicate::PredicateBuilder, util::project_schema, PartitionChunk};
|
||||
|
||||
|
@ -198,8 +199,7 @@ impl<C: PartitionChunk + 'static> TableProvider for ChunkTableProvider<C> {
|
|||
filters: &[Expr],
|
||||
_limit: Option<usize>,
|
||||
) -> std::result::Result<Arc<dyn ExecutionPlan>, DataFusionError> {
|
||||
|
||||
println!(" ----- Input Filters to Scan: {:#?}", filters);
|
||||
debug!("Input Filters to Scan: {:#?}", filters);
|
||||
|
||||
// Note that `filters` don't actually need to be evaluated in
|
||||
// the scan for the plans to be correct, they are an extra
|
||||
|
|
|
@ -287,7 +287,7 @@ impl PartitionChunk for DbChunk {
|
|||
// Predicate is not required to be applied for correctness. We only pushed it down
|
||||
// when possible for performance gain
|
||||
|
||||
println!(" ----- Input Predicate to read_filter: {:#?}", predicate);
|
||||
debug!("Input Predicate to read_filter: {:#?}", predicate);
|
||||
|
||||
match &self.state {
|
||||
State::MutableBuffer { chunk, .. } => {
|
||||
|
|
|
@ -613,9 +613,8 @@ async fn sql_predicate_pushdown_correctness() {
|
|||
&expected
|
||||
);
|
||||
|
||||
// Test 11: three push-down expression: system > 5.0 and town != 'tewsbury' and system < 7.0
|
||||
// After DF ticket, https://github.com/apache/arrow-datafusion/issues/383 is done,
|
||||
// there will be more pushed-down predicate time > to_timestamp('1970-01-01T00:00:00.000000120+00:00')
|
||||
// Test 11: three push-down expression: system > 5.0 and town != 'tewsbury' and system < 7.0 and
|
||||
// time > to_timestamp('1970-01-01T00:00:00.000000120+00:00') rewritten to time GT INT(130)
|
||||
let expected = vec!["++", "++"];
|
||||
run_sql_test_case!(
|
||||
TwoMeasurementsPredicatePushDown {},
|
||||
|
@ -933,9 +932,8 @@ async fn sql_predicate_pushdown_explain() {
|
|||
&expected
|
||||
);
|
||||
|
||||
// Test 11: three push-down expression: system > 5.0 and town != 'tewsbury' and system < 7.0
|
||||
// After DF ticket, https://github.com/apache/arrow-datafusion/issues/383 is done,
|
||||
// there will be more pushed-down predicate time > to_timestamp('1970-01-01T00:00:00.000000120+00:00')
|
||||
// Test 11: four push-down expression: system > 5.0 and town != 'tewsbury' and system < 7.0 and
|
||||
// time > to_timestamp('1970-01-01T00:00:00.000000120+00:00') rewritten to time GT INT(130)
|
||||
let expected = vec![
|
||||
"+-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+",
|
||||
"| plan_type | plan |",
|
||||
|
|
Loading…
Reference in New Issue