Imports the view with the specified ID and expression into the provided dataflow description. [`OptimizerFeatures`] is used while running expression [`mz_transform::analysis::Analysis`]. You should generally prefer calling [`DataflowBuilder::import_into_dataflow`], which can handle objects of any type as long as they exist in the catalog. This method exists for when the view does not exist in the
(
&mut self,
view_id: &GlobalId,
view: &OptimizedMirRelationExpr,
dataflow: &mut DataflowDesc,
features: &OptimizerFeatures,
)
| 392 | /// when the view does not exist in the catalog, e.g., because it is |
| 393 | /// identified by a [`GlobalId::Transient`]. |
| 394 | pub fn import_view_into_dataflow( |
| 395 | &mut self, |
| 396 | view_id: &GlobalId, |
| 397 | view: &OptimizedMirRelationExpr, |
| 398 | dataflow: &mut DataflowDesc, |
| 399 | features: &OptimizerFeatures, |
| 400 | ) -> Result<(), OptimizerError> { |
| 401 | for get_id in view.depends_on() { |
| 402 | self.import_into_dataflow(&get_id, dataflow, features)?; |
| 403 | } |
| 404 | dataflow.insert_plan(*view_id, view.clone()); |
| 405 | Ok(()) |
| 406 | } |
| 407 | |
| 408 | // Re-optimize the imported view plans using the current optimizer |
| 409 | // configuration if reoptimization is requested. |
no test coverage detected