예제 #1
0
        private BoundRelation PushOverSort(BoundFilterRelation node, BoundSortRelation input)
        {
            var newFilter = RewriteRelation(node.Update(input.Input, node.Condition));
            var newInput  = input.Update(input.IsDistinct, newFilter, input.SortedValues);

            return(newInput);
        }
예제 #2
0
        protected override BoundRelation RewriteSortRelation(BoundSortRelation node)
        {
            var newInput = RewriteRelation(node.Input);

            if (newInput is BoundFilterRelation filter)
            {
                node = node.Update(node.IsDistinct, filter.Input, node.SortedValues);
                return(filter.WithInput(node));
            }
            else
            {
                return(node.WithInput(newInput));
            }
        }