use of org.knime.base.node.preproc.groupby.MemoryGroupByTable in project knime-core by knime.
the class NumericOutliersIntervalsCalculator method getGroupByTable.
/**
* Constructs the group by table in accordance with the given settings.
*
* @param inTable the input data table
* @param exec the execution context
* @return the group by table w.r.t. the selected settings
* @throws CanceledExecutionException if the user has canceled the execution
*/
private GroupByTable getGroupByTable(final BufferedDataTable inTable, final ExecutionContext exec) throws CanceledExecutionException {
// get the global settings
final GlobalSettings gSettings = getGlobalSettings(inTable);
// create the column aggregators
final ColumnAggregator[] agg = getAggretators(inTable.getDataTableSpec(), gSettings);
// init and return the GroupByTable obeying the chosen memory settings
final GroupByTable t;
if (m_inMemory) {
t = new MemoryGroupByTable(exec, inTable, Arrays.stream(m_groupColNames).collect(Collectors.toList()), agg, gSettings, false, COLUMN_NAME_POLICY, false);
} else {
t = new BigGroupByTable(exec, inTable, Arrays.stream(m_groupColNames).collect(Collectors.toList()), agg, gSettings, false, COLUMN_NAME_POLICY, false);
}
return t;
}
Aggregations