[
https://issues.apache.org/jira/browse/HIVE-21344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16780214#comment-16780214
]
Jesus Camacho Rodriguez commented on HIVE-21344:
------------------------------------------------
[~gopalv], {{getAllValidMaterializedViews}} should get the plans from the
registry, but it still requires a call to metastore to verify that the
materializations still exist, whether they are outdated or not, etc. That logic
is in {{getValidMaterializedViews}}. Is that what you are seeing?
> CBO: Materialized view registry is not used for Calcite planner
> ---------------------------------------------------------------
>
> Key: HIVE-21344
> URL: https://issues.apache.org/jira/browse/HIVE-21344
> Project: Hive
> Issue Type: Bug
> Components: Materialized views
> Affects Versions: 4.0.0
> Reporter: Gopal V
> Priority: Major
> Attachments: calcite-planner-after-fix.svg.zip, mv-get-from-remote.png
>
>
> {code}
> // This is not a rebuild, we retrieve all the materializations. In turn, we
> do not need
> // to force the materialization contents to be up-to-date, as this
> is not a rebuild, and
> // we apply the user parameters
> (HIVE_MATERIALIZED_VIEW_REWRITING_TIME_WINDOW) instead.
> materializations =
> db.getAllValidMaterializedViews(getTablesUsed(basePlan), false, getTxnMgr());
> }
> {code}
> !mv-get-from-remote.png!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)