[
https://issues.apache.org/jira/browse/CALCITE-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17195654#comment-17195654
]
Jesus Camacho Rodriguez commented on CALCITE-4253:
--------------------------------------------------
Thanks for pinging me [~julianhyde]. It's been some time but I believe
{{RelOptUtil.findAllTables}} relying on {{RelMetadataQuery}} was simply to have
a single code path, which may not have been the right choice based on your
comment above. As for not using {{getTableReferences}}, maybe it was introduced
after CALCITE-1682? Automatic caching (since the rule may make the same call
repeatedly) and extensibility were the main factors to rely on the metadata
providers in the MV rewriting rules indeed.
> RelOptUtil#findAllTables should probably use
> RelMetadataQuery#getTableReferences
> --------------------------------------------------------------------------------
>
> Key: CALCITE-4253
> URL: https://issues.apache.org/jira/browse/CALCITE-4253
> Project: Calcite
> Issue Type: Sub-task
> Components: core
> Affects Versions: 1.25.0
> Reporter: Vladimir Sitnikov
> Priority: Minor
>
> It looks like both methods do exactly the same thing, so it would probably
> make sense to divert {{findAllTables}} to
> {{RelMetadataQuery#getTableReferences}}
> If methods are different, it would make sense to add the relevant
> documentation and cross-references.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)