sepuri sai krishna created FLINK-41019:
------------------------------------------
Summary: COMPILE PLAN does not record
table.exec.sink.nested-constraint-enforcer, so EXECUTE PLAN uses the cluster's
value
Key: FLINK-41019
URL: https://issues.apache.org/jira/browse/FLINK-41019
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Affects Versions: 2.3.0, 2.2.0, 2.1.0, 2.4.0
Reporter: sepuri sai krishna
A compiled plan is meant to pin the sink's behaviour so that running it later,
on another
session or cluster, produces the same job. For the sink's constraint
enforcement that is only
partly true today.
Compile any INSERT into a sink and look at the sink node's {{configuration}}
block in the plan
JSON. It carries:
{noformat}
"table.exec.sink.keyed-shuffle"
"table.exec.sink.not-null-enforcer"
"table.exec.sink.rowtime-inserter"
"table.exec.sink.type-length-enforcer"
"table.exec.sink.upsert-materialize"
{noformat}
{{table.exec.sink.nested-constraint-enforcer}} is not there, although the sink
reads it at
planning time in the same place as the other two enforcer options.
Effect: set {{table.exec.sink.nested-constraint-enforcer}} to {{ROWS}} or
{{ROWS_AND_COLLECTIONS}}, run COMPILE PLAN, then run EXECUTE PLAN on a session
that leaves the
option at its {{IGNORE}} default. The job that comes back does not enforce the
nested
constraints the plan was compiled with, and nothing warns about it. The reverse
direction
changes the plan's shape too.
The option has been available since 2.1 (FLINK-37768), and the sink's plan node
was given a new
version in 2.3 (FLINK-38765), so plans compiled on 2.1 through 2.4-SNAPSHOT are
all affected.
Both the streaming and the batch sink read the option.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)