protected override Expression BuildExpression(Expression expression)
        {
            expression = OrderByRewriter.Rewrite(expression);
            expression = base.BuildExpression(expression);
            expression = SkipToRowNumberRewriter.Rewrite(expression);
            expression = OrderByRewriter.Rewrite(expression);

            return(expression);
        }
 protected override Expression BuildExpression(Expression expression)
 {
     // fix up any order-by's
     expression = OrderByRewriter.Rewrite(expression);
     expression = base.BuildExpression(expression);
     expression = CrossJoinIsolator.Isolate(expression);
     expression = SkipToRowNumberRewriter.Rewrite(expression);
     expression = OrderByRewriter.Rewrite(expression);
     expression = UnusedColumnRemover.Remove(expression);
     expression = RedundantColumnRemover.Remove(expression);
     return(expression);
 }