Class CoalescingOptimizer
An optimizer that coalesces adjacent operators if semantic equivalence can be maintained.
Inheritance
System.Object
CoalescingOptimizer
Implements
Inherited Members
Namespace: System.Linq.CompilerServices.Optimizers
Assembly: Nuqleon.Linq.CompilerServices.Optimizers.dll
Syntax
public class CoalescingOptimizer : QueryVisitor, IOptimizer
Constructors
CoalescingOptimizer()
Declaration
public CoalescingOptimizer()
Methods
Optimize(QueryTree)
Optimizes the given query expression tree by coalescing adjacent operators.
Declaration
public QueryTree Optimize(QueryTree queryTree)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryTree | queryTree | The query expression tree to optimize. |
Returns
| Type | Description |
|---|---|
| QueryTree | An optimized version of the input query tree. |
VisitFirst(FirstOperator)
Visits a FirstOperator and coalesces it with any possible child operators.
Declaration
protected override QueryOperator VisitFirst(FirstOperator op)
Parameters
| Type | Name | Description |
|---|---|---|
| FirstOperator | op | The operator to visit. |
Returns
| Type | Description |
|---|---|
| QueryOperator | The coalesced operator. |
Overrides
VisitSelect(SelectOperator)
Visits a SelectOperator and coalesces it with any possible child operators.
Declaration
protected override QueryOperator VisitSelect(SelectOperator op)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectOperator | op | The operator to visit. |
Returns
| Type | Description |
|---|---|
| QueryOperator | The coalesced operator. |
Overrides
VisitTake(TakeOperator)
Visits a TakeOperator operator and coalesces it with any possible child operators.
Declaration
protected override QueryOperator VisitTake(TakeOperator op)
Parameters
| Type | Name | Description |
|---|---|---|
| TakeOperator | op | The operator to visit. |
Returns
| Type | Description |
|---|---|
| QueryOperator | The coalesced operator. |
Overrides
VisitWhere(WhereOperator)
Visits a WhereOperator and coalesces it with any possible child operators.
Declaration
protected override QueryOperator VisitWhere(WhereOperator op)
Parameters
| Type | Name | Description |
|---|---|---|
| WhereOperator | op | The operator to visit. |
Returns
| Type | Description |
|---|---|
| QueryOperator | The coalesced operator. |