Class FragmentUnion
java.lang.Object
io.trino.operator.table.json.execution.FragmentUnion
- All Implemented Interfaces:
JsonTableProcessingFragment
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]Returns an array containing indexes of columns produced by the fragment within all columns produced by json_table.booleangetRow()The values produced by the current sibling are stored on corresponding positions in `newRow`, and for other siblings `newRow` is filled with nulls.voidPrepares the Fragment to produce rows for the new JSON item.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.operator.table.json.execution.JsonTableProcessingFragment
resetRoot
-
Constructor Details
-
FragmentUnion
-
-
Method Details
-
reset
Description copied from interface:JsonTableProcessingFragmentPrepares 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:
resetin interfaceJsonTableProcessingFragment- Parameters:
item- the new JSON iteminput- the input Page currently processed by json_table functionposition- the currently processed position in the input page
-
getRow
public boolean getRow()The values produced by the current sibling are stored on corresponding positions in `newRow`, and for other siblings `newRow` is filled with nulls. 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:
getRowin interfaceJsonTableProcessingFragment- Returns:
- true if row was produced, false if row was not produced (Fragment is finished)
-
getOutputLayout
public int[] getOutputLayout()Description copied from interface:JsonTableProcessingFragmentReturns an array containing indexes of columns produced by the fragment within all columns produced by json_table.- Specified by:
getOutputLayoutin interfaceJsonTableProcessingFragment
-