gustavodemorais commented on code in PR #28235:
URL: https://github.com/apache/flink/pull/28235#discussion_r3304943274
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java:
##########
@@ -840,25 +840,35 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
"UPDATE_BEFORE"))))
.withConditionalTrait(
StaticArgumentTrait.REQUIRE_FULL_DELETE,
- TraitCondition.or(
- // op_mapping omitted:
default mapping includes
- // DELETE.
- TraitCondition.not(
-
TraitCondition.argIsPresent(
-
"op_mapping")),
- TraitCondition.argMatches(
- "op_mapping",
- Map.class,
- mapping ->
-
opMappingContainsKey(
-
(Map<String, String>)
-
mapping,
-
"DELETE")))),
+ // Require full deletes only when
the user explicitly
+ // asks for them via
produces_full_deletes=TRUE *and*
+ // the active op_mapping includes
DELETE. Otherwise the
+ // planner can skip
ChangelogNormalize for upsert
+ // sources that emit key-only
deletes.
+ TraitCondition.and(
+
TraitCondition.argIsEqualTo(
+
"produces_full_deletes", Boolean.TRUE),
Review Comment:
Let's go with produces_full_deletes yes as default (adjustment from the
flip). This aligns with what we added in the first versions and I think it's a
better default behavior than the opposite.
--
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]