[ 
https://issues.apache.org/jira/browse/IMPALA-7209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pooja Nilangekar updated IMPALA-7209:
-------------------------------------
    Fix Version/s: Impala 3.1.0

> Disallow self referencing ALTER VIEW statments
> ----------------------------------------------
>
>                 Key: IMPALA-7209
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7209
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>            Reporter: Pooja Nilangekar
>            Assignee: Pooja Nilangekar
>            Priority: Major
>             Fix For: Impala 3.1.0
>
>
> Currently, an ALTER VIEW statement accepts self referencing definitions. 
> However, upon querying the altered view, the analyzer is unable to find the 
> reference and hence throws a StackOverflowError: null error.
> The expected behavior would be to throw an AnalysisException while executing 
> the alter view statement.
>  
> Example:
>  
> {code:java}
> [localhost:21000] default> create view foo as select * from 
> functional.alltypes;
> Query: create view foo as select * from functional.alltypes
> Query submitted at: 2018-07-03 11:36:48 (Coordinator: 
> http://pooja-OptiPlex-7040:25000)
> Query progress can be monitored at: 
> http://pooja-OptiPlex-7040:25000/query_plan?query_id=614e03efbcb4d8b1:586a4bad00000000
> +------------------------+
> | summary                |
> +------------------------+
> | View has been created. |
> +------------------------+
> Fetched 1 row(s) in 0.26s
> [localhost:21000] default> alter view foo as select * from foo;
> Query: alter view foo as select * from foo
> +------------------------+
> | summary                |
> +------------------------+
> | View has been altered. |
> +------------------------+
> Fetched 1 row(s) in 5.65s
> [localhost:21000] default> select * from foo;
> Query: select * from foo
> Query submitted at: 2018-07-03 11:37:12 (Coordinator: 
> http://pooja-OptiPlex-7040:25000)
> ERROR: StackOverflowError: null 
> {code}
>  
> The select statement on the view fails because the analyzer can't resolve its 
> reference. Other databases return failure during the alter view statement 
> because stating.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to