[
https://issues.apache.org/jira/browse/PHOENIX-6344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17281470#comment-17281470
]
ASF GitHub Bot commented on PHOENIX-6344:
-----------------------------------------
gokceni commented on a change in pull request #1135:
URL: https://github.com/apache/phoenix/pull/1135#discussion_r572485854
##########
File path:
phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterAddCascadeIndexIT.java
##########
@@ -172,6 +172,41 @@ public void testAlterDBOAddCascadeIndexAllUpsert() throws
Exception {
}
+ // Test with ALTER TABLE/VIEW CASCADE INDEX ALL with no indexes
+ @Test
+ public void testAlterDBOAddCascadeIndexAll_noIndexes() throws Exception {
+ String schemaName = "S_"+generateUniqueName();
+ String tableName = "T_"+generateUniqueName();
+ String viewName = "V_"+generateUniqueName();
+
+ String fullViewName = SchemaUtil.getQualifiedTableName(schemaName,
viewName);
+ String fullTableName = SchemaUtil.getQualifiedTableName(schemaName,
tableName);
+
+ conn.createStatement().execute("CREATE TABLE IF NOT EXISTS " +
fullTableName + " (\n" +
+ " state CHAR(2) NOT NULL,\n" +
+ " city VARCHAR NOT NULL,\n" +
+ " population BIGINT,\n" +
+ " CONSTRAINT my_pk PRIMARY KEY (state, city)) " +
tableDDLOptions);
+
+ if(isViewIndex) {
Review comment:
Is it possible to rename this as isViewScenario?
----------------------------------------------------------------
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:
[email protected]
> CASCADE on ALTER should NOOP when there are no secondary indexes
> ----------------------------------------------------------------
>
> Key: PHOENIX-6344
> URL: https://issues.apache.org/jira/browse/PHOENIX-6344
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Swaroopa Kadam
> Assignee: Swaroopa Kadam
> Priority: Minor
> Fix For: 5.1.0, 4.16.1, 4.17.0
>
>
> When a table/view does not have a secondary index, using cascade in the ALTER
> TABLE/VIEW .. ADD <column> should continue with default behavior (of only
> adding the column to table/view like a regular alter statement)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)