Skip to content

Commit 0dc9ee4

Browse files
wysstartgowuys
authored andcommitted
[FLINK-22233][table] Fix "constant" typo in PRIMARY KEY exception messages
This closes #15656 Co-authored-by: wuys <wuyongsheng@qtshe.com>
1 parent 32c64bb commit 0dc9ee4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/operations/SqlToOperationConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ private void validateTableConstraint(SqlTableConstraint constraint) {
943943
if (constraint.isEnforced()) {
944944
throw new ValidationException(
945945
"Flink doesn't support ENFORCED mode for "
946-
+ "PRIMARY KEY constaint. ENFORCED/NOT ENFORCED controls if the constraint "
946+
+ "PRIMARY KEY constraint. ENFORCED/NOT ENFORCED controls if the constraint "
947947
+ "checks are performed on the incoming/outgoing data. "
948948
+ "Flink does not own the data therefore the only supported mode "
949949
+ "is the NOT ENFORCED mode");

flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/operations/SqlToOperationConverterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ public void testCreateTableWithPrimaryKeyEnforced() {
473473
thrown.expect(ValidationException.class);
474474
thrown.expectMessage(
475475
"Flink doesn't support ENFORCED mode for PRIMARY KEY "
476-
+ "constaint. ENFORCED/NOT ENFORCED controls if the constraint "
476+
+ "constraint. ENFORCED/NOT ENFORCED controls if the constraint "
477477
+ "checks are performed on the incoming/outgoing data. "
478478
+ "Flink does not own the data therefore the only supported mode is the NOT ENFORCED mode");
479479
parse(sql, planner, parser);
@@ -1230,7 +1230,7 @@ public void testAlterTableAddPkConstraintEnforced() throws Exception {
12301230
// Test alter table add enforced
12311231
thrown.expect(ValidationException.class);
12321232
thrown.expectMessage(
1233-
"Flink doesn't support ENFORCED mode for PRIMARY KEY constaint. "
1233+
"Flink doesn't support ENFORCED mode for PRIMARY KEY constraint. "
12341234
+ "ENFORCED/NOT ENFORCED controls if the constraint checks are performed on the "
12351235
+ "incoming/outgoing data. Flink does not own the data therefore the "
12361236
+ "only supported mode is the NOT ENFORCED mode");

0 commit comments

Comments
 (0)