src/LogicalPlanner/LogicalPlan.cs
/// <summary>
/// Creating a selection operator for ORDER BY ... LIMIT  clause
/// </summary>
/// <param name="orderClause">optional orderBy clause with a list of expressions</param>
/// <param name="limitExp">optional TOP N limit</param>
/// <param name="pipedData"></param>
/// <param name="allLogicalOps"></param>
/// <returns></returns>
Creating a selection operator for ORDER BY ... LIMIT  clause
Creating a selection operator for ORDER BY ... LIMIT clause
private LogicalOperator CreateLogicalTree(
            IList<SortItem> orderClause, 
            LimitClause limitExp,
            LogicalOperator pipedData, 
            ISet<LogicalOperator> allLogicalOps)
        {
            var selectionOp = new SelectionOperator(pipedData, orderClause, limitExp);
            var selectionSchema = new Schema(pipedData.OutputSchema);
            selectionOp.InputSchema = new Schema(selectionSchema);
            selectionOp.OutputSchema = new Schema(selectionSchema); 
            allLogicalOps.Add(selectionOp);
            return selectionOp;
        }
private LogicalOperator CreateLogicalTree ( IList < SortItem > orderClause , LimitClause limitExp , LogicalOperator pipedData , ISet < LogicalOperator > allLogicalOps ) { var selectionOp = new SelectionOperator ( pipedData , orderClause , limitExp ) ; var selectionSchema = new Schema ( pipedData . OutputSchema ) ; selectionOp . InputSchema = new Schema ( selectionSchema ) ; selectionOp . OutputSchema = new Schema ( selectionSchema ) ; allLogicalOps . Add ( selectionOp ) ; return selectionOp ; }
Creating a selection operator for ORDER BY ... LIMIT  clause
Creating a selection operator for ORDER BY ... LIMIT clause
// append new property from ORDER BY clause to the the input and output schema
None
orderClause
IList<SortItem>
optional orderBy clause with a list of expressions
optional orderBy clause with a list of expressions
limitExp
LimitClause
optional TOP N limit
optional TOP N limit
pipedData
LogicalOperator
None
allLogicalOps
ISet<LogicalOperator>
None