Class LimitOperator

java.lang.Object
dev.frostlake.executor.operators.LimitOperator
All Implemented Interfaces:
Operator

public class LimitOperator extends Object implements Operator
LIMIT operator - restricts the number of rows returned. Supports both LIMIT N and LIMIT N OFFSET M syntax.
  • Constructor Details

    • LimitOperator

      public LimitOperator(int limit, int offset)
    • LimitOperator

      public LimitOperator(int limit)
  • Method Details

    • execute

      public List<Row> execute(List<Row> input, OperatorContext context)
      Description copied from interface: Operator
      Execute this operator on the input rows.
      Specified by:
      execute in interface Operator
      Parameters:
      input - The input rows from the previous operator
      context - The execution context containing table metadata and other information
      Returns:
      The output rows after applying this operator
    • getDescription

      public String getDescription()
      Description copied from interface: Operator
      Get a description of this operator for debugging/logging.
      Specified by:
      getDescription in interface Operator
      Returns:
      A human-readable description of the operator