You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jiatao Tao (Jira)" <ji...@apache.org> on 2020/10/12 03:51:00 UTC
[jira] [Comment Edited] (CALCITE-4330) TableScan#explainTerms is
not enough for digest
[ https://issues.apache.org/jira/browse/CALCITE-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212113#comment-17212113 ]
Jiatao Tao edited comment on CALCITE-4330 at 10/12/20, 3:50 AM:
----------------------------------------------------------------
Hi fellows
Here's the problem:
We have our own RelOptTable implementation, and we replace the RelOptTableImpl during a rule in HepPlanner. Something unexpected occurred: We only replaced the `table` in TableScan, and the digest is not changed after the rule, so in `HepPlanner#addRelToGraph`, directly return the origin TableScan.
HepPlanner#addRelToGraph
{code:java}
Pair<String, List<RelDataType>> key = key(rel);
HepRelVertex equivVertex = mapDigestToVertex.get(key);
if (equivVertex != null) {
// Use existing vertex.
return equivVertex;
}
{code}
We only update the TableScan#table in TableScan, so the digest does not change, so it returns the original TableScan, as I said "the transformation is not applied".
was (Author: aron.tao):
Hi fellows
Here's the problem:
We have our own RelOptTable implementation, and we replace the RelOptTableImpl during a rule in HepPlanner. Something unexpected occurred: We only replaced the `table` in TableScan, and the digest is not changed after the rule, so in `HepPlanner#addRelToGraph`, directly return the origin TableScan.
HepPlanner#addRelToGraph
{code:java}
Pair<String, List<RelDataType>> key = key(rel);
HepRelVertex equivVertex = mapDigestToVertex.get(key);
if (equivVertex != null) {
// Use existing vertex.
return equivVertex;
}
{code}
> TableScan#explainTerms is not enough for digest
> -----------------------------------------------
>
> Key: CALCITE-4330
> URL: https://issues.apache.org/jira/browse/CALCITE-4330
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Jiatao Tao
> Assignee: Jiatao Tao
> Priority: Critical
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)