Both database 'db' and table 'test' are not exist. This will get error "AnalysisException: Could not resolve table reference: 'db.test'".
If enabled Ranger then get error "AuthorizationException: User 'xx' does not have privileges to execute 'SELECT' on default.db".
Actually maybe "Table does not exist: db.test" is more friendly tip . Just like 'insert into db.test' gives error "AnalysisException: Database does not exist: db".
resolvePath source code here ignores table not exist exception, and the above two errors return to the user.