gustavodemorais commented on code in PR #28235:
URL: https://github.com/apache/flink/pull/28235#discussion_r3318673764
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/ToChangelogTestPrograms.java:
##########
@@ -598,4 +598,192 @@ public class ToChangelogTestPrograms {
ValidationException.class,
"Duplicate change operation: 'DELETE'")
.build();
+
+ public static final TableTestProgram
INVALID_PRODUCES_FULL_DELETES_FOR_APPEND_ONLY =
+ TableTestProgram.of(
+
"to-changelog-invalid-produces-full-deletes-for-append-only",
+ "fails when produces_full_deletes=true on an input
that never emits DELETE rows")
+ .setupTableSource(SIMPLE_SOURCE)
+ .runFailingSql(
+ "SELECT * FROM TO_CHANGELOG("
+ + "input => TABLE t, "
+ + "produces_full_deletes => true)",
+ ValidationException.class,
+ "the input table only produces [INSERT] and never
emits DELETE rows")
+ .build();
+
+ //
--------------------------------------------------------------------------------------------
+ // Full vs partial deletes matrix (input kind x PARTITION BY x
produces_full_deletes)
+ //
--------------------------------------------------------------------------------------------
+
+ public static final TableTestProgram RETRACT_PRODUCES_PARTIAL_DELETES =
+ TableTestProgram.of(
+ "to-changelog-retract-produces-partial-deletes",
+ "retract input in row semantics with
produces_full_deletes=false: skips ChangelogNormalize and the partial DELETE
row from the input passes through unchanged")
+ .setupTableSource(
+ SourceTestStep.newBuilder("t")
+ .addSchema(
+ "name STRING PRIMARY KEY NOT
ENFORCED", "score BIGINT")
Review Comment:
You added it to
[ToChangelogOutputTypeStrategyTest.ja](https://github.com/apache/flink/pull/28235/files/e85c2644b018845fb1cd19431ee5da8f1594b5bc#diff-140d309e243999637609c3963eb949f27423d9bd678bb4617ec59e52e3c2f250)
instead of TestPrograms, right?
I think that should be enough. One detail, see
https://github.com/apache/flink/pull/28235#discussion_r3318657761
--
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]