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

Gustavo de Morais updated FLINK-40968:
--------------------------------------
        Fix Version/s: 2.4.0
         Release Note: The Table API methods toChangelog() and fromChangelog() 
now accept an op_mapping built with map(...), for example map("c", "INSERT", 
"u", "UPDATE_AFTER").asArgument("op_mapping"), matching SQL's MAP[...]. 
Previously toChangelog() failed with "The 'op_mapping' argument must be a 
constant MAP literal." and fromChangelog() failed with a NoSuchElementException.
    Affects Version/s: 2.3.0

> Accept map() as op_mapping in Table API toChangelog() and fromChangelog()
> -------------------------------------------------------------------------
>
>                 Key: FLINK-40968
>                 URL: https://issues.apache.org/jira/browse/FLINK-40968
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 2.3.0, 2.4.0
>            Reporter: Timo Theusner
>            Assignee: Timo Theusner
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.4.0
>
>
> h2. Description
> The documented Table API calls {{toChangelog(..., 
> map(...).asArgument("op_mapping"))}} and {{fromChangelog(...)}} fail. 
> TO_CHANGELOG with "must be a constant MAP literal", FROM_CHANGELOG with a 
> {{{}NoSuchElementException{}}}. {{TableApiCallContext#isArgumentLiteral}} 
> rejects {{map(...)}} calls, unlike SQL's {{{}MAP[...]{}}}, and both changelog 
> type strategies treat a failed check as success when they must not throw. 
> Both calls should behave like their SQL counterparts.
> h2. Proposed Changes
>  * Treat {{map(...)}} of non-null string literals as a constant in 
> {{ResolveCallByArgumentsRule.TableApiCallContext#isArgumentLiteral}} and 
> {{#getArgumentValue}}
>  * Return error messages from the check helpers in 
> {{FromChangelogTypeStrategy}} and {{ToChangelogTypeStrategy}} and call 
> {{CallContext#fail}} once in {{validateInputs}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to