prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.08k stars 5.39k forks source link

Multi Query CTE Materialization #23185

Open jaystarshot opened 4 months ago

jaystarshot commented 4 months ago

Expected Behavior or Use Case

For batch queries, if the CTE has been previously materialized and uses static deterministic filters and functions, and the underlying data remains unchanged, it can be persisted and reused.

Presto Component, Service, or Connector

Possible Implementation

Example Screenshots (if appropriate):

Context

ZacBlanco commented 1 month ago

Trino is attempting to do something similar: https://github.com/trinodb/trino/pull/22827