Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-11420

Support ALTER VIEW SET TBLPROPERTIES

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.2.0
    • Frontend
    • ghx-label-10

    Description

      ALTER VIEW SET TBLPROPERTIES is supported in Hive but not Impala.

      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

      We currently only support altering the view definition, view name and owner. See fe/src/main/cup/sql-parser.cup:

      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));
        :}
        ;
      

      It'd be nice to support altering the tblproperties.

      Attachments

        Activity

          People

            xiabaike Baike Xia
            stigahuang Quanlong Huang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: