Beispiel #1
0
 protected override void InternalBindingTraversal(Plan plan, PlanNodeVisitor visitor)
 {
                 #if USEVISIT
     Nodes[0] = visitor.Visit(plan, Nodes[0]);
     Nodes[1] = visitor.Visit(plan, Nodes[1]);
                 #else
     Nodes[0].BindingTraversal(plan, visitor);
     Nodes[1].BindingTraversal(plan, visitor);
                 #endif
     if (_comparisonNode != null)
     {
         plan.Symbols.PushWindow(0);
         try
         {
             plan.EnterRowContext();
             try
             {
                                         #if USENAMEDROWVARIABLES
                 plan.Symbols.Push(new Symbol(Keywords.Left, (Schema.RowType)Nodes[0].DataType));
                                         #else
                 APlan.Symbols.Push(new Symbol(String.Empty, new Schema.RowType(((Schema.RowType)Nodes[0].DataType).Columns, Keywords.Left)));
                                         #endif
                 try
                 {
                                                 #if USENAMEDROWVARIABLES
                     plan.Symbols.Push(new Symbol(Keywords.Right, (Schema.RowType)Nodes[1].DataType));
                                                 #else
                     APlan.Symbols.Push(new Symbol(String.Empty, new Schema.RowType(((Schema.RowType)Nodes[1].DataType).Columns, Keywords.Right)));
                                                 #endif
                     try
                     {
                                                         #if USEVISIT
                         _comparisonNode = visitor.Visit(plan, _comparisonNode);
                                                         #else
                         _comparisonNode.BindingTraversal(plan, visitor);
                                                         #endif
                     }
                     finally
                     {
                         plan.Symbols.Pop();
                     }
                 }
                 finally
                 {
                     plan.Symbols.Pop();
                 }
             }
             finally
             {
                 plan.ExitRowContext();
             }
         }
         finally
         {
             plan.Symbols.PopWindow();
         }
     }
 }
Beispiel #2
0
 protected override void InternalBindingTraversal(Plan plan, PlanNodeVisitor visitor)
 {
     base.InternalBindingTraversal(plan, visitor);
     // If _distinctRequired is true, _equalNode will only be null if the key is not comparable (i.e. a hashtable is being used to support the distinct)
     if (_distinctRequired && _equalNode != null)
     {
         plan.EnterRowContext();
         try
         {
                                 #if USENAMEDROWVARIABLES
             plan.Symbols.Push(new Symbol(Keywords.Left, DataType.RowType));
                                 #else
             APlan.Symbols.Push(new Symbol(String.Empty, DataType.CreateRowType(Keywords.Left)));
                                 #endif
             try
             {
                                         #if USENAMEDROWVARIABLES
                 plan.Symbols.Push(new Symbol(Keywords.Right, DataType.RowType));
                                         #else
                 APlan.Symbols.Push(new Symbol(String.Empty, DataType.CreateRowType(Keywords.Right)));
                                         #endif
                 try
                 {
                                                 #if USEVISIT
                     _equalNode = visitor.Visit(plan, _equalNode);
                                                 #else
                     _equalNode.BindingTraversal(plan, visitor);
                                                 #endif
                 }
                 finally
                 {
                     plan.Symbols.Pop();
                 }
             }
             finally
             {
                 plan.Symbols.Pop();
             }
         }
         finally
         {
             plan.ExitRowContext();
         }
     }
 }
Beispiel #3
0
 protected override void InternalBindingTraversal(Plan plan, PlanNodeVisitor visitor)
 {
     base.InternalBindingTraversal(plan, visitor);
     plan.EnterRowContext();
     try
     {
                         #if USENAMEDROWVARIABLES
         plan.Symbols.Push(new Symbol(Keywords.Left, _quotaRowType));
                         #else
         APlan.Symbols.Push(new Symbol(String.Empty, new Schema.RowType(FQuotaOrder.Columns, Keywords.Left)));
                         #endif
         try
         {
                                 #if USENAMEDROWVARIABLES
             plan.Symbols.Push(new Symbol(Keywords.Right, _quotaRowType));
                                 #else
             APlan.Symbols.Push(new Symbol(String.Empty, new Schema.RowType(FQuotaOrder.Columns, Keywords.Right)));
                                 #endif
             try
             {
                                         #if USEVISIT
                 _equalNode = visitor.Visit(plan, _equalNode);
                                         #else
                 _equalNode.BindingTraversal(plan, visitor);
                                         #endif
             }
             finally
             {
                 plan.Symbols.Pop();
             }
         }
         finally
         {
             plan.Symbols.Pop();
         }
     }
     finally
     {
         plan.ExitRowContext();
     }
 }