[ 
https://issues.apache.org/jira/browse/FLINK-7636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

jingzhang updated FLINK-7636:
-----------------------------
    Description: 
At present, there are two ways to fetch TableSource of a TableSourceScan node 
(e.g LogicalTableSourceScan, PhysicalTableSourceScan ...):
1. 
{code}
val relOptTable: RelOptTable = getTable()
val tableSourceTable = relOptTable.unwrap(classOf[TableSourceTable[_]])
val tableSouce = tableSourceTable.tableSource
{code}
the result of getTable() is instance of RelOptTableImpl now, and it will not 
change after RelNode tree is built.
2. now all TableSourceScan contains a tablesource as constructor parameter, so 
we could fetch the tablesource directly later.
 
The result tableSource is different with each other by above two ways after 
apply project push(PPD) down or filter push down(FPD).  It is very confusing. 

we hope to fix the problem by introducing FlinkRelOptTable to replace 
RelOptTableImpl, and remove tableSource parameter from TableSourceScan's 
constructor. After PPD or FPD,  a new FlinkRelOptTable instance which contains 
a new TableSourceTable will be passed to TableSourceScan constructor. 

  was:
At present, there are two ways to fetch TableSource of a TableSourceScan node 
(e.g LogicalTableSourceScan, PhysicalTableSourceScan ...):
1. 
{code:scala}
val relOptTable: RelOptTable = getTable()
val tableSourceTable = relOptTable.unwrap(classOf[TableSourceTable[_]])
val tableSouce = tableSourceTable.tableSource
{code}
the result of getTable() is instance of RelOptTableImpl now, and it will not 
change after RelNode tree is built.
2. now all TableSourceScan contains a tablesource as constructor parameter, so 
we could fetch the tablesource directly later.
 
The result tableSource is different with each other by above two ways if apply 
project push(PPD) down or filter push down(FPD).  It is very confusing. 

we hope to fix the problem by introducing FlinkRelOptTable to replace 
RelOptTableImpl, and remove tableSource parameter from TableSourceScan's 
constructor. After PPD or FPD,  a new FlinkRelOptTable instance which contains 
a new TableSourceTable will be passed to TableSourceScan constructor. 


> Introduce Flink RelOptTable,  and remove tableSource from all TableSourceScan 
> node constructor
> ----------------------------------------------------------------------------------------------
>
>                 Key: FLINK-7636
>                 URL: https://issues.apache.org/jira/browse/FLINK-7636
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: jingzhang
>            Assignee: jingzhang
>
> At present, there are two ways to fetch TableSource of a TableSourceScan node 
> (e.g LogicalTableSourceScan, PhysicalTableSourceScan ...):
> 1. 
> {code}
> val relOptTable: RelOptTable = getTable()
> val tableSourceTable = relOptTable.unwrap(classOf[TableSourceTable[_]])
> val tableSouce = tableSourceTable.tableSource
> {code}
> the result of getTable() is instance of RelOptTableImpl now, and it will not 
> change after RelNode tree is built.
> 2. now all TableSourceScan contains a tablesource as constructor parameter, 
> so we could fetch the tablesource directly later.
>  
> The result tableSource is different with each other by above two ways after 
> apply project push(PPD) down or filter push down(FPD).  It is very confusing. 
> we hope to fix the problem by introducing FlinkRelOptTable to replace 
> RelOptTableImpl, and remove tableSource parameter from TableSourceScan's 
> constructor. After PPD or FPD,  a new FlinkRelOptTable instance which 
> contains a new TableSourceTable will be passed to TableSourceScan 
> constructor. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to