public class TableGroup extends SingleMapperTask
| Modifier and Type | Class and Description |
|---|---|
static class |
TableGroup.AggSpec
Defines the aggregation that should be done to form an output column.
|
| Modifier and Type | Field and Description |
|---|---|
static char |
AGGCOL_DELIM
Delimiter character for aggcol parameter entries.
|
| Constructor and Description |
|---|
TableGroup()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static StarTable |
aggregateRows(StarTable inTable,
String[] keyExprs,
TableGroup.AggSpec[] aggSpecs,
RowRunner runner,
boolean isSort,
boolean isCache)
Does the aggregation work.
|
TableProducer |
createProducer(Environment env)
Returns an object which can produce the effective output table which
will be consumed by this task.
|
static TableGroup.AggSpec |
parseAggSpec(String aggSpecTxt,
char delimChr)
Parses an aggregate specification string to an AggSpec.
|
createInputProducer, getInputFilterParameter, getInputTableParametercreateExecutable, createProducer, getIdentity, getOutputMode, getParameterList, getParameters, getPurposepublic static final char AGGCOL_DELIM
public TableProducer createProducer(Environment env) throws TaskException
ConsumerTaskConsumerTask.getIdentity(uk.ac.starlink.table.StarTable) method.createProducer in class ConsumerTaskenv - execution environmentTaskExceptionpublic static TableGroup.AggSpec parseAggSpec(String aggSpecTxt, char delimChr) throws UsageException
aggregateRows method.
The input string is as documented of the form
"<input-expr><delim><aggregator-name>[<delim><output-name>]".
If the input string cannot be so parsed, a UsageException with
an informative message is thrown.aggSpecTxt - text specifying aggregated outputdelimChr - delimiter character between the three parts of
the expressionUsageExceptionpublic static StarTable aggregateRows(StarTable inTable, String[] keyExprs, TableGroup.AggSpec[] aggSpecs, RowRunner runner, boolean isSort, boolean isCache) throws IOException, TaskException
inTable - input tablekeyExprs - input table values that define groupingaggSpecs - specification for output aggregated columnsrunner - row runnerisSort - if true, output table is sorted before return
(where possible)isCache - if true, output table is cached before returnIOExceptionTaskExceptionCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.