[
https://issues.apache.org/jira/browse/HIVE-25710?focusedWorklogId=685216&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-685216
]
ASF GitHub Bot logged work on HIVE-25710:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Nov/21 12:29
Start Date: 23/Nov/21 12:29
Worklog Time Spent: 10m
Work Description: pvary commented on a change in pull request #2796:
URL: https://github.com/apache/hive/pull/2796#discussion_r755075666
##########
File path:
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##########
@@ -1841,39 +1841,47 @@ public void dropTable(String catName, String dbname,
String name, boolean delete
}
}
+ @Override
+ public void truncateTable(String dbName, String tableName, List<String>
partNames,
+ String validWriteIds, long writeId, boolean deleteData) throws
TException {
+ truncateTableInternal(getDefaultCatalog(conf),
+ dbName, tableName, partNames, validWriteIds, writeId, deleteData);
+ }
+
@Override
public void truncateTable(String dbName, String tableName, List<String>
partNames,
String validWriteIds, long writeId) throws TException {
truncateTableInternal(getDefaultCatalog(conf),
- dbName, tableName, partNames, validWriteIds, writeId);
+ dbName, tableName, partNames, validWriteIds, writeId, true);
}
@Override
public void truncateTable(String dbName, String tableName, List<String>
partNames) throws TException {
- truncateTableInternal(getDefaultCatalog(conf), dbName, tableName,
partNames, null, -1);
+ truncateTableInternal(getDefaultCatalog(conf), dbName, tableName,
partNames, null, -1, true);
}
@Override
public void truncateTable(String catName, String dbName, String tableName,
List<String> partNames)
throws TException {
- truncateTableInternal(catName, dbName, tableName, partNames, null, -1);
+ truncateTableInternal(catName, dbName, tableName, partNames, null, -1,
true);
}
private void truncateTableInternal(String catName, String dbName, String
tableName,
- List<String> partNames, String validWriteIds, long writeId)
- throws MetaException, TException {
+ List<String> partNames, String validWriteIds, long writeId, boolean
deleteData)
+ throws TException {
Table table = getTable(catName, dbName, tableName);
HiveMetaHook hook = getHook(table);
- EnvironmentContext envContext = new EnvironmentContext();
+ EnvironmentContext context = new EnvironmentContext();
+ context.putToProperties("truncateSkipDataDeletion",
Boolean.toString(!deleteData));
Review comment:
Should `truncateSkipDataDeletion` be a constant?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 685216)
Time Spent: 40m (was: 0.5h)
> Config used to enable non-blocking TRUNCATE is not properly propagated
> ----------------------------------------------------------------------
>
> Key: HIVE-25710
> URL: https://issues.apache.org/jira/browse/HIVE-25710
> Project: Hive
> Issue Type: Sub-task
> Reporter: Denys Kuzmenko
> Priority: Major
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)