public class AstGroup extends AstPrimitive
AstGroup.FCN
.
The returned column(s).Modifier and Type | Class and Description |
---|---|
static class |
AstGroup.AGG |
static class |
AstGroup.FCN |
static class |
AstGroup.G |
static class |
AstGroup.GBTaskAggsPerMap |
static class |
AstGroup.MedianResult |
static class |
AstGroup.NAHandling |
Constructor and Description |
---|
AstGroup() |
AstGroup(boolean perNodeAggregates) |
Modifier and Type | Method and Description |
---|---|
static AstGroup.AGG[] |
aggNRows() |
ValFrame |
apply(Env env,
Env.StackHelp stk,
AstRoot[] asts)
Primary method to invoke this function, passing all the parameters
as the `asts` list.
|
java.lang.String[] |
args()
List of argument names.
|
static Frame |
buildOutput(int[] gbCols,
int noutCols,
Frame fr,
java.lang.String[] fcnames,
int ngrps,
MRTask mrfill) |
static AstNumList |
check(long dstX,
AstRoot ast) |
static IcedHashSet<AstGroup.G> |
doGroups(Frame fr,
int[] gbCols,
AstGroup.AGG[] aggs) |
static IcedHashSet<AstGroup.G> |
doGroups(Frame fr,
int[] gbCols,
byte[] gbColsTypes,
AstGroup.AGG[] aggs,
boolean hasMedian,
boolean perNodeAggregates) |
int |
nargs()
Number of function's arguments + 1.
|
ValFrame |
performGroupingWithAggregations(Frame fr,
int[] gbCols,
AstGroup.AGG[] aggs)
Performs grouping and aggregations on given data.
|
java.lang.String |
str()
String representation of this Ast object in the Rapids language.
|
description, example, exec
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonBytes, toJsonString, write, writeExternal, writeJSON
public int nargs()
AstPrimitive
nargs
in class AstPrimitive
public java.lang.String[] args()
AstPrimitive
args
in class AstPrimitive
public java.lang.String str()
AstRoot
AstPrimitive
s this is the name of the function; for
AstParameter
s this is either the name of the variable, or the
value of the numeric constant that the parameter represents. For more
complicated constructs such as AstExec
or AstFunction
this method should return those objects as a Rapids string.public ValFrame apply(Env env, Env.StackHelp stk, AstRoot[] asts)
AstPrimitive
Primary method to invoke this function, passing all the parameters as the `asts` list.
apply
in class AstPrimitive
env
- Current execution environment. Variables are looked up here.stk
- TODO need clarificationasts
- List of AstRoot expressions that are arguments to the
function. First element in this list is the function itself.public ValFrame performGroupingWithAggregations(Frame fr, int[] gbCols, AstGroup.AGG[] aggs)
fr
- frame on which grouping should be performedgbCols
- indices of columns (of given frame) to be used for grouping.aggs
- aggregations to be performed on the grouped data.public static AstNumList check(long dstX, AstRoot ast)
public static IcedHashSet<AstGroup.G> doGroups(Frame fr, int[] gbCols, AstGroup.AGG[] aggs)
public static IcedHashSet<AstGroup.G> doGroups(Frame fr, int[] gbCols, byte[] gbColsTypes, AstGroup.AGG[] aggs, boolean hasMedian, boolean perNodeAggregates)
public static AstGroup.AGG[] aggNRows()