Search in sources :

Example 1 with MemoryGroupByTable

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;
}
Also used : ColumnAggregator(org.knime.base.data.aggregation.ColumnAggregator) BigGroupByTable(org.knime.base.node.preproc.groupby.BigGroupByTable) MemoryGroupByTable(org.knime.base.node.preproc.groupby.MemoryGroupByTable) GroupByTable(org.knime.base.node.preproc.groupby.GroupByTable) GlobalSettings(org.knime.base.data.aggregation.GlobalSettings) BigGroupByTable(org.knime.base.node.preproc.groupby.BigGroupByTable) MemoryGroupByTable(org.knime.base.node.preproc.groupby.MemoryGroupByTable)

Aggregations

ColumnAggregator (org.knime.base.data.aggregation.ColumnAggregator)1 GlobalSettings (org.knime.base.data.aggregation.GlobalSettings)1 BigGroupByTable (org.knime.base.node.preproc.groupby.BigGroupByTable)1 GroupByTable (org.knime.base.node.preproc.groupby.GroupByTable)1 MemoryGroupByTable (org.knime.base.node.preproc.groupby.MemoryGroupByTable)1