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

Weizisheng commented on IMPALA-11245:
-------------------------------------

It's introduced by IMPALA-5152 
{code:java}
Unfortunately, the relevant code was hard-to-follow, subtle and not well 
tested, and therefore it was broken in several ways over the course of time. 
For example, the introduction of path analysis for nested types subtly broke 
the intended behavior
...
The following example illustrates the problem: SELECT * FROM a.b, x.y When 
resolving the path "a.b" we consider that "a" could be a database or a table. 
Similarly, "b" could be a table or a nested collection. If the path resolution 
for "a.b" adds a missing table entry, then the path resolution for "x.y" could 
exit prematurely, without trying the other path interpretations that would lead 
to adding the expected missing table. So effectively, the tables end up being 
loaded one-by-one. {code}
As [~alex.behm]  said above, can we just keep the intended behavior as it is. 
eg. If a table does not exist, just tell user that table's not exist. 

 

 

> 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.1#820001)

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

Reply via email to