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 2022/06/14 02:36:00 UTC

[jira] [Created] (IMPALA-11354) load_data.py can't force reload views

Quanlong Huang created IMPALA-11354:
---------------------------------------

             Summary: 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


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.7#820007)

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