Skip to main content
Version: Java (Groovy)

filter

The filter method creates a new PartitionedTable from the result of applying filters to the underlying partitioned table.

note

Filters must not reference the "constituent" column.

Syntax

filter(filters)

Parameters

ParameterTypeDescription
filtersCollection<? extends Filter>

The filters to apply. Must not reference the "constituent" column.

Returns

A new PartitionedTable with the supplied filters applied.

Examples

source = emptyTable(5).update('IntCol = i', 'StrCol = `value`')
partitionedTable = source.partitionBy('IntCol')

filt = Filter.from('IntCol > 2')

result = partitionedTable.table()
resultFiltered = partitionedTable.filter(filt).table()