@@ -45,7 +45,6 @@ use crate::{
4545 UserDefinedLogicalNode , Values , Window ,
4646} ;
4747use datafusion_common:: tree_node:: TreeNodeRefContainer ;
48- use recursive:: recursive;
4948
5049use crate :: expr:: { Exists , InSubquery } ;
5150use datafusion_common:: tree_node:: {
@@ -669,7 +668,7 @@ impl LogicalPlan {
669668
670669 /// Visits a plan similarly to [`Self::visit`], including subqueries that
671670 /// may appear in expressions such as `IN (SELECT ...)`.
672- #[ recursive]
671+ #[ cfg_attr ( feature = " recursive-protection" , recursive :: recursive ) ]
673672 pub fn visit_with_subqueries < V : for < ' n > TreeNodeVisitor < ' n , Node = Self > > (
674673 & self ,
675674 visitor : & mut V ,
@@ -688,7 +687,7 @@ impl LogicalPlan {
688687 /// Similarly to [`Self::rewrite`], rewrites this node and its inputs using `f`,
689688 /// including subqueries that may appear in expressions such as `IN (SELECT
690689 /// ...)`.
691- #[ recursive]
690+ #[ cfg_attr ( feature = " recursive-protection" , recursive :: recursive ) ]
692691 pub fn rewrite_with_subqueries < R : TreeNodeRewriter < Node = Self > > (
693692 self ,
694693 rewriter : & mut R ,
@@ -707,7 +706,7 @@ impl LogicalPlan {
707706 & self ,
708707 mut f : F ,
709708 ) -> Result < TreeNodeRecursion > {
710- #[ recursive]
709+ #[ cfg_attr ( feature = " recursive-protection" , recursive :: recursive ) ]
711710 fn apply_with_subqueries_impl <
712711 F : FnMut ( & LogicalPlan ) -> Result < TreeNodeRecursion > ,
713712 > (
@@ -742,7 +741,7 @@ impl LogicalPlan {
742741 self ,
743742 mut f : F ,
744743 ) -> Result < Transformed < Self > > {
745- #[ recursive]
744+ #[ cfg_attr ( feature = " recursive-protection" , recursive :: recursive ) ]
746745 fn transform_down_with_subqueries_impl <
747746 F : FnMut ( LogicalPlan ) -> Result < Transformed < LogicalPlan > > ,
748747 > (
@@ -767,7 +766,7 @@ impl LogicalPlan {
767766 self ,
768767 mut f : F ,
769768 ) -> Result < Transformed < Self > > {
770- #[ recursive]
769+ #[ cfg_attr ( feature = " recursive-protection" , recursive :: recursive ) ]
771770 fn transform_up_with_subqueries_impl <
772771 F : FnMut ( LogicalPlan ) -> Result < Transformed < LogicalPlan > > ,
773772 > (
@@ -795,7 +794,7 @@ impl LogicalPlan {
795794 mut f_down : FD ,
796795 mut f_up : FU ,
797796 ) -> Result < Transformed < Self > > {
798- #[ recursive]
797+ #[ cfg_attr ( feature = " recursive-protection" , recursive :: recursive ) ]
799798 fn transform_down_up_with_subqueries_impl <
800799 FD : FnMut ( LogicalPlan ) -> Result < Transformed < LogicalPlan > > ,
801800 FU : FnMut ( LogicalPlan ) -> Result < Transformed < LogicalPlan > > ,
0 commit comments