You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2019/08/07 06:31:00 UTC

[jira] [Commented] (METAMODEL-1217) Drop table doesn't work for views with JDBC Tables

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

Kasper Sørensen commented on METAMODEL-1217:
--------------------------------------------

This seems correct and should be pretty easy to fix. To my knowledge the JDBC connector is the only one that even uses TableType.VIEW.

> Drop table doesn't work for views with JDBC Tables
> --------------------------------------------------
>
>                 Key: METAMODEL-1217
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-1217
>             Project: Apache MetaModel
>          Issue Type: Bug
>            Reporter: Gerard Dellemann
>            Priority: Minor
>
> A JdbcTable is a MutableTable. A MutableTable can have different TableType including TABLE and VIEW.
> The JdbcDropTableBuilder (line 69) builds a SQL Statement to drop tables:
> {code:java}
> "DROP TABLE " + tableLabel
> {code}
> This doesn't work if the MutableTable has TableType VIEW. Then it should be:
> {code:java}
> "DROP VIEW " + tableLabel
> {code}
> I haven't investigated this issue for other types of datastores. Only for JDBC.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)