Package io.deephaven.engine.util
Class SortedBy
java.lang.Object
io.deephaven.engine.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 @NotNull Table
sortedFirstBy
(@NotNull Table input, @NotNull String sortColumnName) Return a new table with a single row, containing the lowest value of sortColumnName.static @NotNull Table
sortedFirstBy
(@NotNull Table input, @NotNull String[] sortColumnNames) Return a new table with a single row, containing the lowest value of sortColumnName.static @NotNull 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.static @NotNull 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.static @NotNull 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.static @NotNull 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.static @NotNull Table
sortedLastBy
(@NotNull Table input, @NotNull String sortColumnName) Return a new table with a single row, containing the greatest value of sortColumnName.static @NotNull Table
sortedLastBy
(@NotNull Table input, @NotNull String[] sortColumnNames) Return a new table with a single row, containing the greatest value of sortColumnName.static @NotNull 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.static @NotNull 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.static @NotNull 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.static @NotNull 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.
-
Method Details
-
sortedFirstBy
@NotNull public static @NotNull Table sortedFirstBy(@NotNull @NotNull Table input, @NotNull @NotNull String sortColumnName) 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
@NotNull public static @NotNull Table sortedFirstBy(@NotNull @NotNull Table input, @NotNull @NotNull String[] sortColumnNames) 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 @NotNull Table sortedFirstBy(@NotNull @NotNull Table input, @NotNull @NotNull String sortColumnName, @NotNull @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 @NotNull Table sortedFirstBy(@NotNull @NotNull Table input, @NotNull @NotNull String[] sortColumnNames, @NotNull @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 @NotNull Table sortedFirstBy(@NotNull @NotNull Table input, @NotNull @NotNull String sortColumnName, @NotNull @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 @NotNull Table sortedFirstBy(@NotNull @NotNull Table input, @NotNull @NotNull Collection<String> sortColumnNames, @NotNull @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
-
sortedLastBy
@NotNull public static @NotNull Table sortedLastBy(@NotNull @NotNull Table input, @NotNull @NotNull String sortColumnName) 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
@NotNull public static @NotNull Table sortedLastBy(@NotNull @NotNull Table input, @NotNull @NotNull String[] sortColumnNames) 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 @NotNull Table sortedLastBy(@NotNull @NotNull Table input, @NotNull @NotNull String sortColumnName, @NotNull @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 @NotNull Table sortedLastBy(@NotNull @NotNull Table input, @NotNull @NotNull String[] sortColumnNames, @NotNull @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 @NotNull Table sortedLastBy(@NotNull @NotNull Table input, @NotNull @NotNull String sortColumnName, @NotNull @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 @NotNull Table sortedLastBy(@NotNull @NotNull Table input, @NotNull @NotNull Collection<String> sortColumnNames, @NotNull @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
-