[ 
https://issues.apache.org/jira/browse/CALCITE-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212114#comment-17212114
 ] 

Jiatao Tao commented on CALCITE-4330:
-------------------------------------

I think Flink meets the same problem, but the solution is not so elegant:
In 
org.apache.flink.table.planner.plan.rules.logical.*PushPartitionIntoTableSourceScanRule*,
 they create a new LogicalTableScan but only with new RelOptTable, :
 
{code:java}
TableSourceTable newTableSourceTable = 
tableSourceTable.copy(dynamicTableSource, newStatistic, new 
String[]{extraDigest});
LogicalTableScan newScan = LogicalTableScan.create(scan.getCluster(), 
newTableSourceTable, scan.getHints());
{code}
 
In their RelOptTable(TableSourceTable), they inject extra info 
getQualifiedName, so the TableScan's digest is diff to the first, but with this 
way, there's dirty info when we call getQualifiedName.
{code:java}
  override def getQualifiedName: util.List[String] = {
    val names = super.getQualifiedName
    extraDigests.foreach(builder.add)
    builder.build()
  }
{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)

Reply via email to