Package com.illumon.iris.db.util
Class SortedBy
java.lang.Object
com.illumon.iris.db.util.SortedBy
SortedBy operations sort the values in each of the buckets according to a specified column. The sortedFirstBy
returns the row with the lowest value and sortedLastBy returns the row with the greatest value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Table
sortedFirstBy
(Table input, String sortColumnName) Return a new table with a single row, containing the lowest value of sortColumnName.static Table
sortedFirstBy
(Table input, String[] sortColumnNames) Return a new table with a single row, containing the lowest value of sortColumnName.static Table
sortedFirstBy
(Table input, String[] sortColumnNames, SelectColumn... groupByColumns) Return an aggregated table with the lowest value of the sort columns for each grouping key.static Table
sortedFirstBy
(Table input, String[] sortColumnNames, String... groupByColumns) Return an aggregated table with the lowest value of the sort columns for each grouping key.static Table
sortedFirstBy
(Table input, String sortColumnName, SelectColumn... groupByColumns) Return an aggregated table with the lowest value of sortColumnName for each grouping key.static Table
sortedFirstBy
(Table input, String sortColumnName, String... groupByColumns) Return an aggregated table with the lowest value of sortColumnName for each grouping key.static Table
sortedFirstBy
(Table input, String sortColumnName, Collection<String> groupByColumns) Return an aggregated table with the lowest value of sortColumnName for each grouping key.static Table
sortedFirstBy
(Table input, Collection<String> sortColumnNames, Collection<String> groupByColumns) Return an aggregated table with the lowest value of the sort columns for each grouping key.static Table
sortedLastBy
(Table input, String sortColumnName) Return a new table with a single row, containing the greatest value of sortColumnName.static Table
sortedLastBy
(Table input, String[] sortColumnNames) Return a new table with a single row, containing the greatest value of sortColumnName.static Table
sortedLastBy
(Table input, String[] sortColumnNames, SelectColumn... groupByColumns) Return an aggregated table with the greatest value of the sort columns for each grouping key.static Table
sortedLastBy
(Table input, String[] sortColumnNames, String... groupByColumns) Return an aggregated table with the greatest value of the sort columns for each grouping key.static Table
sortedLastBy
(Table input, String sortColumnName, SelectColumn... groupByColumns) Return an aggregated table with the greatest value of the sort column for each grouping key.static Table
sortedLastBy
(Table input, String sortColumnName, String... groupByColumns) Return an aggregated table with the greatest value of the sort column for each grouping key.static Table
sortedLastBy
(Table input, String sortColumnName, Collection<String> groupByColumns) Return an aggregated table with the greatest value of the sort column for each grouping key.static Table
sortedLastBy
(Table input, Collection<String> sortColumnNames, Collection<String> groupByColumns) Return an aggregated table with the greatest value of the sort columns for each grouping key.
-
Method Details
-
sortedFirstBy
Return a new table with a single row, containing the lowest value of sortColumnName.- Parameters:
input
- the input tablesortColumnName
- the name of the column to sort by- Returns:
- a new table containing the row with the lowest value of the sort column
-
sortedFirstBy
Return a new table with a single row, containing the lowest value of sortColumnName.- Parameters:
input
- the input tablesortColumnNames
- the names of the column to sort by- Returns:
- a new table containing the row with the lowest value of the sort columns
-
sortedFirstBy
@NotNull public static Table sortedFirstBy(@NotNull Table input, @NotNull String sortColumnName, @NotNull String... groupByColumns) Return an aggregated table with the lowest value of sortColumnName for each grouping key.- Parameters:
input
- the input tablesortColumnName
- the name of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the lowest value of the sort column for each grouping key
-
sortedFirstBy
@NotNull public static Table sortedFirstBy(@NotNull Table input, @NotNull String[] sortColumnNames, @NotNull String... groupByColumns) Return an aggregated table with the lowest value of the sort columns for each grouping key.- Parameters:
input
- the input tablesortColumnNames
- the names of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the lowest value of the sort columns for each grouping key
-
sortedFirstBy
@NotNull public static Table sortedFirstBy(@NotNull Table input, @NotNull String sortColumnName, @NotNull Collection<String> groupByColumns) Return an aggregated table with the lowest value of sortColumnName for each grouping key.- Parameters:
input
- the input tablesortColumnName
- the name of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the lowest value of the sort column for each grouping key
-
sortedFirstBy
@NotNull public static Table sortedFirstBy(@NotNull Table input, @NotNull Collection<String> sortColumnNames, @NotNull Collection<String> groupByColumns) Return an aggregated table with the lowest value of the sort columns for each grouping key.- Parameters:
input
- the input tablesortColumnNames
- the names of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the lowest value of the sort columns for each grouping key
-
sortedFirstBy
@NotNull public static Table sortedFirstBy(@NotNull Table input, @NotNull String sortColumnName, @NotNull SelectColumn... groupByColumns) Return an aggregated table with the lowest value of sortColumnName for each grouping key.- Parameters:
input
- the input tablesortColumnName
- the name of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the lowest value of the sort column for each grouping key
-
sortedFirstBy
@NotNull public static Table sortedFirstBy(@NotNull Table input, @NotNull String[] sortColumnNames, @NotNull SelectColumn... groupByColumns) Return an aggregated table with the lowest value of the sort columns for each grouping key.- Parameters:
input
- the input tablesortColumnNames
- the names of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the lowest value of the sort columns for each grouping key
-
sortedLastBy
Return a new table with a single row, containing the greatest value of sortColumnName.- Parameters:
input
- the input tablesortColumnName
- the name of the column to sort by- Returns:
- a new table containing the row with the greatest value of the sort column
-
sortedLastBy
Return a new table with a single row, containing the greatest value of sortColumnName.- Parameters:
input
- the input tablesortColumnNames
- the name of the columns to sort by- Returns:
- a new table containing the row with the greatest value of the sort column
-
sortedLastBy
@NotNull public static Table sortedLastBy(@NotNull Table input, @NotNull String sortColumnName, @NotNull String... groupByColumns) Return an aggregated table with the greatest value of the sort column for each grouping key.- Parameters:
input
- the input tablesortColumnName
- the name of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the greatest value of the sort column for each grouping key
-
sortedLastBy
@NotNull public static Table sortedLastBy(@NotNull Table input, @NotNull String[] sortColumnNames, @NotNull String... groupByColumns) Return an aggregated table with the greatest value of the sort columns for each grouping key.- Parameters:
input
- the input tablesortColumnNames
- the names of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the greatest value of the sort columns for each grouping key
-
sortedLastBy
@NotNull public static Table sortedLastBy(@NotNull Table input, @NotNull String sortColumnName, @NotNull Collection<String> groupByColumns) Return an aggregated table with the greatest value of the sort column for each grouping key.- Parameters:
input
- the input tablesortColumnName
- the name of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the greatest value of the sort column for each grouping key
-
sortedLastBy
@NotNull public static Table sortedLastBy(@NotNull Table input, @NotNull Collection<String> sortColumnNames, @NotNull Collection<String> groupByColumns) Return an aggregated table with the greatest value of the sort columns for each grouping key.- Parameters:
input
- the input tablesortColumnNames
- the names of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the greatest value of the sort columns for each grouping key
-
sortedLastBy
@NotNull public static Table sortedLastBy(@NotNull Table input, @NotNull String sortColumnName, @NotNull SelectColumn... groupByColumns) Return an aggregated table with the greatest value of the sort column for each grouping key.- Parameters:
input
- the input tablesortColumnName
- the name of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the greatest value of the sort column for each grouping key
-
sortedLastBy
@NotNull public static Table sortedLastBy(@NotNull Table input, @NotNull String[] sortColumnNames, @NotNull SelectColumn... groupByColumns) Return an aggregated table with the greatest value of the sort columns for each grouping key.- Parameters:
input
- the input tablesortColumnNames
- the names of the column to sort bygroupByColumns
- the columns to group by- Returns:
- a new table containing the rows with the greatest value of the sort columns for each grouping key
-