dbName, tableName, columnName);
if (userNameColumnPriv != null && userNameColumnPriv.size() > 0) {
List<PrivilegeGrantInfo> grantInfos = new ArrayList<PrivilegeGrantInfo>(
userNameColumnPriv.size());
for (int i = 0; i < userNameColumnPriv.size(); i++) {
MTableColumnPrivilege item = userNameColumnPriv.get(i);
grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item
.getCreateTime(), item.getGrantor(), getPrincipalTypeFromStr(item
.getGrantorType()), item.getGrantOption()));
}
return grantInfos;
}
} else {
List<MPartitionColumnPrivilege> userNameColumnPriv = this
.listPrincipalPartitionColumnGrants(principalName,
principalType, dbName, tableName, partitionName, columnName);
if (userNameColumnPriv != null && userNameColumnPriv.size() > 0) {
List<PrivilegeGrantInfo> grantInfos = new ArrayList<PrivilegeGrantInfo>(
userNameColumnPriv.size());
for (int i = 0; i < userNameColumnPriv.size(); i++) {
MPartitionColumnPrivilege item = userNameColumnPriv.get(i);
grantInfos.add(new PrivilegeGrantInfo(item.getPrivilege(), item
.getCreateTime(), item.getGrantor(), getPrincipalTypeFromStr(item
.getGrantorType()), item.getGrantOption()));
}
return grantInfos;
}
}
return new ArrayList<PrivilegeGrantInfo>(0);