Ejemplo n.º 1
0
        public override AlgebraNode VisitSortAlgebraNode(SortAlgebraNode node)
        {
            SortIterator sortIterator;

            if (node.Distinct)
            {
                sortIterator = new DistinctSortIterator();
            }
            else
            {
                sortIterator = new SortIterator();
            }

            sortIterator.RowBuffer   = new object[node.OutputList.Length];
            sortIterator.SortOrders  = node.SortOrders;
            sortIterator.SortEntries = GetIteratorInput(node.Input.OutputList, node.SortEntries);
            sortIterator.Comparers   = GetComparersFromExpressionTypes(node.SortEntries);
            sortIterator.Input       = ConvertAlgebraNode(node.Input);
            sortIterator.InputOutput = GetIteratorOutput(0, node.Input.OutputList, node.OutputList);
            SetLastIterator(node, sortIterator);

            return(node);
        }
Ejemplo n.º 2
0
		public override AlgebraNode VisitSortAlgebraNode(SortAlgebraNode node)
		{
			SortIterator sortIterator;
			if (node.Distinct)
				sortIterator = new DistinctSortIterator();
			else 
				sortIterator = new SortIterator();

			sortIterator.RowBuffer = new object[node.OutputList.Length];
			sortIterator.SortOrders = node.SortOrders;
			sortIterator.SortEntries = GetIteratorInput(node.Input.OutputList, node.SortEntries);
			sortIterator.Comparers = GetComparersFromExpressionTypes(node.SortEntries);
			sortIterator.Input = ConvertAlgebraNode(node.Input);
			sortIterator.InputOutput = GetIteratorOutput(0, node.Input.OutputList, node.OutputList);
			SetLastIterator(node, sortIterator);

			return node;
		}