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

Quanlong Huang resolved IMPALA-11354.
-------------------------------------
    Fix Version/s: Impala 4.2.0
       Resolution: Fixed

Resolving this. Thank [~tmate] and [~MikaelSmith] for your review!

> load_data.py can't force reload views
> -------------------------------------
>
>                 Key: IMPALA-11354
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11354
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Infrastructure
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>            Priority: Major
>             Fix For: Impala 4.2.0
>
>
> I modified the definition of functional.alltypes_view in 
> testdata/datasets/functional/functional_schema_template.sql to add a comment 
> on it. Then I used load_data.py to recreate (force reload) the view:
> {code:bash}
> bin/load-data.py -f -e core -w functional-query --table_formats=text/none 
> --table_names=alltypes_view
> {code}
> The command succeeds but the view doesn't change. Looking into the log file 
> (logs/data_loading/sql/functional/create-functional-query-core-impala-generated-text-none-none.sql.log),
>  the reason is that the previous DROP statement doesn't take effect so the 
> following CREATE VIEW IF NOT EXISTS doesn't take effect either.
> {noformat}
> CREATE DATABASE IF NOT EXISTS functional
> Summary: Returned 1 rows
> Success: True
> Took: 0.059229850769(s)
> Data:
> Database already exists.
> DROP TABLE IF EXISTS functional.alltypes_view
> Summary: Returned 1 rows
> Success: True
> Took: 0.00394201278687(s)
> Data:
> Drop table is not allowed on a view.
> CREATE VIEW IF NOT EXISTS functional.alltypes_view
> COMMENT 'View on alltypes'
> AS SELECT * FROM functional.alltypes
> Summary: Returned 1 rows
> Success: True
> Took: 0.0564069747925(s)
> Data:
> View already exists.
> {noformat}
> We should use DROP VIEW instead of DROP TABLE when force reloading a view.



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

Reply via email to