You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Andries Engelbrecht (JIRA)" <ji...@apache.org> on 2015/10/26 21:33:27 UTC

[jira] [Commented] (DRILL-3979) Add support for "replace" in CTAS similar to views

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

Andries Engelbrecht commented on DRILL-3979:
--------------------------------------------

Most databases do not support the REPLACE clause for CTAS. With a VIEW there is not inherit data loss, while with CTAS there can be data loss if the existing table is dropped. That is part of why most databases requires an explicit DROP TABLE command.

Perhaps a better option would be a TEMP TABLE clause, which implies the data is transient.

> Add support for "replace" in CTAS similar to views
> --------------------------------------------------
>
>                 Key: DRILL-3979
>                 URL: https://issues.apache.org/jira/browse/DRILL-3979
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Query Planning & Optimization, Storage - Writer
>    Affects Versions: 1.2.0
>            Reporter: Abhishek Girish
>
> Drill could support "create or replace table" syntax, similar to the existing "create or replace view" syntax. 
> Given that "drop table" is now supported, I think it might be possible to support this. This could be helpful in automating tests and in SQL scripting. 



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