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

Pavel Kuznetsov edited comment on IGNITE-11470 at 4/24/19 6:20 PM:
-------------------------------------------------------------------

Hello, [~jooger]!
Here is my first part of comments:
1) {{org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getTables}} Seems we 
need to add {{TYPE_VIEW}} check. If we are fetching only VIEWS, we get empty 
result set.
1.1) Optional: we import {{TYPE_TABLE}} and {{TYPE_VIEW}} from Jdbc thin 
metadata to jdbc v2 one. Is it better to move these types to common jdbc utils?

2) {{org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getTableTypes}} : 
We expect one column in the result and two rows, so we should replace this (one 
row and two columns)
{code:java}
Collections.singletonList("TABLE_TYPE"),
//...
Collections.singletonList(Arrays.asList(TYPE_TABLE, TYPE_VIEW))
{code}

With this:
{code:java}
asList(singletonList(TYPE_TABLE), singletonList(TYPE_VIEW) )
{code}
Would you please check same case for jdbc thin?

3) I think we should provide default value "TABLE" for the 
{{org.apache.ignite.internal.processors.odbc.jdbc.JdbcTableMeta#tblType}}. 
Review the case: new driver is connected to the old server. Driver side will 
get {{null}} as a TABLE_TYPE



was (Author: pkouznet):
Hello, [~jooger]!
Here is my first part of comments:
1) {{org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getTables}} Seems we 
need to add {{TYPE_VIEW}} check. If we are fetching only VIEWS, we get empty 
result set.
1.1) Optional: we import {{TYPE_TABLE}} and {{TYPE_VIEW}} from Jdbc thin 
metadata to jdbc v2 one. Is it better to move these types to common jdbc utils?

2) {{org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getTableTypes}} : 
We expect one column in the result and two rows, so we should replace this (one 
row and two columns)
{code:java}
Collections.singletonList("TABLE_TYPE"),
//...
Collections.singletonList(Arrays.asList(TYPE_TABLE, TYPE_VIEW))
{code}

With this:
{code:java}
asList(singletonList(TYPE_TABLE), singletonList(TYPE_VIEW) )
{code}
Would you please check same case for jdbc thin?

3) I think we should provide default value "TABLE" for the 
{{org.apache.ignite.internal.processors.odbc.jdbc.JdbcTableMeta#tblType}}. 
Review the case: new driver is connected to the old server.


> Views don't show in Dbeaver
> ---------------------------
>
>                 Key: IGNITE-11470
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11470
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>            Reporter: Yury Gerzhedovich
>            Assignee: Yury Gerzhedovich
>            Priority: Major
>              Labels: iep-29
>             Fix For: 2.8
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> At Database navigator tab we can see no a views. As of now we should see at 
> least SQL system views.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to