Skip to content

cuplyr 0.1.0

Choose a tag to compare

@bbtheo bbtheo released this 10 Feb 21:36
ab03af2

Lazy evaluation

  • tbl_gpu() gains a lazy argument to enable deferred execution. Operations build an AST (Abstract Syntax Tree) that is optimized and executed only when collect() or compute() is called. Set globally with options(cuplyr.exec_mode = "lazy") or CUPLYR_EXEC_MODE=lazy environment variable.

  • Added an AST optimizer that applies multiple optimization passes before execution:

    • Projection pruning: push column selection close to data sources
    • Mutate fusion: combine consecutive mutate operations
    • Dead column pruning: remove unused intermediate columns
    • Filter pushdown: move filters earlier in the pipeline, including across joins
    • Filter reordering: execute cheaper filters first
    • Filter fusion: combine multiple filters into single GPU kernel
  • compute() executes pending lazy operations and keeps the result on GPU.

  • collapse() inserts an optimization barrier without executing.

  • as_lazy() and as_eager() switch execution modes mid-pipeline.

  • is_lazy() and has_pending_ops() check the current execution state.

  • show_query() displays the pending operation tree for debugging.

Join operations

  • Added inner_join(), left_join(), right_join(), and full_join() for combining GPU tables (#2). Joins support automatic key detection (natural join), named vectors in by for different key names, suffix for column name conflicts, keep for retaining join keys, and copy to auto-transfer data frames to GPU.

Bind operations

  • Added bind_rows() for vertically combining GPU tables with automatic schema unification and type promotion.
  • Added bind_cols() for horizontally combining GPU tables with .name_repair for duplicate column handling.
  • Both bind functions automatically materialize lazy tables before binding.