Class BaseAliasHandler

Direct Known Subclasses:
CreateAliasHandler, DropAliasHandler, DropAllAliasesHandler

public class BaseAliasHandler extends DefaultSqlHandler
  • Constructor Details

  • Method Details

    • checkAliasesEnabled

      protected void checkAliasesEnabled()
      Checks whether aliases support is enabled.
    • checkAdminPrivileges

      protected void checkAdminPrivileges(QueryOptionManager options)
      Admin privileges checker.
      Parameters:
      options - Options object
    • hasAdminPrivileges

      protected boolean hasAdminPrivileges(QueryOptionManager options)
      Returns true if query user has admin privileges.
      Parameters:
      options - Options object
      Returns:
      true if query user has admin privileges
    • resolveUserName

      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. If no user specified, query user will be returned.
      Parameters:
      user - source for userName
      Returns:
      userName
    • getAliasRegistry

      protected AliasRegistry getAliasRegistry(String aliasTarget)