Class FragmentCross

java.lang.Object
io.trino.operator.table.json.execution.FragmentCross
All Implemented Interfaces:
JsonTableProcessingFragment

public class FragmentCross extends Object implements JsonTableProcessingFragment
  • Constructor Details

  • Method Details

    • reset

      public void reset(com.fasterxml.jackson.databind.JsonNode item, Page input, int position)
      Description copied from interface: JsonTableProcessingFragment
      Prepares the Fragment to produce rows for the new JSON item. Note: This method must be called for each new JSON item. Due to nesting, there might be multiple JSON items to process for a single position in the input page. Therefore, input and position may not change for subsequent calls.
      Specified by:
      reset in interface JsonTableProcessingFragment
      Parameters:
      item - the new JSON item
      input - the input Page currently processed by json_table function
      position - the currently processed position in the input page
    • getRow

      public boolean getRow()
      All values produced by the siblings are stored on corresponding positions in `newRow`. It is a temporary representation of the result row, and is shared by all Fragments. The values in `newRow` are not cleared between subsequent calls to getRow(), so that the parts which do not change are automatically reused.
      Specified by:
      getRow in interface JsonTableProcessingFragment
      Returns:
      true if row was produced, false if row was not produced (Fragment is finished)
    • getOutputLayout

      public int[] getOutputLayout()
      Description copied from interface: JsonTableProcessingFragment
      Returns an array containing indexes of columns produced by the fragment within all columns produced by json_table.
      Specified by:
      getOutputLayout in interface JsonTableProcessingFragment