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

Chesnay Schepler commented on FLINK-3445:
-----------------------------------------

About ResultTypeQueryable:
After looking into it a bit I'm not sure if we can implement this in a clean 
way. The key thing is that ResultTypeQueryable is evaluated before deployment 
on the cluster, which means we have to execute the query twice if we want to 
use ResultSetMetaData. For a complex query this could become quite expensive 
(for very little gain). You could try to reduce this by adding a where clause 
that's always false ("WHERE 1 = 2"), but it seems very prone to failure (for 
example if there already is a where clause).

let me know what you think.

But could you  tell me more about your other comment, about fieldNames? It's 
been quite a while since i worked on the JDBC stuff, I'm currently at a loss 
about what you mean/what benefit it brings. :)

> make JDBCInputFormat implement ResultTypeQueryable
> --------------------------------------------------
>
>                 Key: FLINK-3445
>                 URL: https://issues.apache.org/jira/browse/FLINK-3445
>             Project: Flink
>          Issue Type: Improvement
>    Affects Versions: 0.10.2
>            Reporter: Ken Geis
>
> A JDBC statement can be interrogated to see what columns and types it will 
> return. Flink should be able to use this to make JDBCInputFormat implement 
> ResultTypeQueryable to provide type information without needing to code again.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to