[ https://issues.apache.org/jira/browse/HIVE-18453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16603503#comment-16603503 ]
Eugene Koifman commented on HIVE-18453: --------------------------------------- [~ikryvenko], no. "create transactional..." should examine the create table statement and create a full CRUD table if possible (i.e. if it's a managed table stored as ORC, not sorted, etc.). If this table cannot be made full CRUD, it should check if it can be made insert-only transactional. If that is not possible (e.g. the table is external), it should raise an error. This is exactly what happens when a "create table ..." (w/o any transactional=true property in the create table stmt) is processed and both {{HiveConf.ConfVars.HIVE_CREATE_TABLES_AS_INSERT_ONLY}} and {{MetastoreConf.ConfVars.CREATE_TABLES_AS_ACID}} are set to true. That's why I'm suggesting that you look at {{SemanticAnalyzer.validateAndAddDefaultProperties()}} - this is where the logic to examine the new table is. I think you can just make your "create transactional table..." used this method. > ACID: Add "CREATE TRANSACTIONAL TABLE" syntax to unify ACID ORC & Parquet > support > --------------------------------------------------------------------------------- > > Key: HIVE-18453 > URL: https://issues.apache.org/jira/browse/HIVE-18453 > Project: Hive > Issue Type: Improvement > Components: Transactions > Reporter: Gopal V > Assignee: Igor Kryvenko > Priority: Major > Attachments: HIVE-18453.01.patch, HIVE-18453.02.patch, > HIVE-18453.03.patch, HIVE-18453.04.patch, HIVE-18453.05.patch, > HIVE-18453.06.patch, HIVE-18453.07.patch > > > The ACID table markers are currently done with TBLPROPERTIES which is > inherently fragile. > The "create transactional table" offers a way to standardize the syntax and > allows for future compatibility changes to support Parquet ACIDv2 tables > along with ORC tables. > The ACIDv2 design is format independent, with the ability to add new > vectorized input formats with no changes to the design. -- This message was sent by Atlassian JIRA (v7.6.3#76005)