phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] swaroopak commented on a change in pull request #502: [WIP]PHOENIX-5261: Implement ALTER TABLE ADD COLUMN CASCADE
Date Wed, 15 May 2019 17:22:12 GMT
swaroopak commented on a change in pull request #502: [WIP]PHOENIX-5261: Implement ALTER TABLE
ADD COLUMN CASCADE
URL: https://github.com/apache/phoenix/pull/502#discussion_r284365122
 
 

 ##########
 File path: phoenix-core/src/main/antlr3/PhoenixSQL.g
 ##########
 @@ -656,8 +656,8 @@ alter_session_node returns [AlterSessionStatement ret]
 // Parse an alter table statement.
 alter_table_node returns [AlterTableStatement ret]
     :   ALTER (TABLE | v=VIEW) t=from_table_name
-        ( (DROP COLUMN (IF ex=EXISTS)? c=column_names) | (ADD (IF NOT ex=EXISTS)? (d=column_defs)
(p=fam_properties)?) | (SET (p=fam_properties)) )
-        { PTableType tt = v==null ? (QueryConstants.SYSTEM_SCHEMA_NAME.equals(t.getSchemaName())
? PTableType.SYSTEM : PTableType.TABLE) : PTableType.VIEW; ret = ( c == null ? factory.addColumn(factory.namedTable(null,t),
tt, d, ex!=null, p) : factory.dropColumn(factory.namedTable(null,t), tt, c, ex!=null) ); }
+        ( (DROP COLUMN (IF ex=EXISTS)? c=column_names) | (ADD COLUMN (cas=CASCADE (list =
index_names)? (IF NOT ex=EXISTS)? (d=column_defs) (p=fam_properties)?) | (SET (p=fam_properties))
)
+        { PTableType tt = v==null ? (QueryConstants.SYSTEM_SCHEMA_NAME.equals(t.getSchemaName())
? PTableType.SYSTEM : PTableType.TABLE) : PTableType.VIEW; ret = ( c == null ? factory.addColumn(factory.namedTable(null,t),
tt, d, ex!=null, p, cas!=null) : factory.dropColumn(factory.namedTable(null,t), tt, c, ex!=null,
list) ); }
 
 Review comment:
   Thanks for the comment. We won't support this on views and I see why you would ask, it's
the same grammar style.
   PS. This is not ready for review yet. I'll tag you and others soon.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message