Search in sources :

Example 6 with GlobalSettings

use of org.knime.base.data.aggregation.GlobalSettings 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

GlobalSettings (org.knime.base.data.aggregation.GlobalSettings)6 ColumnAggregator (org.knime.base.data.aggregation.ColumnAggregator)3 SettingsModelString (org.knime.core.node.defaultnodesettings.SettingsModelString)3 BigGroupByTable (org.knime.base.node.preproc.groupby.BigGroupByTable)2 ColumnNamePolicy (org.knime.base.node.preproc.groupby.ColumnNamePolicy)2 GroupByTable (org.knime.base.node.preproc.groupby.GroupByTable)2 DataTableSpec (org.knime.core.data.DataTableSpec)2 ColumnRearranger (org.knime.core.data.container.ColumnRearranger)2 DefaultHiLiteMapper (org.knime.core.node.property.hilite.DefaultHiLiteMapper)2 FilterResult (org.knime.core.node.util.filter.NameFilterConfiguration.FilterResult)2 OperatorColumnSettings (org.knime.base.data.aggregation.OperatorColumnSettings)1 CountOperator (org.knime.base.data.aggregation.general.CountOperator)1 MemoryGroupByTable (org.knime.base.node.preproc.groupby.MemoryGroupByTable)1 DataColumnSpec (org.knime.core.data.DataColumnSpec)1 BufferedDataTable (org.knime.core.node.BufferedDataTable)1 ExecutionContext (org.knime.core.node.ExecutionContext)1 SettingsModelFilterString (org.knime.core.node.defaultnodesettings.SettingsModelFilterString)1 StreamableOperator (org.knime.core.node.streamable.StreamableOperator)1