AHeise commented on code in PR #27347:
URL: https://github.com/apache/flink/pull/27347#discussion_r2622426060


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlDdlToOperationConverterTest.java:
##########
@@ -1117,28 +1117,33 @@ void testAlterTable() throws Exception {
         // test alter table options
         checkAlterNonExistTable("alter table %s nonexistent set ('k1' = 'v1', 
'K2' = 'V2')");
         Operation operation =
-                parse("alter table if exists cat1.db1.tb1 set ('k1' = 'v1', 
'K2' = 'V2')");
+                parse(
+                        "alter table if exists cat1.db1.tb1 set ('k1' = 'v1', 
'k2' = 'v2', 'K2' = 'V1', 'K2' = 'V2')");
         Map<String, String> expectedOptions = new HashMap<>();
         expectedOptions.put("connector", "dummy");
         expectedOptions.put("k", "v");
         expectedOptions.put("k1", "v1");
+        expectedOptions.put("k2", "v2");
         expectedOptions.put("K2", "V2");
 
         assertAlterTableOptions(
                 operation,
                 expectedIdentifier,
                 expectedOptions,
-                Arrays.asList(TableChange.set("k1", "v1"), 
TableChange.set("K2", "V2")),
-                "ALTER TABLE IF EXISTS cat1.db1.tb1\n  SET 'k1' = 'v1',\n  SET 
'K2' = 'V2'");
+                Set.of(

Review Comment:
   Do we need to switch to set here because we don't retain the order anymore 
on the low-level? (We never did on high level)



##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/SqlParseUtils.java:
##########
@@ -87,7 +87,11 @@ public static Map<String, String> extractMap(@Nullable 
SqlNodeList propList) {
         }
         return propList.getList().stream()
                 .map(p -> (SqlTableOption) p)
-                .collect(Collectors.toMap(k -> k.getKeyString(), 
SqlTableOption::getValueString));
+                .collect(
+                        Collectors.toMap(
+                                k -> k.getKeyString(),
+                                SqlTableOption::getValueString,
+                                (v1, v2) -> v2));

Review Comment:
   Should we add a WARN?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to