Class BaseAliasHandler
java.lang.Object
org.apache.drill.exec.planner.sql.handlers.AbstractSqlHandler
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler
org.apache.drill.exec.planner.sql.handlers.BaseAliasHandler
- Direct Known Subclasses:
CreateAliasHandler
,DropAliasHandler
,DropAllAliasesHandler
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler
DefaultSqlHandler.ConvertedRelNode, DefaultSqlHandler.MetaDataProviderModifier
-
Field Summary
Fields inherited from class org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler
config, context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkAdminPrivileges
(QueryOptionManager options) Admin privileges checker.protected void
Checks whether aliases support is enabled.protected AliasRegistry
getAliasRegistry
(String aliasTarget) protected boolean
hasAdminPrivileges
(QueryOptionManager options) Returnstrue
if query user has admin privileges.protected String
resolveUserName
(org.apache.calcite.sql.SqlNode user) Obtains userName from specified node and ensures that specified user has admin privileges for the case when it is different from the query user.Methods inherited from class org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler
addRenamedProject, convertToDrel, convertToPlan, convertToPop, convertToPrel, convertToRawDrel, getPlan, getPops, log, log, log, logAndSetTextPlan, rewrite, transform, transform, validateAndConvert, validateNode
Methods inherited from class org.apache.drill.exec.planner.sql.handlers.AbstractSqlHandler
unwrap
-
Constructor Details
-
BaseAliasHandler
-
-
Method Details
-
checkAliasesEnabled
protected void checkAliasesEnabled()Checks whether aliases support is enabled. -
checkAdminPrivileges
Admin privileges checker.- Parameters:
options
- Options object
-
hasAdminPrivileges
Returnstrue
if query user has admin privileges.- Parameters:
options
- Options object- Returns:
true
if query user has admin privileges
-
resolveUserName
Obtains userName from specified node and ensures that specified user has admin privileges for the case when it is different from the query user. If no user specified, query user will be returned.- Parameters:
user
- source for userName- Returns:
- userName
-
getAliasRegistry
-