-- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License") you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. create table authorization_part (key int, value string) partitioned by (ds string) ALTER TABLE authorization_part SET TBLPROPERTIES ("PARTITION_LEVEL_PRIVILEGE"="TRUE") set hive.security.authorization.enabled=true -- column grant to user grant Create on table authorization_part to user hive_test_user grant Update on table authorization_part to user hive_test_user grant Drop on table authorization_part to user hive_test_user grant select on table src to user hive_test_user show grant user hive_test_user on table authorization_part database default table authorization_part principalName hive_test_user principalType USER privilege Create grantTime 1301676873 grantor hudson database default table authorization_part principalName hive_test_user principalType USER privilege Update grantTime 1301676874 grantor hudson database default table authorization_part principalName hive_test_user principalType USER privilege Drop grantTime 1301676874 grantor hudson alter table authorization_part add partition (ds='2010')