Package com.cupoftea.lazy
Interface LazyDataFrame
- All Known Implementing Classes:
LazyCupOfTea
public interface LazyDataFrame
Enterprise lazy / streaming DataFrame evaluation interface for out-of-core data processing.
Operations are recorded in an execution plan and executed across streaming chunks/partitions
only when materialized via
collect().-
Method Summary
Modifier and TypeMethodDescriptionAggregates the entire dataset across streaming chunks into a single-row DataFrame.agg(Aggregation... aggregations) Aggregates the entire dataset across streaming chunks into a single-row DataFrame.batchSize(int batchSize) Sets the batch size in rows for chunk processing.chunkSize(int chunkSizeBytes) Sets the chunk target size in bytes for partition slicing.collect()Executes the streaming plan out-of-core and materializes the aggregated/filtered resultCupOfTeaDataFrame.longcount()Counts the total number of matching rows in the streaming dataset without materializing full rows into memory.Drops the specified columns from the projection.explain()Returns a human-readable description of the lazy execution plan.Filters rows using anIFilterpredicate during chunk processing.Filters rows by evaluating a predicate against the specified column.Returns the column headers of the source dataset.Returns the schema of the source dataset.Groups by the specified column(s) for streaming group aggregations.default LazyDataFramehead(long n) Alias forlimit(long).limit(long n) Limits evaluation to at mostnrows, stopping chunk reads early.Orders the collected result DataFrame by the specified columns.parallel()Enables parallel execution across stream partitions.parallel(ExecutorService executor) Enables parallel execution using the specifiedExecutorService.Projects only the specified columns, pruning unused columns early.Forces sequential execution across stream partitions.
-
Method Details
-
filter
Filters rows using anIFilterpredicate during chunk processing. -
filter
Filters rows by evaluating a predicate against the specified column. -
select
Projects only the specified columns, pruning unused columns early. -
drop
Drops the specified columns from the projection. -
limit
Limits evaluation to at mostnrows, stopping chunk reads early. -
head
Alias forlimit(long). -
groupBy
Groups by the specified column(s) for streaming group aggregations. -
agg
Aggregates the entire dataset across streaming chunks into a single-row DataFrame. -
agg
Aggregates the entire dataset across streaming chunks into a single-row DataFrame. -
orderBy
Orders the collected result DataFrame by the specified columns. -
parallel
LazyDataFrame parallel()Enables parallel execution across stream partitions. -
parallel
Enables parallel execution using the specifiedExecutorService. -
sequential
LazyDataFrame sequential()Forces sequential execution across stream partitions. -
batchSize
Sets the batch size in rows for chunk processing. -
chunkSize
Sets the chunk target size in bytes for partition slicing. -
collect
CupOfTea collect()Executes the streaming plan out-of-core and materializes the aggregated/filtered resultCupOfTeaDataFrame. -
count
long count()Counts the total number of matching rows in the streaming dataset without materializing full rows into memory. -
getSchema
Schema getSchema()Returns the schema of the source dataset. -
getHeaders
Returns the column headers of the source dataset. -
explain
String explain()Returns a human-readable description of the lazy execution plan.
-