Martijn Visser created FLINK-40891:
--------------------------------------
Summary: NDU plan visitor does not propagate determinism
requirements through PTFs without REQUIRE_UPDATE_BEFORE
Key: FLINK-40891
URL: https://issues.apache.org/jira/browse/FLINK-40891
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Affects Versions: 2.4.0
Reporter: Martijn Visser
The NDU plan visitor only requires the partition-key columns of a PTF table
argument to be deterministic, unless the argument declares
REQUIRE_UPDATE_BEFORE. For example, {{SELECT a, ndFunc(b) AS nb FROM
upsert_src}} into a set-semantic PTF that emits retractions into a sink without
primary key passes {{TRY_RESOLVE}}, although the function may echo nb into its
retractions. Without the PTF, or with a REQUIRE_UPDATE_BEFORE function, the
same query is rejected.
This was accepted in the FLINK-38233 review to avoid being too strict and is
only recorded in a code comment in visitPtf. We should either require
determinism for all consumed input columns of such PTFs or document the
limitation on the determinism page, and add a test for this case either way.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)