You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2023/04/14 01:40:00 UTC

[jira] [Commented] (IMPALA-11245) Inaccurate tips with 'select' on not exist table

    [ https://issues.apache.org/jira/browse/IMPALA-11245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17712145#comment-17712145 ] 

Quanlong Huang commented on IMPALA-11245:
-----------------------------------------

Sorry to miss this..

I think the current behavior makes sense. As the comment pointed out, we prefer reporting an authorization error over an analysis error, since we should not accidentally reveal the non-existence of a table/database if the user is not authorized.
[https://github.com/apache/impala/blob/3b3acd5c08c55258a9f5bc72fff2ac991ef977cd/fe/src/main/java/org/apache/impala/analysis/Analyzer.java#L910-L912]

> Inaccurate tips with 'select' on not exist table
> ------------------------------------------------
>
>                 Key: IMPALA-11245
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11245
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Frontend
>    Affects Versions: Impala 4.0.0, Impala 3.4.0
>            Reporter: Weizisheng
>            Priority: Minor
>              Labels: auto-deprioritized-minor
>
> {code:java}
> select count(1) from db.test;{code}
> 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|https://github.com/apache/impala/blob/c190966db932cf7b24881ce2213fd6f7d9192099/fe/src/main/java/org/apache/impala/analysis/Analyzer.java#L1237] source code here ignores table not exist exception, and the above two errors return to the user.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org