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); }
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)); } }