[
https://issues.apache.org/jira/browse/FLINK-40968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timo Theusner updated FLINK-40968:
----------------------------------
Affects Version/s: 2.4.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.4.0
> Reporter: Timo Theusner
> Assignee: Timo Theusner
> Priority: Major
>
> 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)