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 2022/07/01 14:52:55 UTC

[GitHub] [hive] saihemanth-cloudera commented on a diff in pull request #3247: HIVE-26055: Added the right HivePrivilegesObjects for Alter table ren…

saihemanth-cloudera commented on code in PR #3247:
URL: https://github.com/apache/hive/pull/3247#discussion_r912033165


##########
itests/util/src/main/java/org/apache/hadoop/hive/ql/hooks/VerifyOutputTableLocationSchemeIsFileHook.java:
##########
@@ -24,10 +24,10 @@ public class VerifyOutputTableLocationSchemeIsFileHook implements ExecuteWithHoo
 
   @Override
   public void run(HookContext hookContext) {
-    for (WriteEntity output : hookContext.getOutputs()) {
-      if (output.getType() == WriteEntity.Type.TABLE) {
-        String scheme = output.getTable().getDataLocation().toUri().getScheme();
-        Assert.assertTrue(output.getTable().getTableName() + " has a location which has a " +
+    for (ReadEntity input : hookContext.getInputs()) {

Review Comment:
   I changed it for the following reason:
   The output list now has a source table(old table name) and destination table(renamed table name). This class is used in the alter_table_location.q to check the schema of renamed table file location. 
   renamed table's getDataLocation() would be null at this stage because we'll be setting the table's location in the MetaStoreDefaultTransformer class in the HMS during execution. HMS will set the new location with the same schema. That's the reason why I have changed from outputs to inputs. 
   



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org