[
https://issues.apache.org/jira/browse/SPARK-49538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated SPARK-49538:
-----------------------------------
Labels: pull-request-available (was: )
> Detect unused message parameters
> --------------------------------
>
> Key: SPARK-49538
> URL: https://issues.apache.org/jira/browse/SPARK-49538
> Project: Spark
> Issue Type: Sub-task
> Components: SQL, Tests
> Affects Versions: 4.0.0
> Reporter: Max Gekk
> Assignee: Max Gekk
> Priority: Minor
> Labels: pull-request-available
>
> The passed error message parameters and places holders in message format can
> not be matched. From the code maintainability perspective, it would be nice
> to detect such cases while running tests.
> For example, the error message format could look like:
> {code}
> "CANNOT_UP_CAST_DATATYPE" : {
> "message" : [
> "Cannot up cast <expression> from <sourceType> to <targetType>.",
> "<details>"
> ],
> "sqlState" : "42846"
> },
> {code}
>
> but the passed message parameters have extra parameter:
> {code:scala}
> messageParameters = Map(
> "expression" -> "CAST('aaa' AS LONG)",
> "sourceType" -> "STRING",
> "targetType" -> "LONG",
> "op" -> "CAST", // unused parameter
> "details" -> "implicit cast"
> ))
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]