15 package com.cloudera.impala.analysis;
19 import com.cloudera.impala.thrift.TShowGrantRoleParams;
20 import com.google.common.base.Preconditions;
21 import com.google.common.base.Strings;
34 Preconditions.checkNotNull(roleName);
40 TShowGrantRoleParams params =
new TShowGrantRoleParams();
42 params.setRequesting_user(requestingUser_.getShortName());
44 params.setPrivilege(privilegeSpec_.toThrift());
45 params.getPrivilege().setRole_id(
role_.
getId());
52 StringBuilder sb =
new StringBuilder(
"SHOW GRANT ROLE ");
54 if (
privilegeSpec_ != null) sb.append(
" " + privilegeSpec_.toSql());
60 super.analyze(analyzer);
void analyze(Analyzer analyzer)
TShowGrantRoleParams toThrift()
final PrivilegeSpec privilegeSpec_
ShowGrantRoleStmt(String roleName, PrivilegeSpec privilegeSpec)