[
https://issues.apache.org/jira/browse/FLINK-40018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gustavo de Morais updated FLINK-40018:
--------------------------------------
Fix Version/s: 2.4.0
> PTF changelog inference silently drops an unsatisfiable table input, causing
> IndexOutOfBoundsException
> ------------------------------------------------------------------------------------------------------
>
> Key: FLINK-40018
> URL: https://issues.apache.org/jira/browse/FLINK-40018
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 2.3.0
> Reporter: Gustavo de Morais
> Assignee: Gustavo de Morais
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.4.0
>
>
> When a Process Table Function (e.g. {{{}TO_CHANGELOG{}}}) has a
> table-argument input that cannot satisfy the required changelog (update)
> trait, {{FlinkChangelogModeInferenceProgram}} silently drops that input
> instead of failing.
> The drop happens in the PTF branch of the update-kind visitor: child results
> are collected with {{{}.flatten{}}}, which discards {{None}} (the "cannot
> satisfy" signal). The PTF is then rebuilt with zero inputs. This passes
> optimization, serializes to a compiled plan with empty
> {{{}inputChangelogModes{}}}, and only fails at job submission with a cryptic
> {{IndexOutOfBoundsException: Index 0 out of bounds for length 0}} in
> {{{}StreamExecProcessTableFunction.createRuntimeTableSemantics{}}}.
> *Repro:* a {{FROM_CHANGELOG}} view (op_mapping maps INSERT/DELETE only →
> retract output) feeding {{TO_CHANGELOG}} whose op_mapping omits
> {{UPDATE_BEFORE}} (requires only-after input). The retract input can't
> satisfy only-after, so it's dropped.
> *Expected:* a clear {{TableException}} (changelog mismatch), not an
> IndexOutOfBounds.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)