[
https://issues.apache.org/jira/browse/DRILL-8543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18055995#comment-18055995
]
ASF GitHub Bot commented on DRILL-8543:
---------------------------------------
cgivre opened a new pull request, #3036:
URL: https://github.com/apache/drill/pull/3036
# [DRILL-8543](https://issues.apache.org/jira/browse/DRILL-XXXX): Add
Support for Materialized Views
## Description
This PR adds materialized view support to Apache Drill, enabling users to
store pre-computed query results for improved query performance.
Features
- SQL Commands: CREATE [OR REPLACE] MATERIALIZED VIEW, DROP MATERIALIZED
VIEW, and REFRESH MATERIALIZED VIEW
- Query Rewriting: Automatic query optimization using Calcite's
SubstitutionVisitor to transparently rewrite queries to use materialized views
when beneficial
- Parquet Storage: MV data stored as Parquet files for efficient columnar
access
- Metastore Integration: Optional synchronization of MV metadata to Drill
Metastore (Iceberg, RDBMS, MongoDB backends)
Implementation
- New SQL parser classes for MV statements
- MaterializedView data model with JSON serialization
(.materialized_view.drill files)
- MaterializedViewHandler for CREATE/DROP/REFRESH operations
- MaterializedViewRewriter for query plan substitution
- DrillMaterializedViewTable implementing Calcite's TranslatableTable
- Metastore API extensions: MaterializedViews interface and
MaterializedViewMetadataUnit
- Iceberg metastore backend implementation for MV metadata
Configuration
- `planner.enable_materialized_view_rewrite` (default: true) - Controls
automatic query rewriting
## Documentation
Added docs/dev/MaterializedViews.md with complete feature documentation
## Testing
Added additional unit tests.
> Add Support for Materialized Views
> ----------------------------------
>
> Key: DRILL-8543
> URL: https://issues.apache.org/jira/browse/DRILL-8543
> Project: Apache Drill
> Issue Type: New Feature
> Components: Metadata, Query Planning & Optimization
> Affects Versions: 1.22.0
> Reporter: Charles Givre
> Assignee: Charles Givre
> Priority: Major
> Fix For: 1.23.0
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)