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

Flavio Pompermaier edited comment on FLINK-17826 at 5/7/21, 7:26 AM:
---------------------------------------------------------------------

This feature was added in the old connector[1] and I think it becomes useless  
if Flink allows to read only the necessary data: if I register the Flink 
catalog a table for  db1.A and 1 for db1.B is Flink able to optimize  query 
like  "select * from table_A join table_B" without requiring to fetch all data 
from A and B and then joining..? Wouldn't this be a waste of time?

If the problem is that it becomes a table while it should be a view (read-only) 
maybe Flink could introduce the concept of VIEW. Maybe this could be a 
reasonable trade-off for people coming from SQL world..

[1] https://issues.apache.org/jira/browse/FLINK-17361



was (Author: f.pompermaier):
This feature was added in the old connecto[1] and I think it becomes useless  
if Flink allows to read only the necessary data (i.e. If I register the Flink 
catalog a table for  db1.A and 1 for db1.B is Flink able to optimize  query 
like  "select * from table_A join table_B" without requiring to fetch all data 
from A and B and then joining..? Wouldn't this be a waste of time?

If the problem is that it becomes a table while it should be a view (read-only) 
maybe Flink could introduce the concept of VIEW. Maybe this could be a 
reasonable trade-off for people coming from SQL world..

[1] https://issues.apache.org/jira/browse/FLINK-17361


> Add missing custom query support on new jdbc connector
> ------------------------------------------------------
>
>                 Key: FLINK-17826
>                 URL: https://issues.apache.org/jira/browse/FLINK-17826
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / JDBC
>            Reporter: Jark Wu
>            Assignee: Leonard Xu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.14.0
>
>
> In FLINK-17361, we added custom query on JDBC tables, but missing to add the 
> same ability on new jdbc connector (i.e. 
> {{JdbcDynamicTableSourceSinkFactory}}). 
> In the new jdbc connector, maybe we should call it {{scan.query}} to keep 
> consistent with other scan options, besides we need to make {{"table-name"}} 
> optional, but add validation that "table-name" and "scan.query" shouldn't 
> both be empty, and "table-name" must not be empty when used as sink.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to