You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2022/07/07 02:58:00 UTC

[jira] [Created] (IMPALA-11420) Support ALTER VIEW SET TBLPROPERTIES

Quanlong Huang created IMPALA-11420:
---------------------------------------

             Summary: Support ALTER VIEW SET TBLPROPERTIES
                 Key: IMPALA-11420
                 URL: https://issues.apache.org/jira/browse/IMPALA-11420
             Project: IMPALA
          Issue Type: New Feature
          Components: Frontend
            Reporter: Quanlong Huang


ALTER VIEW SET TBLPROPERTIES is supported in Hive but not Impala.
{noformat}
Query: alter view functional.complex_view set tblproperties ('Authorized' = 'false')
ERROR: ParseException: Syntax error in line 1:
...nctional.complex_view set tblproperties ('Authorized' ...
                             ^
Encountered: TBLPROPERTIES
Expected: IDENTIFIER

CAUSED BY: Exception: Syntax error{noformat}

We currently only support altering the view definition, view name and owner. See fe/src/main/cup/sql-parser.cup:
{code}
alter_view_stmt ::=
  KW_ALTER KW_VIEW table_name:table view_column_defs:col_defs KW_AS
  query_stmt:view_def
  {: RESULT = new AlterViewStmt(table, col_defs, view_def); :}
  | KW_ALTER KW_VIEW table_name:before_table KW_RENAME KW_TO table_name:new_table
  {: RESULT = new AlterTableOrViewRenameStmt(before_table, new_table, false); :}
  | KW_ALTER KW_VIEW table_name:table KW_SET IDENT:owner_id IDENT:user_id
    ident_or_default:user
  {:
    parser.checkIdentKeyword("OWNER", owner_id);
    parser.checkIdentKeyword("USER", user_id);
    RESULT = new AlterViewSetOwnerStmt(table, new Owner(TOwnerType.USER, user));
  :}
  | KW_ALTER KW_VIEW table_name:table KW_SET IDENT:owner_id KW_ROLE ident_or_default:role
  {:
    parser.checkIdentKeyword("OWNER", owner_id);
    RESULT = new AlterViewSetOwnerStmt(table, new Owner(TOwnerType.ROLE, role));
  :}
  ;
{code}
It'd be nice to support altering the tblproperties.



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