Deveel.Data.Sql.Query.GroupNode.Evaluate C# (CSharp) Method

Evaluate() public method

public Evaluate ( IRequest context ) : ITable
context IRequest
return ITable
        public override ITable Evaluate(IRequest context)
        {
            var childTable = Child.Evaluate(context);
            var funTable = new FunctionTable(childTable, Functions, Names, context);

            // If no columns then it is implied the whole table is the group.
            if (ColumnNames == null || ColumnNames.Length == 0) {
                funTable = funTable.AsGroup();
            } else {
                funTable = funTable.CreateGroupMatrix(ColumnNames);
            }

            return funTable.MergeWith(GroupMaxColumn);
        }