You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Benjamin Maquet (Jira)" <ji...@apache.org> on 2021/10/25 08:25:00 UTC

[jira] [Comment Edited] (HUDI-2611) `create table if not exists` should print message instead of throwing error

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

Benjamin Maquet edited comment on HUDI-2611 at 10/25/21, 8:24 AM:
------------------------------------------------------------------

It seems some work has already been done for this issue in this PR: [https://github.com/apache/hudi/pull/3510]

In master, it now errors with 

*Can not create the managed table('TABLE'). The associated location('TABLE_LOCATION') already exists.;*

Is an error the best solution? Can't we check if the files that already exist at that location are Hudi files, and if the schema matches the schema of the table we would like to create?

CREATE TABLE IF NOT EXISTS should, in my opinion, not error if table exists already IN PATH (and not necessarily in catalog).

Would love your input [~pengzhiwei], as you are the above PR creator.
Thanks

 


was (Author: bmaquet):
It seems some work has already been done for this issue in this PR: [https://github.com/apache/hudi/pull/3510]

In master, it now errors with 

*Can not create the managed table('TABLE'). The associated location('TABLE_LOCATION') already exists.;*

Is an error the best solution? Can't we check if the files that already exist at that location are Hudi files, and if the schema matches the schema of the table we would like to create?

CREATE TABLE IF NOT EXISTS should, in my opinion, not error if table exists already IN PATH (and not necessarily in catalog).

 

> `create table if not exists` should print message instead of throwing error
> ---------------------------------------------------------------------------
>
>                 Key: HUDI-2611
>                 URL: https://issues.apache.org/jira/browse/HUDI-2611
>             Project: Apache Hudi
>          Issue Type: Sub-task
>          Components: Spark Integration
>            Reporter: Raymond Xu
>            Priority: Minor
>              Labels: user-support-issues
>
> See details in
> https://github.com/apache/hudi/issues/3845#issue-1033218877



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