Exemplo n.º 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);
        }
Exemplo n.º 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));
            }
        }