Presto: Allow setting location property for managed tables too

Created on 12 Aug 2019  路  1Comment  路  Source: prestosql/presto

Currently, CREATE TABLE creates an external table if we provide external_location property in the query and creates managed table otherwise.
But Hive allows creating managed tables with location provided in the DDL so we should allow this via Presto too.

This will also change SHOW CREATE TABLE behaviour to now show location even for managed tables.

We can do this:

  1. Have a boolean property "external" to signify external tables
  2. Rename "external_location" property to just "location" and allow it to be used in both case of external=true and external=false

c.c. @electrum I see your commits around this. Let me know if you have other ideas around this.

Most helpful comment

This sounds good to me. We probably want to accept the old property on creation for a while, to keep compatibility with existing DDL.

>All comments

This sounds good to me. We probably want to accept the old property on creation for a while, to keep compatibility with existing DDL.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lxynov picture lxynov  路  4Comments

jiangzhx picture jiangzhx  路  5Comments

ChethanUK picture ChethanUK  路  4Comments

theoretical-olive picture theoretical-olive  路  5Comments

byungnam picture byungnam  路  4Comments