private void validateAccess ( SqlNode node , SqlValidatorTable table , SqlAccessEnum requiredAccess ) { if ( table != null ) { SqlAccessType access = table . getAllowedAccess ( ) ; if ( ! access . allowsAccess ( requiredAccess ) ) { throw newValidationError ( node , RESOURCE . accessNotAllowed ( requiredAccess . name ( ) , table . getQualifiedName ( ) . toString ( ) ) ) ; } } }
Validates access to a table .