deniskuzZ commented on code in PR #4312:
URL: https://github.com/apache/hive/pull/4312#discussion_r1190926687
##########
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/HiveCustomStorageHandlerUtils.java:
##########
@@ -71,4 +73,26 @@ public static void setWriteOperation(Configuration conf,
String tableName, Conte
conf.set(WRITE_OPERATION_CONFIG_PREFIX + tableName, operation.name());
}
+
+ public static boolean isWriteOperation(Configuration conf, String
tableName) {
+ if (conf == null || tableName == null) {
+ return false;
+ }
+ String operation = conf.get(FILESCAN_WRITE_OPERATION_CONFIG_PREFIX +
getTableName(tableName));
+ return Context.Operation.DELETE.name().equalsIgnoreCase(operation) ||
+ Context.Operation.UPDATE.name().equalsIgnoreCase(operation);
+ }
+
+ public static void setFileScanOperationType(Configuration conf, String
tableName, Context.Operation operation) {
+ if (conf == null || tableName == null) {
+ return;
+ }
+ conf.set(
+ FILESCAN_WRITE_OPERATION_CONFIG_PREFIX + getTableName(tableName),
+ operation.name());
+ }
+
+ private static String getTableName(String tableName) {
Review Comment:
why do we need this? see how we pass it to
`HiveIcebergInputFormat.getVectorizationConfName(tableName)` in orcRecordReader
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]