Class SortedBy

java.lang.Object
com.illumon.iris.db.util.SortedBy

@ScriptApi public class SortedBy extends Object
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 Details

    • sortedFirstBy

      @NotNull public static Table sortedFirstBy(@NotNull Table input, @NotNull String sortColumnName)
      Return a new table with a single row, containing the lowest value of sortColumnName.
      Parameters:
      input - the input table
      sortColumnName - 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 Table sortedFirstBy(@NotNull Table input, @NotNull String[] sortColumnNames)
      Return a new table with a single row, containing the lowest value of sortColumnName.
      Parameters:
      input - the input table
      sortColumnNames - 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 table
      sortColumnName - the name of the column to sort by
      groupByColumns - 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 table
      sortColumnNames - the names of the column to sort by
      groupByColumns - 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 table
      sortColumnName - the name of the column to sort by
      groupByColumns - 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 table
      sortColumnNames - the names of the column to sort by
      groupByColumns - 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 table
      sortColumnName - the name of the column to sort by
      groupByColumns - 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 table
      sortColumnNames - the names of the column to sort by
      groupByColumns - 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 Table sortedLastBy(@NotNull Table input, @NotNull String sortColumnName)
      Return a new table with a single row, containing the greatest value of sortColumnName.
      Parameters:
      input - the input table
      sortColumnName - 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 Table sortedLastBy(@NotNull Table input, @NotNull String[] sortColumnNames)
      Return a new table with a single row, containing the greatest value of sortColumnName.
      Parameters:
      input - the input table
      sortColumnNames - 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 table
      sortColumnName - the name of the column to sort by
      groupByColumns - 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 table
      sortColumnNames - the names of the column to sort by
      groupByColumns - 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 table
      sortColumnName - the name of the column to sort by
      groupByColumns - 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 table
      sortColumnNames - the names of the column to sort by
      groupByColumns - 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 table
      sortColumnName - the name of the column to sort by
      groupByColumns - 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 table
      sortColumnNames - the names of the column to sort by
      groupByColumns - the columns to group by
      Returns:
      a new table containing the rows with the greatest value of the sort columns for each grouping key