phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] priyankporwal commented on a change in pull request #508: PHOENIX-5283: Add CASCADE INDEX ALL in the SQL Grammar of ALTER TABLE…
Date Fri, 17 May 2019 16:28:38 GMT
priyankporwal commented on a change in pull request #508: PHOENIX-5283: Add CASCADE INDEX ALL
in the SQL Grammar of ALTER TABLE…
URL: https://github.com/apache/phoenix/pull/508#discussion_r284978567
 
 

 ##########
 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 (cas=CASCADE INDEX (list=indexes
| all=ALL))? (IF NOT ex=EXISTS)? (d=column_defs) (p=fam_properties)?) | (SET (p=fam_properties))
)
 
 Review comment:
   Please confirm if this grammar works when there is an index named 'ALL'. Is there a way
to prevent such index/table names as keywords of the language?

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