Ejemplo n.º 1
0
        public override AlgebraNode VisitTopAlgebraNode(TopAlgebraNode node)
        {
            TopIterator topIterator;

            if (node.TieEntries == null)
            {
                topIterator = new TopIterator();
            }
            else
            {
                TopWithTiesIterator topWithTiesIterator = new TopWithTiesIterator();
                topWithTiesIterator.TieEntries = GetIteratorInput(node.Input.OutputList, node.TieEntries);
                topIterator = topWithTiesIterator;
            }

            topIterator.RowBuffer   = new object[node.OutputList.Length];
            topIterator.Limit       = node.Limit;
            topIterator.Input       = ConvertAlgebraNode(node.Input);
            topIterator.InputOutput = GetIteratorOutput(0, node.Input.OutputList, node.OutputList);
            SetLastIterator(node, topIterator);

            return(node);
        }
Ejemplo n.º 2
0
		public override AlgebraNode VisitTopAlgebraNode(TopAlgebraNode node)
		{
			TopIterator topIterator;

			if (node.TieEntries == null)
			{
				topIterator = new TopIterator();
			}
			else
			{
				TopWithTiesIterator topWithTiesIterator = new TopWithTiesIterator();
				topWithTiesIterator.TieEntries = GetIteratorInput(node.Input.OutputList, node.TieEntries);
				topIterator = topWithTiesIterator;
			}

			topIterator.RowBuffer = new object[node.OutputList.Length];
			topIterator.Limit = node.Limit;
			topIterator.Input = ConvertAlgebraNode(node.Input);
			topIterator.InputOutput = GetIteratorOutput(0, node.Input.OutputList, node.OutputList);
			SetLastIterator(node, topIterator);

			return node;
		}