You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2019/05/02 04:57:41 UTC
[GitHub] [hive] ashutosh-bapat commented on a change in pull request #608:
Hive21598 : CTAS on ACID table during incremental does not replicated data.
ashutosh-bapat commented on a change in pull request #608: Hive21598 : CTAS on ACID table during incremental does not replicated data.
URL: https://github.com/apache/hive/pull/608#discussion_r280289117
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/table/CreateTableOperation.java
##########
@@ -140,6 +145,26 @@ private void createTableNonReplaceMode(Table tbl) throws HiveException {
Table createdTable = context.getDb().getTable(tbl.getDbName(), tbl.getTableName());
DataContainer dc = new DataContainer(createdTable.getTTable());
context.getQueryState().getLineageState().setLineage(createdTable.getPath(), dc, createdTable.getCols());
+
+ // We did not create the table when moving the data files for a non-partitioned table and
+ // thus could not add a write notification required for a transactional table. Do that
+ // here, after we have created the table. Since this is a newly created table, listing all
+ // the files in the directory and listing only the ones corresponding to the given id
+ // doesn't have much difference.
+ if (!createdTable.isPartitioned() && AcidUtils.isTransactionalTable(createdTable)) {
Review comment:
For partitioned table, the logic creates the partitioned table first and then load the data into a partition (not the table). See comments and code around line 7632 in genFileSinkPlan(). So, we do not need to do it for a partitioned table.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org