From e7a1312b0b264603a5344bf7787082b54e0b6fdb Mon Sep 17 00:00:00 2001 From: Andres Senac Date: Fri, 5 Jan 2024 01:28:41 +0100 Subject: [PATCH] Get rid of CorrelationId, use context offset instead --- src/query_graph/explain.rs | 3 +- src/query_graph/json.rs | 3 +- src/query_graph/mod.rs | 13 -- .../properties/correlated_input_refs.rs | 76 +++---- src/scalar_expr/mod.rs | 41 ++-- src/scalar_expr/rewrite.rs | 42 ++-- tests/explain_test.rs | 44 +--- tests/testdata/explain/apply.test | 120 +++++------ tests/testdata/explain/correlated_filter.test | 204 ++++++++---------- .../testdata/explain/correlated_project.test | 58 ++--- 10 files changed, 262 insertions(+), 342 deletions(-) diff --git a/src/query_graph/explain.rs b/src/query_graph/explain.rs index 4dd0d9a..74ba6eb 100644 --- a/src/query_graph/explain.rs +++ b/src/query_graph/explain.rs @@ -170,10 +170,9 @@ impl<'a> QueryGraphPrePostVisitor for ExplainVisitor<'a> { .. } => { format!( - "{}{} Apply correlation_id: {}, parameters: [{}]\n", + "{}{} Apply parameters: [{}]\n", prefix, apply_type, - correlation.correlation_id.0, explain_scalar_expr_vec(&correlation.parameters), ) } diff --git a/src/query_graph/json.rs b/src/query_graph/json.rs index f4e16f2..5ae5ded 100644 --- a/src/query_graph/json.rs +++ b/src/query_graph/json.rs @@ -117,10 +117,9 @@ impl<'a> QueryGraphPrePostVisitor for JsonSerializer<'a> { .. } => { format!( - "{}{} Apply correlation_id: {}, parameters: [{}]", + "{}{} Apply parameters: [{}]", prefix, apply_type, - correlation.correlation_id.0, explain_scalar_expr_vec(&correlation.parameters), ) } diff --git a/src/query_graph/mod.rs b/src/query_graph/mod.rs index b1dec48..f9d3f78 100644 --- a/src/query_graph/mod.rs +++ b/src/query_graph/mod.rs @@ -26,9 +26,6 @@ pub mod visitor; pub type NodeId = usize; -#[derive(Clone, PartialEq, Eq, Copy, Hash, PartialOrd, Ord, Debug)] -pub struct CorrelationId(pub usize); - #[derive(Clone, PartialEq, Eq, Copy)] pub enum JoinType { Inner, @@ -49,7 +46,6 @@ pub enum ApplyType { #[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Debug)] pub struct CorrelationContext { - pub correlation_id: CorrelationId, pub parameters: Vec>, } @@ -106,7 +102,6 @@ pub struct QueryGraph { parents: HashMap>, /// Subqueries subqueries: Vec, - next_correlation_id: CorrelationId, /// Keeps track of the number of node replacements the query graph has gone through. pub gen_number: usize, pub property_cache: RefCell, @@ -233,7 +228,6 @@ impl QueryGraph { gen_number: 0, parents: HashMap::new(), subqueries: Vec::new(), - next_correlation_id: CorrelationId(0), property_cache: RefCell::new(PropertyCache::new()), } } @@ -281,12 +275,6 @@ impl QueryGraph { self.subqueries.iter().map(|root_id| *root_id).collect_vec() } - pub fn new_correlation_id(&mut self) -> CorrelationId { - let result = self.next_correlation_id; - self.next_correlation_id = CorrelationId(result.0 + 1); - result - } - /// Finds whether there is an existing node exactly like the given one. fn find_node(&self, node: &QueryNode) -> Option { self.nodes.iter().find_map(|(node_id, existing_node)| { @@ -464,7 +452,6 @@ impl Clone for QueryGraph { gen_number: self.gen_number, parents: self.parents.clone(), subqueries: self.subqueries.clone(), - next_correlation_id: self.next_correlation_id, // Cached metadata is not cloned property_cache: RefCell::new(PropertyCache::new()), } diff --git a/src/query_graph/properties/correlated_input_refs.rs b/src/query_graph/properties/correlated_input_refs.rs index 5635fc3..686dd8b 100644 --- a/src/query_graph/properties/correlated_input_refs.rs +++ b/src/query_graph/properties/correlated_input_refs.rs @@ -7,9 +7,7 @@ use std::{ use itertools::Itertools; use crate::{ - query_graph::{ - visitor::QueryGraphPrePostVisitor, CorrelationId, NodeId, QueryGraph, QueryNode, - }, + query_graph::{visitor::QueryGraphPrePostVisitor, NodeId, QueryGraph, QueryNode}, scalar_expr::{visitor::visit_expr_pre, ScalarExpr}, visitor_utils::PreOrderVisitationResult, }; @@ -20,7 +18,7 @@ struct CorrelatedInputRefsTag; pub fn node_correlated_input_refs( query_graph: &QueryGraph, node_id: NodeId, -) -> Rc>> { +) -> Rc>> { let type_id = TypeId::of::(); if let Some(cached) = query_graph .property_cache @@ -29,7 +27,7 @@ pub fn node_correlated_input_refs( .get(&type_id) { return cached - .downcast_ref::>>>() + .downcast_ref::>>>() .unwrap() .clone(); } @@ -39,12 +37,12 @@ pub fn node_correlated_input_refs( visit_expr_pre(expr, &mut |curr_expr| { match curr_expr.as_ref() { ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset, index, .. } => { correlated_cols - .entry(*correlation_id) + .entry(*context_offset) .or_insert_with(|| BTreeSet::new()) .insert(*index); } @@ -53,21 +51,23 @@ pub fn node_correlated_input_refs( | ScalarExpr::ScalarSubqueryCmp { subquery, .. } => { let subquery_correlated_input_refs = subgraph_correlated_input_refs(query_graph, subquery.root); - merge_correlated_maps( - subquery_correlated_input_refs - .iter() - // Remove the references that correspond to parameters of the subquery - .filter(|(correlation_id, _)| { - subquery - .correlation - .as_ref() - .map(|correlation| { - correlation.correlation_id != **correlation_id - }) - .unwrap_or(false) - }), - &mut correlated_cols, - ); + if subquery.correlation.is_some() { + let subquery_external_correlated_input_refs = + subquery_correlated_input_refs + .iter() + .filter(|(offset, _)| **offset > 0) + .map(|(offset, columns)| (offset - 1, columns.clone())) + .collect::>>(); + merge_correlated_maps( + subquery_external_correlated_input_refs.iter(), + &mut correlated_cols, + ); + } else { + merge_correlated_maps( + subquery_correlated_input_refs.iter(), + &mut correlated_cols, + ); + } } _ => (), } @@ -90,7 +90,7 @@ pub fn node_correlated_input_refs( pub fn subgraph_correlated_input_refs( query_graph: &QueryGraph, node_id: NodeId, -) -> Rc>> { +) -> Rc>> { SubgraphCorrelatedInputRefs::subgraph_correlated_input_refs(query_graph, node_id) } @@ -102,10 +102,10 @@ pub fn subgraph_correlated_input_refs_annotator( let correlated_cols = correlated_cols .iter() .sorted() - .map(|(correlation_id, columns)| { + .map(|(offset, columns)| { columns .iter() - .map(|column| format!("cor_{}.ref_{}", correlation_id.0, column)) + .map(|column| format!("ctx_{}.ref_{}", *offset, column)) }) .flatten() .join(", "); @@ -122,7 +122,7 @@ impl SubgraphCorrelatedInputRefs { fn subgraph_correlated_input_refs( query_graph: &QueryGraph, node_id: NodeId, - ) -> Rc>> { + ) -> Rc>> { let mut visitor = SubgraphCorrelatedInputRefs {}; query_graph.visit_subgraph(&mut visitor, node_id); visitor.subgraph_correlated_input_refs_unchecked(query_graph, node_id) @@ -132,14 +132,14 @@ impl SubgraphCorrelatedInputRefs { &self, query_graph: &QueryGraph, node_id: NodeId, - ) -> Rc>> { + ) -> Rc>> { query_graph .property_cache .borrow_mut() .node_bottom_up_properties(node_id) .get(&Self::metadata_type_id()) .unwrap() - .downcast_ref::>>>() + .downcast_ref::>>>() .unwrap() .clone() } @@ -152,9 +152,9 @@ impl SubgraphCorrelatedInputRefs { &self, query_graph: &QueryGraph, node_id: NodeId, - ) -> Rc>> { + ) -> Rc>> { // The correlated input refs in the node itself... - let mut correlated_cols: HashMap> = + let mut correlated_cols: HashMap> = node_correlated_input_refs(query_graph, node_id) .as_ref() .clone(); @@ -166,8 +166,12 @@ impl SubgraphCorrelatedInputRefs { merge_correlated_maps(input_correlated_cols.iter(), &mut correlated_cols); } //... but remove ones in the correlation scope the node defines. - if let QueryNode::Apply { correlation, .. } = &query_node { - correlated_cols.remove(&correlation.correlation_id); + if let QueryNode::Apply { .. } = &query_node { + correlated_cols = correlated_cols + .into_iter() + .filter(|(offset, _)| *offset > 0) + .map(|(offset, columns)| (offset - 1, columns)) + .collect(); } Rc::new(correlated_cols) } @@ -204,12 +208,12 @@ impl QueryGraphPrePostVisitor for SubgraphCorrelatedInputRefs { } } -fn merge_correlated_maps<'a, I>(src: I, dst: &mut HashMap>) +fn merge_correlated_maps<'a, I>(src: I, dst: &mut HashMap>) where - I: Iterator)>, + I: Iterator)>, { - for (correlation_id, columns) in src { - dst.entry(*correlation_id) + for (context_offset, columns) in src { + dst.entry(*context_offset) .or_insert_with(|| BTreeSet::new()) .extend(columns.iter()); } diff --git a/src/scalar_expr/mod.rs b/src/scalar_expr/mod.rs index 970b5be..c4d3c10 100644 --- a/src/scalar_expr/mod.rs +++ b/src/scalar_expr/mod.rs @@ -7,7 +7,7 @@ use itertools::Itertools; use crate::{ data_type::DataType, - query_graph::{CorrelationContext, CorrelationId, NodeId, QueryGraph}, + query_graph::{CorrelationContext, NodeId, QueryGraph}, value::{Literal, Value}, visitor_utils::PostOrderVisitationResult, }; @@ -94,7 +94,9 @@ pub enum ScalarExpr { subquery: Subquery, }, CorrelatedInputRef { - correlation_id: CorrelationId, + /// The offset of the correlated context, with 0 being the closet one. + context_offset: usize, + /// The index of the parameter of the correlated context. index: usize, data_type: DataType, }, @@ -315,9 +317,8 @@ impl fmt::Display for Subquery if let Some(correlation) = self.correlation.as_ref() { write!( f, - "correlated_subquery(node: {}, correlation_id: {}, parameters: [{}])", + "correlated_subquery(node: {}, parameters: [{}])", self.root, - correlation.correlation_id.0, correlation .parameters .iter() @@ -357,10 +358,10 @@ impl fmt::Display for ScalarExpr { subquery, } => write!(f, "{}({}, {})", op, scalar_operand, subquery), ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset, index, .. - } => write!(f, "cor_{}.ref_{}", correlation_id.0, index), + } => write!(f, "ctx_{}.ref_{}", context_offset, index), } } } @@ -471,7 +472,7 @@ pub enum ExtendedScalarExpr { subquery: Subquery, }, CorrelatedInputRef { - correlation_id: CorrelationId, + context_offset: usize, index: usize, data_type: DataType, }, @@ -577,9 +578,8 @@ impl ToScalarExpr for Rc { ScalarExpr::ScalarSubquery { subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { + correlation: subquery.correlation.as_ref().map(|_| { CorrelationContext { - correlation_id: correlation.correlation_id, parameters: operands, } }), @@ -600,9 +600,8 @@ impl ToScalarExpr for Rc { ScalarExpr::ExistsSubquery { subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { + correlation: subquery.correlation.as_ref().map(|_| { CorrelationContext { - correlation_id: correlation.correlation_id, parameters: operands, } }), @@ -630,9 +629,8 @@ impl ToScalarExpr for Rc { scalar_operand, subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { + correlation: subquery.correlation.as_ref().map(|_| { CorrelationContext { - correlation_id: correlation.correlation_id, parameters: operands, } }), @@ -641,11 +639,11 @@ impl ToScalarExpr for Rc { expr } ExtendedScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset, index, data_type, } => ScalarExpr::CorrelatedInputRef { - correlation_id: *correlation_id, + context_offset: *context_offset, index: *index, data_type: data_type.clone(), }, @@ -705,9 +703,8 @@ impl ToExtendedExpr for Rc { ExtendedScalarExpr::ScalarSubquery { subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { + correlation: subquery.correlation.as_ref().map(|_| { CorrelationContext { - correlation_id: correlation.correlation_id, parameters: operands, } }), @@ -728,9 +725,8 @@ impl ToExtendedExpr for Rc { ExtendedScalarExpr::ExistsSubquery { subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { + correlation: subquery.correlation.as_ref().map(|_| { CorrelationContext { - correlation_id: correlation.correlation_id, parameters: operands, } }), @@ -758,9 +754,8 @@ impl ToExtendedExpr for Rc { scalar_operand, subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { + correlation: subquery.correlation.as_ref().map(|_| { CorrelationContext { - correlation_id: correlation.correlation_id, parameters: operands, } }), @@ -769,11 +764,11 @@ impl ToExtendedExpr for Rc { expr } ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset, index, data_type, } => ExtendedScalarExpr::CorrelatedInputRef { - correlation_id: *correlation_id, + context_offset: *context_offset, index: *index, data_type: data_type.clone(), }, diff --git a/src/scalar_expr/rewrite.rs b/src/scalar_expr/rewrite.rs index af26146..4ba42a2 100644 --- a/src/scalar_expr/rewrite.rs +++ b/src/scalar_expr/rewrite.rs @@ -427,22 +427,16 @@ impl RewritableExpr for ScalarExpr { ScalarExpr::ExistsSubquery { subquery } => ScalarExpr::ExistsSubquery { subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { - CorrelationContext { - correlation_id: correlation.correlation_id, - parameters: inputs.iter().cloned().collect_vec(), - } + correlation: subquery.correlation.as_ref().map(|_| CorrelationContext { + parameters: inputs.iter().cloned().collect_vec(), }), }, }, ScalarExpr::ScalarSubquery { subquery } => ScalarExpr::ScalarSubquery { subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { - CorrelationContext { - correlation_id: correlation.correlation_id, - parameters: inputs.iter().cloned().collect_vec(), - } + correlation: subquery.correlation.as_ref().map(|_| CorrelationContext { + parameters: inputs.iter().cloned().collect_vec(), }), }, }, @@ -455,11 +449,8 @@ impl RewritableExpr for ScalarExpr { scalar_operand: inputs[0].clone(), subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { - CorrelationContext { - correlation_id: correlation.correlation_id, - parameters: inputs.iter().skip(1).cloned().collect_vec(), - } + correlation: subquery.correlation.as_ref().map(|_| CorrelationContext { + parameters: inputs.iter().skip(1).cloned().collect_vec(), }), }, }, @@ -491,22 +482,16 @@ impl RewritableExpr for ExtendedScalarExpr { ExtendedScalarExpr::ExistsSubquery { subquery } => ExtendedScalarExpr::ExistsSubquery { subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { - CorrelationContext { - correlation_id: correlation.correlation_id, - parameters: inputs.iter().cloned().collect_vec(), - } + correlation: subquery.correlation.as_ref().map(|_| CorrelationContext { + parameters: inputs.iter().cloned().collect_vec(), }), }, }, ExtendedScalarExpr::ScalarSubquery { subquery } => ExtendedScalarExpr::ScalarSubquery { subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { - CorrelationContext { - correlation_id: correlation.correlation_id, - parameters: inputs.iter().cloned().collect_vec(), - } + correlation: subquery.correlation.as_ref().map(|_| CorrelationContext { + parameters: inputs.iter().cloned().collect_vec(), }), }, }, @@ -519,11 +504,8 @@ impl RewritableExpr for ExtendedScalarExpr { scalar_operand: inputs[0].clone(), subquery: Subquery { root: subquery.root, - correlation: subquery.correlation.as_ref().map(|correlation| { - CorrelationContext { - correlation_id: correlation.correlation_id, - parameters: inputs.iter().skip(1).cloned().collect_vec(), - } + correlation: subquery.correlation.as_ref().map(|_| CorrelationContext { + parameters: inputs.iter().skip(1).cloned().collect_vec(), }), }, }, diff --git a/tests/explain_test.rs b/tests/explain_test.rs index 6ec40df..ae3d9eb 100644 --- a/tests/explain_test.rs +++ b/tests/explain_test.rs @@ -1677,14 +1677,13 @@ mod test_queries { queries.insert("left_apply_1".to_string(), { let mut query_graph = QueryGraph::new(); let table_scan_1 = query_graph.table_scan(1, 5); - let correlation_id = query_graph.new_correlation_id(); let filter_1 = query_graph.filter( table_scan_1, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -1695,7 +1694,6 @@ mod test_queries { let table_scan_2 = query_graph.table_scan(2, 5); let apply_1 = query_graph.add_node(QueryNode::Apply { correlation: CorrelationContext { - correlation_id, parameters: vec![ScalarExpr::input_ref(1).into()], }, left: table_scan_2, @@ -1721,8 +1719,6 @@ mod test_queries { queries.insert("nested_apply_1".to_string(), { let mut query_graph = QueryGraph::new(); let table_scan_1 = query_graph.table_scan(1, 5); - let correlation_id_1 = query_graph.new_correlation_id(); - let correlation_id_2 = query_graph.new_correlation_id(); let filter_1 = query_graph.filter( table_scan_1, vec![ @@ -1730,7 +1726,7 @@ mod test_queries { .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id: correlation_id_1, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -1741,7 +1737,7 @@ mod test_queries { .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id: correlation_id_2, + context_offset: 1, index: 0, data_type: DataType::String, } @@ -1753,7 +1749,6 @@ mod test_queries { let table_scan_2 = query_graph.table_scan(2, 5); let apply_1 = query_graph.add_node(QueryNode::Apply { correlation: CorrelationContext { - correlation_id: correlation_id_1, parameters: vec![ScalarExpr::input_ref(1).into()], }, left: table_scan_2, @@ -1763,7 +1758,6 @@ mod test_queries { let table_scan_3 = query_graph.table_scan(3, 5); let apply_2 = query_graph.add_node(QueryNode::Apply { correlation: CorrelationContext { - correlation_id: correlation_id_2, parameters: vec![ScalarExpr::input_ref(3).into()], }, left: table_scan_3, @@ -1792,14 +1786,13 @@ mod test_queries { queries.insert("correlated_filter_1".to_string(), { let mut query_graph = QueryGraph::new(); let table_scan_1 = query_graph.table_scan(1, 5); - let correlation_id = query_graph.new_correlation_id(); let filter_1 = query_graph.filter( table_scan_1, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -1815,7 +1808,6 @@ mod test_queries { subquery: Subquery { root: subquery_root, correlation: Some(CorrelationContext { - correlation_id, parameters: vec![ScalarExpr::input_ref(1).into()], }), }, @@ -1828,14 +1820,13 @@ mod test_queries { queries.insert("correlated_filter_2".to_string(), { let mut query_graph = QueryGraph::new(); let table_scan_1 = query_graph.table_scan(1, 5); - let correlation_id = query_graph.new_correlation_id(); let filter_1 = query_graph.filter( table_scan_1, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -1851,7 +1842,6 @@ mod test_queries { subquery: Subquery { root: subquery_root, correlation: Some(CorrelationContext { - correlation_id: correlation_id, parameters: vec![ScalarExpr::input_ref(1).into()], }), }, @@ -1859,14 +1849,13 @@ mod test_queries { .into()], ); let table_scan_3 = query_graph.table_scan(3, 5); - let correlation_id_2 = query_graph.new_correlation_id(); let filter_3 = query_graph.filter( table_scan_3, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id: correlation_id_2, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -1881,7 +1870,6 @@ mod test_queries { subquery: Subquery { root: subquery_root_2, correlation: Some(CorrelationContext { - correlation_id: correlation_id_2, parameters: vec![ScalarExpr::input_ref(1).into()], }), }, @@ -1894,14 +1882,13 @@ mod test_queries { queries.insert("correlated_filter_3".to_string(), { let mut query_graph = QueryGraph::new(); let table_scan_1 = query_graph.table_scan(1, 5); - let correlation_id = query_graph.new_correlation_id(); let filter_1 = query_graph.filter( table_scan_1, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -1917,21 +1904,19 @@ mod test_queries { subquery: Subquery { root: subquery_root, correlation: Some(CorrelationContext { - correlation_id: correlation_id, parameters: vec![ScalarExpr::input_ref(1).into()], }), }, } .into()], ); - let correlation_id_2 = query_graph.new_correlation_id(); let filter_3 = query_graph.filter( table_scan_1, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id: correlation_id_2, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -1946,7 +1931,6 @@ mod test_queries { subquery: Subquery { root: subquery_root_2, correlation: Some(CorrelationContext { - correlation_id: correlation_id_2, parameters: vec![ScalarExpr::input_ref(1).into()], }), }, @@ -1959,14 +1943,13 @@ mod test_queries { queries.insert("correlated_filter_pruning".to_string(), { let mut query_graph = QueryGraph::new(); let table_scan_1 = query_graph.table_scan(1, 5); - let correlation_id = query_graph.new_correlation_id(); let filter_1 = query_graph.filter( table_scan_1, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -1985,7 +1968,6 @@ mod test_queries { subquery: Subquery { root: subquery_root, correlation: Some(CorrelationContext { - correlation_id: correlation_id, parameters: vec![ScalarExpr::input_ref(1).into()], }), }, @@ -2002,14 +1984,13 @@ mod test_queries { queries.insert("correlated_project_1".to_string(), { let mut query_graph = QueryGraph::new(); let table_scan_1 = query_graph.table_scan(1, 5); - let correlation_id = query_graph.new_correlation_id(); let filter_1 = query_graph.filter( table_scan_1, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -2025,7 +2006,6 @@ mod test_queries { subquery: Subquery { root: subquery_root, correlation: Some(CorrelationContext { - correlation_id, parameters: vec![ScalarExpr::input_ref(1).into()], }), }, @@ -2038,14 +2018,13 @@ mod test_queries { queries.insert("correlated_project_pruning".to_string(), { let mut query_graph = QueryGraph::new(); let table_scan_1 = query_graph.table_scan(1, 5); - let correlation_id = query_graph.new_correlation_id(); let filter_1 = query_graph.filter( table_scan_1, vec![ScalarExpr::input_ref(0) .binary( BinaryOp::Eq, ScalarExpr::CorrelatedInputRef { - correlation_id, + context_offset: 0, index: 0, data_type: DataType::String, } @@ -2064,7 +2043,6 @@ mod test_queries { subquery: Subquery { root: subquery_root, correlation: Some(CorrelationContext { - correlation_id, parameters: vec![ScalarExpr::input_ref(1).into()], }), }, diff --git a/tests/testdata/explain/apply.test b/tests/testdata/explain/apply.test index 69c6ab0..0a29397 100644 --- a/tests/testdata/explain/apply.test +++ b/tests/testdata/explain/apply.test @@ -2,17 +2,17 @@ run left_apply_1 ---- ---- -[3] Left Outer Apply correlation_id: 0, parameters: [ref_1] +[3] Left Outer Apply parameters: [ref_1] - Num Columns: 10 - Row Type: string, string, string, string, string, string, string, string, string, string [2] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string - [1] Filter [eq(ref_0, cor_0.ref_0)] + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -22,24 +22,24 @@ Optimized: [4] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9] - Num Columns: 10 - Row Type: string, string, string, string, string, string, string, string, string, string - [3] Left Outer Apply correlation_id: 0, parameters: [ref_1] + [3] Left Outer Apply parameters: [ref_1] - Num Columns: 10 - Row Type: string, string, string, string, string, string, string, string, string, string [2] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string - [1] Filter [eq(ref_0, cor_0.ref_0)] + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} -step TopProjectionRule {"nodes":[{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"4","label":"[4] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]}],"edges":[{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"4","to":"3","label":"input 0"},{"from":"3","to":"4","label":"TopProjectionRule"}]} -final {"nodes":[{"id":"4","label":"[4] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} +step TopProjectionRule {"nodes":[{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"4","label":"[4] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]}],"edges":[{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"4","to":"3","label":"input 0"},{"from":"3","to":"4","label":"TopProjectionRule"}]} +final {"nodes":[{"id":"4","label":"[4] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} ---- ---- @@ -47,24 +47,24 @@ run nested_apply_1 ---- ---- -[5] Inner Apply correlation_id: 1, parameters: [ref_3] +[5] Inner Apply parameters: [ref_3] - Num Columns: 15 - Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string [4] TableScan id: 3 - Num Columns: 5 - Row Type: string, string, string, string, string - [3] Left Outer Apply correlation_id: 0, parameters: [ref_1] + [3] Left Outer Apply parameters: [ref_1] - Num Columns: 10 - Row Type: string, string, string, string, string, string, string, string, string, string - - Correlated References: cor_1.ref_0 + - Correlated References: ctx_0.ref_0 [2] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string - [1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)] + [1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0) - - Correlated References: cor_0.ref_0, cor_1.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0) + - Correlated References: ctx_0.ref_0, ctx_1.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -74,31 +74,31 @@ Optimized: [6] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9, ref_10, ref_11, ref_12, ref_13, ref_14] - Num Columns: 15 - Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string - [5] Inner Apply correlation_id: 1, parameters: [ref_3] + [5] Inner Apply parameters: [ref_3] - Num Columns: 15 - Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string [4] TableScan id: 3 - Num Columns: 5 - Row Type: string, string, string, string, string - [3] Left Outer Apply correlation_id: 0, parameters: [ref_1] + [3] Left Outer Apply parameters: [ref_1] - Num Columns: 10 - Row Type: string, string, string, string, string, string, string, string, string, string - - Correlated References: cor_1.ref_0 + - Correlated References: ctx_0.ref_0 [2] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string - [1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)] + [1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0) - - Correlated References: cor_0.ref_0, cor_1.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0) + - Correlated References: ctx_0.ref_0, ctx_1.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"5","label":"[5] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} -step TopProjectionRule {"nodes":[{"id":"5","label":"[5] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9, ref_10, ref_11, ref_12, ref_13, ref_14]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"6","label":"TopProjectionRule"}]} -final {"nodes":[{"id":"6","label":"[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9, ref_10, ref_11, ref_12, ref_13, ref_14]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"5","label":"[5] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"5","label":"[5] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} +step TopProjectionRule {"nodes":[{"id":"5","label":"[5] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9, ref_10, ref_11, ref_12, ref_13, ref_14]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"6","label":"TopProjectionRule"}]} +final {"nodes":[{"id":"6","label":"[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4, ref_5, ref_6, ref_7, ref_8, ref_9, ref_10, ref_11, ref_12, ref_13, ref_14]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"5","label":"[5] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} ---- ---- @@ -109,17 +109,17 @@ left_apply_2 [4] Project [ref_4, ref_6, ref_7] - Num Columns: 3 - Row Type: string, string, string - [3] Left Outer Apply correlation_id: 0, parameters: [ref_1] + [3] Left Outer Apply parameters: [ref_1] - Num Columns: 10 - Row Type: string, string, string, string, string, string, string, string, string, string [2] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string - [1] Filter [eq(ref_0, cor_0.ref_0)] + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -129,7 +129,7 @@ Optimized: [12] Project [ref_0, ref_1, ref_2] - Num Columns: 3 - Row Type: string, string, string - [11] Left Outer Apply correlation_id: 0, parameters: [ref_1] + [11] Left Outer Apply parameters: [ref_1] - Num Columns: 3 - Row Type: string, string, string [13] Project [ref_4] @@ -141,22 +141,22 @@ Optimized: [6] Project [ref_1, ref_2] - Num Columns: 2 - Row Type: string, string - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"4","label":"[4] Project [ref_4, ref_6, ref_7]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} -step ApplyPruningRule {"nodes":[{"id":"4","label":"[4] Project [ref_4, ref_6, ref_7]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"8","label":"[8] Project [ref_1, ref_2, ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"7","label":"[7] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 4","Row Type: string, string, string, string"]},{"id":"5","label":"[5] Project [ref_1, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_0.ref_0"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"8","to":"7","label":"input 0"},{"from":"7","to":"5","label":"input 0"},{"from":"7","to":"6","label":"input 1"},{"from":"5","to":"2","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"4","to":"8","label":"ApplyPruningRule"}]} -step ApplyPruningRule {"nodes":[{"id":"8","label":"[8] Project [ref_1, ref_2, ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"7","label":"[7] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 4","Row Type: string, string, string, string"]},{"id":"5","label":"[5] Project [ref_1, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"12","label":"[12] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"9","label":"[9] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"10","label":"[10] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_0.ref_0"]}],"edges":[{"from":"8","to":"7","label":"input 0"},{"from":"7","to":"5","label":"input 0"},{"from":"7","to":"6","label":"input 1"},{"from":"5","to":"2","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"12","to":"11","label":"input 0"},{"from":"11","to":"9","label":"input 0"},{"from":"11","to":"10","label":"input 1"},{"from":"9","to":"5","label":"input 0"},{"from":"10","to":"6","label":"input 0"},{"from":"8","to":"12","label":"ApplyPruningRule"}]} -step ProjectMergeRule {"nodes":[{"id":"12","label":"[12] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"9","label":"[9] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"5","label":"[5] Project [ref_1, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_0.ref_0"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"13","label":"[13] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]}],"edges":[{"from":"12","to":"11","label":"input 0"},{"from":"11","to":"9","label":"input 0"},{"from":"11","to":"10","label":"input 1"},{"from":"9","to":"5","label":"input 0"},{"from":"5","to":"2","label":"input 0"},{"from":"10","to":"6","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"13","to":"2","label":"input 0"},{"from":"9","to":"13","label":"ProjectMergeRule"}]} -step ProjectMergeRule {"nodes":[{"id":"12","label":"[12] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_0.ref_0"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"12","to":"11","label":"input 0"},{"from":"11","to":"13","label":"input 0"},{"from":"11","to":"10","label":"input 1"},{"from":"13","to":"2","label":"input 0"},{"from":"10","to":"6","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"10","to":"6","label":"ProjectMergeRule"}]} -final {"nodes":[{"id":"12","label":"[12] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"12","to":"11","label":"input 0"},{"from":"11","to":"13","label":"input 0"},{"from":"11","to":"6","label":"input 1"},{"from":"13","to":"2","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"4","label":"[4] Project [ref_4, ref_6, ref_7]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} +step ApplyPruningRule {"nodes":[{"id":"4","label":"[4] Project [ref_4, ref_6, ref_7]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"8","label":"[8] Project [ref_1, ref_2, ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"7","label":"[7] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 4","Row Type: string, string, string, string"]},{"id":"5","label":"[5] Project [ref_1, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"8","to":"7","label":"input 0"},{"from":"7","to":"5","label":"input 0"},{"from":"7","to":"6","label":"input 1"},{"from":"5","to":"2","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"4","to":"8","label":"ApplyPruningRule"}]} +step ApplyPruningRule {"nodes":[{"id":"8","label":"[8] Project [ref_1, ref_2, ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"7","label":"[7] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 4","Row Type: string, string, string, string"]},{"id":"5","label":"[5] Project [ref_1, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"12","label":"[12] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"9","label":"[9] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"10","label":"[10] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]}],"edges":[{"from":"8","to":"7","label":"input 0"},{"from":"7","to":"5","label":"input 0"},{"from":"7","to":"6","label":"input 1"},{"from":"5","to":"2","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"12","to":"11","label":"input 0"},{"from":"11","to":"9","label":"input 0"},{"from":"11","to":"10","label":"input 1"},{"from":"9","to":"5","label":"input 0"},{"from":"10","to":"6","label":"input 0"},{"from":"8","to":"12","label":"ApplyPruningRule"}]} +step ProjectMergeRule {"nodes":[{"id":"12","label":"[12] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"9","label":"[9] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"5","label":"[5] Project [ref_1, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"13","label":"[13] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]}],"edges":[{"from":"12","to":"11","label":"input 0"},{"from":"11","to":"9","label":"input 0"},{"from":"11","to":"10","label":"input 1"},{"from":"9","to":"5","label":"input 0"},{"from":"5","to":"2","label":"input 0"},{"from":"10","to":"6","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"13","to":"2","label":"input 0"},{"from":"9","to":"13","label":"ProjectMergeRule"}]} +step ProjectMergeRule {"nodes":[{"id":"12","label":"[12] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"12","to":"11","label":"input 0"},{"from":"11","to":"13","label":"input 0"},{"from":"11","to":"10","label":"input 1"},{"from":"13","to":"2","label":"input 0"},{"from":"10","to":"6","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"10","to":"6","label":"ProjectMergeRule"}]} +final {"nodes":[{"id":"12","label":"[12] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"12","to":"11","label":"input 0"},{"from":"11","to":"13","label":"input 0"},{"from":"11","to":"6","label":"input 1"},{"from":"13","to":"2","label":"input 0"},{"from":"6","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} ---- ---- @@ -167,24 +167,24 @@ nested_apply_2 [6] Project [ref_4, ref_6, ref_7] - Num Columns: 3 - Row Type: string, string, string - [5] Inner Apply correlation_id: 1, parameters: [ref_3] + [5] Inner Apply parameters: [ref_3] - Num Columns: 15 - Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string [4] TableScan id: 3 - Num Columns: 5 - Row Type: string, string, string, string, string - [3] Left Outer Apply correlation_id: 0, parameters: [ref_1] + [3] Left Outer Apply parameters: [ref_1] - Num Columns: 10 - Row Type: string, string, string, string, string, string, string, string, string, string - - Correlated References: cor_1.ref_0 + - Correlated References: ctx_0.ref_0 [2] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string - [1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)] + [1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0) - - Correlated References: cor_0.ref_0, cor_1.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0) + - Correlated References: ctx_0.ref_0, ctx_1.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -194,7 +194,7 @@ Optimized: [14] Project [ref_0, ref_1, ref_2] - Num Columns: 3 - Row Type: string, string, string - [13] Inner Apply correlation_id: 1, parameters: [ref_3] + [13] Inner Apply parameters: [ref_3] - Num Columns: 3 - Row Type: string, string, string [15] Project [ref_4] @@ -206,28 +206,28 @@ Optimized: [8] Project [ref_1, ref_2] - Num Columns: 2 - Row Type: string, string - - Correlated References: cor_1.ref_0 - [3] Left Outer Apply correlation_id: 0, parameters: [ref_1] + - Correlated References: ctx_0.ref_0 + [3] Left Outer Apply parameters: [ref_1] - Num Columns: 10 - Row Type: string, string, string, string, string, string, string, string, string, string - - Correlated References: cor_1.ref_0 + - Correlated References: ctx_0.ref_0 [2] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string - [1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)] + [1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0) - - Correlated References: cor_0.ref_0, cor_1.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0) + - Correlated References: ctx_0.ref_0, ctx_1.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"6","label":"[6] Project [ref_4, ref_6, ref_7]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"5","label":"[5] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} -step ApplyPruningRule {"nodes":[{"id":"6","label":"[6] Project [ref_4, ref_6, ref_7]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"5","label":"[5] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Project [ref_1, ref_2, ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"9","label":"[9] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 4","Row Type: string, string, string, string"]},{"id":"7","label":"[7] Project [ref_3, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_1.ref_0"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"10","to":"9","label":"input 0"},{"from":"9","to":"7","label":"input 0"},{"from":"9","to":"8","label":"input 1"},{"from":"7","to":"4","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"6","to":"10","label":"ApplyPruningRule"}]} -step ApplyPruningRule {"nodes":[{"id":"10","label":"[10] Project [ref_1, ref_2, ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"9","label":"[9] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 4","Row Type: string, string, string, string"]},{"id":"7","label":"[7] Project [ref_3, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_1.ref_0"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"14","label":"[14] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"12","label":"[12] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_1.ref_0"]}],"edges":[{"from":"10","to":"9","label":"input 0"},{"from":"9","to":"7","label":"input 0"},{"from":"9","to":"8","label":"input 1"},{"from":"7","to":"4","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"14","to":"13","label":"input 0"},{"from":"13","to":"11","label":"input 0"},{"from":"13","to":"12","label":"input 1"},{"from":"11","to":"7","label":"input 0"},{"from":"12","to":"8","label":"input 0"},{"from":"10","to":"14","label":"ApplyPruningRule"}]} -step ProjectMergeRule {"nodes":[{"id":"14","label":"[14] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"7","label":"[7] Project [ref_3, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"12","label":"[12] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_1.ref_0"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_1.ref_0"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"15","label":"[15] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]}],"edges":[{"from":"14","to":"13","label":"input 0"},{"from":"13","to":"11","label":"input 0"},{"from":"13","to":"12","label":"input 1"},{"from":"11","to":"7","label":"input 0"},{"from":"7","to":"4","label":"input 0"},{"from":"12","to":"8","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"15","to":"4","label":"input 0"},{"from":"11","to":"15","label":"ProjectMergeRule"}]} -step ProjectMergeRule {"nodes":[{"id":"14","label":"[14] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"15","label":"[15] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"12","label":"[12] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_1.ref_0"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_1.ref_0"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"14","to":"13","label":"input 0"},{"from":"13","to":"15","label":"input 0"},{"from":"13","to":"12","label":"input 1"},{"from":"15","to":"4","label":"input 0"},{"from":"12","to":"8","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"12","to":"8","label":"ProjectMergeRule"}]} -final {"nodes":[{"id":"14","label":"[14] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Inner Apply correlation_id: 1, parameters: [ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"15","label":"[15] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: cor_1.ref_0"]},{"id":"3","label":"[3] Left Outer Apply correlation_id: 0, parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: cor_1.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0), eq(ref_1, cor_1.ref_0)","Correlated References: cor_0.ref_0, cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"14","to":"13","label":"input 0"},{"from":"13","to":"15","label":"input 0"},{"from":"13","to":"8","label":"input 1"},{"from":"15","to":"4","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"6","label":"[6] Project [ref_4, ref_6, ref_7]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"5","label":"[5] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} +step ApplyPruningRule {"nodes":[{"id":"6","label":"[6] Project [ref_4, ref_6, ref_7]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"5","label":"[5] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 15","Row Type: string, string, string, string, string, string, string, string, string, string, string, string, string, string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Project [ref_1, ref_2, ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"9","label":"[9] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 4","Row Type: string, string, string, string"]},{"id":"7","label":"[7] Project [ref_3, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"3","label":"input 1"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"10","to":"9","label":"input 0"},{"from":"9","to":"7","label":"input 0"},{"from":"9","to":"8","label":"input 1"},{"from":"7","to":"4","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"6","to":"10","label":"ApplyPruningRule"}]} +step ApplyPruningRule {"nodes":[{"id":"10","label":"[10] Project [ref_1, ref_2, ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"9","label":"[9] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 4","Row Type: string, string, string, string"]},{"id":"7","label":"[7] Project [ref_3, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"14","label":"[14] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"12","label":"[12] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]}],"edges":[{"from":"10","to":"9","label":"input 0"},{"from":"9","to":"7","label":"input 0"},{"from":"9","to":"8","label":"input 1"},{"from":"7","to":"4","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"14","to":"13","label":"input 0"},{"from":"13","to":"11","label":"input 0"},{"from":"13","to":"12","label":"input 1"},{"from":"11","to":"7","label":"input 0"},{"from":"12","to":"8","label":"input 0"},{"from":"10","to":"14","label":"ApplyPruningRule"}]} +step ProjectMergeRule {"nodes":[{"id":"14","label":"[14] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"11","label":"[11] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"7","label":"[7] Project [ref_3, ref_4]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"12","label":"[12] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"15","label":"[15] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]}],"edges":[{"from":"14","to":"13","label":"input 0"},{"from":"13","to":"11","label":"input 0"},{"from":"13","to":"12","label":"input 1"},{"from":"11","to":"7","label":"input 0"},{"from":"7","to":"4","label":"input 0"},{"from":"12","to":"8","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"15","to":"4","label":"input 0"},{"from":"11","to":"15","label":"ProjectMergeRule"}]} +step ProjectMergeRule {"nodes":[{"id":"14","label":"[14] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"15","label":"[15] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"12","label":"[12] Project [ref_0, ref_1]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"14","to":"13","label":"input 0"},{"from":"13","to":"15","label":"input 0"},{"from":"13","to":"12","label":"input 1"},{"from":"15","to":"4","label":"input 0"},{"from":"12","to":"8","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"},{"from":"12","to":"8","label":"ProjectMergeRule"}]} +final {"nodes":[{"id":"14","label":"[14] Project [ref_0, ref_1, ref_2]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"13","label":"[13] Inner Apply parameters: [ref_3]","annotations":["Num Columns: 3","Row Type: string, string, string"]},{"id":"15","label":"[15] Project [ref_4]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"4","label":"[4] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"8","label":"[8] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string","Correlated References: ctx_0.ref_0"]},{"id":"3","label":"[3] Left Outer Apply parameters: [ref_1]","annotations":["Num Columns: 10","Row Type: string, string, string, string, string, string, string, string, string, string","Correlated References: ctx_0.ref_0"]},{"id":"2","label":"[2] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0), eq(ref_1, ctx_1.ref_0)","Correlated References: ctx_0.ref_0, ctx_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"14","to":"13","label":"input 0"},{"from":"13","to":"15","label":"input 0"},{"from":"13","to":"8","label":"input 1"},{"from":"15","to":"4","label":"input 0"},{"from":"8","to":"3","label":"input 0"},{"from":"3","to":"2","label":"input 0"},{"from":"3","to":"1","label":"input 1"},{"from":"1","to":"0","label":"input 0"}]} ---- ---- diff --git a/tests/testdata/explain/correlated_filter.test b/tests/testdata/explain/correlated_filter.test index 4eff719..c33c9d3 100644 --- a/tests/testdata/explain/correlated_filter.test +++ b/tests/testdata/explain/correlated_filter.test @@ -2,10 +2,10 @@ run correlated_filter_1 ---- ---- -[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))] +[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])) + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) [3] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -13,13 +13,13 @@ correlated_filter_1 [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -29,11 +29,11 @@ Optimized: [5] Project [ref_0, ref_1, ref_2, ref_3, ref_4] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])) - [4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))] + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) + [4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])) + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) [3] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -41,20 +41,20 @@ Optimized: [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} -step TopProjectionRule {"nodes":[{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"5","label":"[5] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"4","to":"5","label":"TopProjectionRule"}]} -final {"nodes":[{"id":"5","label":"[5] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +step TopProjectionRule {"nodes":[{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"5","label":"[5] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"4","to":"5","label":"TopProjectionRule"}]} +final {"nodes":[{"id":"5","label":"[5] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} ---- ---- @@ -62,14 +62,14 @@ run correlated_filter_2 ---- ---- -[8] Filter [exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))] +[8] Filter [exists(correlated_subquery(node: 7, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1])) - [4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))] + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1])) + [4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])) + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) [3] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -77,13 +77,13 @@ correlated_filter_2 [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -91,13 +91,13 @@ correlated_filter_2 [7] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_1.ref_0) - - Correlated References: cor_1.ref_0 - [6] Filter [eq(ref_0, cor_1.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [6] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_1.ref_0) - - Correlated References: cor_1.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [5] TableScan id: 3 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -107,11 +107,11 @@ Optimized: [9] Project [ref_0, ref_1, ref_2, ref_3, ref_4] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1])) - [11] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))] + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1])) + [11] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1])) + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1])) [3] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -119,13 +119,13 @@ Optimized: [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -133,22 +133,22 @@ Optimized: [7] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_1.ref_0) - - Correlated References: cor_1.ref_0 - [6] Filter [eq(ref_0, cor_1.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [6] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_1.ref_0) - - Correlated References: cor_1.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [5] TableScan id: 3 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"8","label":"[8] Filter [exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"8","to":"4","label":"input 0"},{"from":"8","to":"7","label":"subquery(7)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} -step TopProjectionRule {"nodes":[{"id":"8","label":"[8] Filter [exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"9","label":"[9] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]}],"edges":[{"from":"8","to":"4","label":"input 0"},{"from":"8","to":"7","label":"subquery(7)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"9","to":"8","label":"input 0"},{"from":"8","to":"9","label":"TopProjectionRule"}]} -step FilterMergeRule {"nodes":[{"id":"9","label":"[9] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]},{"id":"8","label":"[8] Filter [exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Filter [exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1])), exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]}],"edges":[{"from":"9","to":"8","label":"input 0"},{"from":"8","to":"4","label":"input 0"},{"from":"8","to":"7","label":"subquery(7)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"10","to":"3","label":"input 0"},{"from":"10","to":"2","label":"subquery(2)"},{"from":"10","to":"7","label":"subquery(7)"},{"from":"8","to":"10","label":"FilterMergeRule"}]} -step FilterNormalizationRule {"nodes":[{"id":"9","label":"[9] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]},{"id":"10","label":"[10] Filter [exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1])), exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"11","label":"[11] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]}],"edges":[{"from":"9","to":"10","label":"input 0"},{"from":"10","to":"3","label":"input 0"},{"from":"10","to":"2","label":"subquery(2)"},{"from":"10","to":"7","label":"subquery(7)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"11","to":"3","label":"input 0"},{"from":"11","to":"2","label":"subquery(2)"},{"from":"11","to":"7","label":"subquery(7)"},{"from":"10","to":"11","label":"FilterNormalizationRule"}]} -final {"nodes":[{"id":"9","label":"[9] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]},{"id":"11","label":"[11] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 7, correlation_id: 1, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"9","to":"11","label":"input 0"},{"from":"11","to":"3","label":"input 0"},{"from":"11","to":"2","label":"subquery(2)"},{"from":"11","to":"7","label":"subquery(7)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"}]} +initial {"nodes":[{"id":"8","label":"[8] Filter [exists(correlated_subquery(node: 7, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"8","to":"4","label":"input 0"},{"from":"8","to":"7","label":"subquery(7)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +step TopProjectionRule {"nodes":[{"id":"8","label":"[8] Filter [exists(correlated_subquery(node: 7, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"9","label":"[9] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]}],"edges":[{"from":"8","to":"4","label":"input 0"},{"from":"8","to":"7","label":"subquery(7)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"9","to":"8","label":"input 0"},{"from":"8","to":"9","label":"TopProjectionRule"}]} +step FilterMergeRule {"nodes":[{"id":"9","label":"[9] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]},{"id":"8","label":"[8] Filter [exists(correlated_subquery(node: 7, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Filter [exists(correlated_subquery(node: 7, parameters: [ref_1])), exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]}],"edges":[{"from":"9","to":"8","label":"input 0"},{"from":"8","to":"4","label":"input 0"},{"from":"8","to":"7","label":"subquery(7)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"10","to":"3","label":"input 0"},{"from":"10","to":"2","label":"subquery(2)"},{"from":"10","to":"7","label":"subquery(7)"},{"from":"8","to":"10","label":"FilterMergeRule"}]} +step FilterNormalizationRule {"nodes":[{"id":"9","label":"[9] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]},{"id":"10","label":"[10] Filter [exists(correlated_subquery(node: 7, parameters: [ref_1])), exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"11","label":"[11] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]}],"edges":[{"from":"9","to":"10","label":"input 0"},{"from":"10","to":"3","label":"input 0"},{"from":"10","to":"2","label":"subquery(2)"},{"from":"10","to":"7","label":"subquery(7)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"11","to":"3","label":"input 0"},{"from":"11","to":"2","label":"subquery(2)"},{"from":"11","to":"7","label":"subquery(7)"},{"from":"10","to":"11","label":"FilterNormalizationRule"}]} +final {"nodes":[{"id":"9","label":"[9] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]},{"id":"11","label":"[11] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 7, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"6","label":"[6] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"5","label":"[5] TableScan id: 3","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"9","to":"11","label":"input 0"},{"from":"11","to":"3","label":"input 0"},{"from":"11","to":"2","label":"subquery(2)"},{"from":"11","to":"7","label":"subquery(7)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"7","to":"6","label":"input 0"},{"from":"6","to":"5","label":"input 0"}]} ---- ---- @@ -156,14 +156,14 @@ run correlated_filter_3 ---- ---- -[7] Filter [exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))] +[5] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1])) - [4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))] + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) + [4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])) + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) [3] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -171,39 +171,27 @@ correlated_filter_3 [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -[6] SubqueryRoot - - Num Columns: 5 - - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_1.ref_0) - - Correlated References: cor_1.ref_0 - [5] Filter [eq(ref_0, cor_1.ref_0)] - - Num Columns: 5 - - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_1.ref_0) - - Correlated References: cor_1.ref_0 - Recurring node 0 - Optimized: -[8] Project [ref_0, ref_1, ref_2, ref_3, ref_4] +[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1])) - [10] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))] + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) + [4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1])) + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) [3] TableScan id: 2 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -211,34 +199,22 @@ Optimized: [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -[6] SubqueryRoot - - Num Columns: 5 - - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_1.ref_0) - - Correlated References: cor_1.ref_0 - [5] Filter [eq(ref_0, cor_1.ref_0)] - - Num Columns: 5 - - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_1.ref_0) - - Correlated References: cor_1.ref_0 - Recurring node 0 - -initial {"nodes":[{"id":"7","label":"[7] Filter [exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]}],"edges":[{"from":"7","to":"4","label":"input 0"},{"from":"7","to":"6","label":"subquery(6)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"0","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} -step TopProjectionRule {"nodes":[{"id":"7","label":"[7] Filter [exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"8","label":"[8] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]}],"edges":[{"from":"7","to":"4","label":"input 0"},{"from":"7","to":"6","label":"subquery(6)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"0","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"8","to":"7","label":"input 0"},{"from":"7","to":"8","label":"TopProjectionRule"}]} -step FilterMergeRule {"nodes":[{"id":"8","label":"[8] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]},{"id":"7","label":"[7] Filter [exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"9","label":"[9] Filter [exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1])), exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]}],"edges":[{"from":"8","to":"7","label":"input 0"},{"from":"7","to":"4","label":"input 0"},{"from":"7","to":"6","label":"subquery(6)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"0","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"9","to":"3","label":"input 0"},{"from":"9","to":"2","label":"subquery(2)"},{"from":"9","to":"6","label":"subquery(6)"},{"from":"7","to":"9","label":"FilterMergeRule"}]} -step FilterNormalizationRule {"nodes":[{"id":"8","label":"[8] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]},{"id":"9","label":"[9] Filter [exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1])), exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"10","label":"[10] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]}],"edges":[{"from":"8","to":"9","label":"input 0"},{"from":"9","to":"3","label":"input 0"},{"from":"9","to":"2","label":"subquery(2)"},{"from":"9","to":"6","label":"subquery(6)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"0","label":"input 0"},{"from":"10","to":"3","label":"input 0"},{"from":"10","to":"2","label":"subquery(2)"},{"from":"10","to":"6","label":"subquery(6)"},{"from":"9","to":"10","label":"FilterNormalizationRule"}]} -final {"nodes":[{"id":"8","label":"[8] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]},{"id":"10","label":"[10] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])), exists(correlated_subquery(node: 6, correlation_id: 1, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]},{"id":"5","label":"[5] Filter [eq(ref_0, cor_1.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_1.ref_0)","Correlated References: cor_1.ref_0"]}],"edges":[{"from":"8","to":"10","label":"input 0"},{"from":"10","to":"3","label":"input 0"},{"from":"10","to":"2","label":"subquery(2)"},{"from":"10","to":"6","label":"subquery(6)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"5","label":"[5] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +step TopProjectionRule {"nodes":[{"id":"5","label":"[5] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"6","label":"[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"6","label":"TopProjectionRule"}]} +step FilterMergeRule {"nodes":[{"id":"6","label":"[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"5","label":"[5] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"7","label":"[7] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"7","to":"3","label":"input 0"},{"from":"7","to":"2","label":"subquery(2)"},{"from":"5","to":"7","label":"FilterMergeRule"}]} +step FilterNormalizationRule {"nodes":[{"id":"6","label":"[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"7","label":"[7] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1])), exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]}],"edges":[{"from":"6","to":"7","label":"input 0"},{"from":"7","to":"3","label":"input 0"},{"from":"7","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"7","to":"4","label":"FilterNormalizationRule"}]} +final {"nodes":[{"id":"6","label":"[6] Project [ref_0, ref_1, ref_2, ref_3, ref_4]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"4","label":"[4] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"6","to":"4","label":"input 0"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} ---- ---- @@ -249,10 +225,10 @@ correlated_filter_pruning [6] Project [ref_2] - Num Columns: 1 - Row Type: string - [5] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))] + [5] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1])) + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1])) [4] Union - Num Columns: 5 - Row Type: string, string, string, string, string @@ -264,13 +240,13 @@ correlated_filter_pruning [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string @@ -280,10 +256,10 @@ Optimized: [10] Project [ref_1] - Num Columns: 1 - Row Type: string - [9] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0]))] + [9] Filter [exists(correlated_subquery(node: 2, parameters: [ref_0]))] - Num Columns: 2 - Row Type: string, string - - Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0])) + - Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_0])) [8] Union - Num Columns: 2 - Row Type: string, string @@ -298,19 +274,19 @@ Optimized: [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"6","label":"[6] Project [ref_2]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"5","label":"[5] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"4","label":"[4] Union","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"3","label":"input 1"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} -step UnionPruningRule {"nodes":[{"id":"6","label":"[6] Project [ref_2]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"5","label":"[5] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))"]},{"id":"4","label":"[4] Union","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"9","label":"[9] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0]))]","annotations":["Num Columns: 2","Row Type: string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0]))"]},{"id":"8","label":"[8] Union","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"7","label":"[7] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"3","label":"input 1"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"10","to":"9","label":"input 0"},{"from":"9","to":"8","label":"input 0"},{"from":"9","to":"2","label":"subquery(2)"},{"from":"8","to":"7","label":"input 0"},{"from":"8","to":"7","label":"input 1"},{"from":"7","to":"3","label":"input 0"},{"from":"6","to":"10","label":"UnionPruningRule"}]} -final {"nodes":[{"id":"10","label":"[10] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"9","label":"[9] Filter [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0]))]","annotations":["Num Columns: 2","Row Type: string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0]))"]},{"id":"8","label":"[8] Union","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"7","label":"[7] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"10","to":"9","label":"input 0"},{"from":"9","to":"8","label":"input 0"},{"from":"9","to":"2","label":"subquery(2)"},{"from":"8","to":"7","label":"input 0"},{"from":"8","to":"7","label":"input 1"},{"from":"7","to":"3","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"6","label":"[6] Project [ref_2]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"5","label":"[5] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"4","label":"[4] Union","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"3","label":"input 1"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +step UnionPruningRule {"nodes":[{"id":"6","label":"[6] Project [ref_2]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"5","label":"[5] Filter [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_1]))"]},{"id":"4","label":"[4] Union","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"10","label":"[10] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"9","label":"[9] Filter [exists(correlated_subquery(node: 2, parameters: [ref_0]))]","annotations":["Num Columns: 2","Row Type: string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_0]))"]},{"id":"8","label":"[8] Union","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"7","label":"[7] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string"]}],"edges":[{"from":"6","to":"5","label":"input 0"},{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"3","label":"input 1"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"10","to":"9","label":"input 0"},{"from":"9","to":"8","label":"input 0"},{"from":"9","to":"2","label":"subquery(2)"},{"from":"8","to":"7","label":"input 0"},{"from":"8","to":"7","label":"input 1"},{"from":"7","to":"3","label":"input 0"},{"from":"6","to":"10","label":"UnionPruningRule"}]} +final {"nodes":[{"id":"10","label":"[10] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"9","label":"[9] Filter [exists(correlated_subquery(node: 2, parameters: [ref_0]))]","annotations":["Num Columns: 2","Row Type: string, string","Pulled Up Predicates: exists(correlated_subquery(node: 2, parameters: [ref_0]))"]},{"id":"8","label":"[8] Union","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"7","label":"[7] Project [ref_1, ref_2]","annotations":["Num Columns: 2","Row Type: string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"10","to":"9","label":"input 0"},{"from":"9","to":"8","label":"input 0"},{"from":"9","to":"2","label":"subquery(2)"},{"from":"8","to":"7","label":"input 0"},{"from":"8","to":"7","label":"input 1"},{"from":"7","to":"3","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} ---- ---- diff --git a/tests/testdata/explain/correlated_project.test b/tests/testdata/explain/correlated_project.test index 432f681..dbf8f61 100644 --- a/tests/testdata/explain/correlated_project.test +++ b/tests/testdata/explain/correlated_project.test @@ -2,7 +2,7 @@ run correlated_project_1 ---- ---- -[4] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))] +[4] Project [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 1 - Row Type: bool [3] TableScan id: 2 @@ -12,20 +12,20 @@ correlated_project_1 [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string Optimized: -[4] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))] +[4] Project [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 1 - Row Type: bool [3] TableScan id: 2 @@ -35,20 +35,20 @@ Optimized: [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"4","label":"[4] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"4","label":"[4] Project [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} -final {"nodes":[{"id":"4","label":"[4] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +final {"nodes":[{"id":"4","label":"[4] Project [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"2","label":"subquery(2)"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} ---- ---- @@ -56,7 +56,7 @@ run correlated_project_pruning ---- ---- -[5] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))] +[5] Project [exists(correlated_subquery(node: 2, parameters: [ref_1]))] - Num Columns: 1 - Row Type: bool [4] Union @@ -70,20 +70,20 @@ correlated_project_pruning [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string Optimized: -[8] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0]))] +[8] Project [exists(correlated_subquery(node: 2, parameters: [ref_0]))] - Num Columns: 1 - Row Type: bool [7] Union @@ -100,19 +100,19 @@ Optimized: [2] SubqueryRoot - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 - [1] Filter [eq(ref_0, cor_0.ref_0)] + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 + [1] Filter [eq(ref_0, ctx_0.ref_0)] - Num Columns: 5 - Row Type: string, string, string, string, string - - Pulled Up Predicates: eq(ref_0, cor_0.ref_0) - - Correlated References: cor_0.ref_0 + - Pulled Up Predicates: eq(ref_0, ctx_0.ref_0) + - Correlated References: ctx_0.ref_0 [0] TableScan id: 1 - Num Columns: 5 - Row Type: string, string, string, string, string -initial {"nodes":[{"id":"5","label":"[5] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"4","label":"[4] Union","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"3","label":"input 1"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} -step UnionPruningRule {"nodes":[{"id":"5","label":"[5] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_1]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"4","label":"[4] Union","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"8","label":"[8] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"7","label":"[7] Union","annotations":["Num Columns: 1","Row Type: string"]},{"id":"6","label":"[6] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"3","label":"input 1"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"8","to":"7","label":"input 0"},{"from":"8","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"7","to":"6","label":"input 1"},{"from":"6","to":"3","label":"input 0"},{"from":"5","to":"8","label":"UnionPruningRule"}]} -final {"nodes":[{"id":"8","label":"[8] Project [exists(correlated_subquery(node: 2, correlation_id: 0, parameters: [ref_0]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"7","label":"[7] Union","annotations":["Num Columns: 1","Row Type: string"]},{"id":"6","label":"[6] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, cor_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, cor_0.ref_0)","Correlated References: cor_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"8","to":"7","label":"input 0"},{"from":"8","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"7","to":"6","label":"input 1"},{"from":"6","to":"3","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +initial {"nodes":[{"id":"5","label":"[5] Project [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"4","label":"[4] Union","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"3","label":"input 1"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} +step UnionPruningRule {"nodes":[{"id":"5","label":"[5] Project [exists(correlated_subquery(node: 2, parameters: [ref_1]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"4","label":"[4] Union","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"8","label":"[8] Project [exists(correlated_subquery(node: 2, parameters: [ref_0]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"7","label":"[7] Union","annotations":["Num Columns: 1","Row Type: string"]},{"id":"6","label":"[6] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]}],"edges":[{"from":"5","to":"4","label":"input 0"},{"from":"5","to":"2","label":"subquery(2)"},{"from":"4","to":"3","label":"input 0"},{"from":"4","to":"3","label":"input 1"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"},{"from":"8","to":"7","label":"input 0"},{"from":"8","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"7","to":"6","label":"input 1"},{"from":"6","to":"3","label":"input 0"},{"from":"5","to":"8","label":"UnionPruningRule"}]} +final {"nodes":[{"id":"8","label":"[8] Project [exists(correlated_subquery(node: 2, parameters: [ref_0]))]","annotations":["Num Columns: 1","Row Type: bool"]},{"id":"7","label":"[7] Union","annotations":["Num Columns: 1","Row Type: string"]},{"id":"6","label":"[6] Project [ref_1]","annotations":["Num Columns: 1","Row Type: string"]},{"id":"3","label":"[3] TableScan id: 2","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]},{"id":"2","label":"[2] SubqueryRoot","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"1","label":"[1] Filter [eq(ref_0, ctx_0.ref_0)]","annotations":["Num Columns: 5","Row Type: string, string, string, string, string","Pulled Up Predicates: eq(ref_0, ctx_0.ref_0)","Correlated References: ctx_0.ref_0"]},{"id":"0","label":"[0] TableScan id: 1","annotations":["Num Columns: 5","Row Type: string, string, string, string, string"]}],"edges":[{"from":"8","to":"7","label":"input 0"},{"from":"8","to":"2","label":"subquery(2)"},{"from":"7","to":"6","label":"input 0"},{"from":"7","to":"6","label":"input 1"},{"from":"6","to":"3","label":"input 0"},{"from":"2","to":"1","label":"input 0"},{"from":"1","to":"0","label":"input 0"}]} ---- ----