[ 
https://issues.apache.org/jira/browse/FLINK-41114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated FLINK-41114:
-----------------------------------
    Labels: pull-request-available  (was: )

> Document the uid argument for FROM_CHANGELOG and TO_CHANGELOG
> -------------------------------------------------------------
>
>                 Key: FLINK-41114
>                 URL: https://issues.apache.org/jira/browse/FLINK-41114
>             Project: Flink
>          Issue Type: Improvement
>          Components: Documentation
>            Reporter: Gustavo de Morais
>            Assignee: Gustavo de Morais
>            Priority: Major
>              Labels: pull-request-available
>
> The changelog conversion docs for {{FROM_CHANGELOG}} and {{TO_CHANGELOG}} 
> don't mention the implicit {{uid}} argument. With set semantics ({{PARTITION 
> BY}}), both functions use their name as the default UID. So calling the same 
> function twice in one job, for example in a {{STATEMENT SET}}, fails at 
> runtime with:
> {code}
> java.lang.IllegalArgumentException: Hash collision on user-specified ID 
> "FROM_CHANGELOG". Most likely cause is a non-unique ID. Please check that all 
> IDs specified via `uid(String)` are unique.
> {code}
> The fix is to give each call a unique {{uid}}, for example 
> {{FROM_CHANGELOG(input => TABLE t PARTITION BY k, uid => 'changelog-1')}}. 
> This is only explained in the general PTF guide under "Query Evolution with 
> UIDs", which users of the built-in functions are unlikely to find.
> We should add {{uid}} to the syntax and parameter tables of both functions 
> and add a short section with a multi-call example.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to