Class LimitRowStream

java.lang.Object
dev.frostlake.executor.streaming.LimitRowStream
All Implemented Interfaces:
RowStream

public class LimitRowStream extends Object implements RowStream
Skips offset rows then yields at most limit rows, returning null — and not pulling any further from its source — once the limit is reached. This early stop is what lets a streaming pipeline avoid materializing the full upstream for a LIMIT query.
  • Constructor Details

    • LimitRowStream

      public LimitRowStream(RowStream source, long limit, long offset)
  • Method Details

    • next

      public Row next()
      Description copied from interface: RowStream
      The next row, or null when the stream is exhausted.
      Specified by:
      next in interface RowStream
    • close

      public void close()
      Description copied from interface: RowStream
      Release any resources held by this stream and its sources.
      Specified by:
      close in interface RowStream