jnh5y commented on code in PR #24886:
URL: https://github.com/apache/flink/pull/24886#discussion_r1636579991


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlDdlToOperationConverterTest.java:
##########
@@ -1361,16 +1374,36 @@ public void testAlterTableDropConstraint() throws 
Exception {
                                 .getUnresolvedSchema()
                                 .getPrimaryKey())
                 .isNotPresent();
+    }
+
+    @Test
+    public void testAlterTableDropDistribution() throws Exception {
+        prepareNonManagedTableWithDistribution("tb1");
+        String expectedSummaryString = "ALTER TABLE cat1.db1.tb1\n  DROP 
DISTRIBUTION";
 
-        operation = parse("alter table tb1 drop primary key");
+        Operation operation = parse("alter table tb1 drop distribution");
         assertThat(operation).isInstanceOf(AlterTableChangeOperation.class);
         
assertThat(operation.asSummaryString()).isEqualTo(expectedSummaryString);
-        assertThat(
-                        ((AlterTableChangeOperation) operation)
-                                .getNewTable()
-                                .getUnresolvedSchema()
-                                .getPrimaryKey())
+        assertThat(((AlterTableChangeOperation) 
operation).getNewTable().getDistribution())
                 .isNotPresent();
+
+        prepareNonManagedTableWithDistribution("tb3");
+        // rename column used as distribution key

Review Comment:
   Removing this case of dropping the distribution.  The other two cases are 
for a drop and modify, so I think both of those make sense.



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

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to