[
https://issues.apache.org/jira/browse/SPARK-60221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Serge Rielau resolved SPARK-60221.
----------------------------------
Resolution: Abandoned
> Misc small fixes, mop up
> ------------------------
>
> Key: SPARK-60221
> URL: https://issues.apache.org/jira/browse/SPARK-60221
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 5.0.0
> Reporter: Serge Rielau
> Priority: Major
>
> A grab bag of small fixes after main subtasks are done:
> Follow-up to SPARK-60108 (PR apache/spark#59325), which added
> UNSUPPORTED_JSON_CHAR_VARCHAR_MAP_KEY for JSON CHAR/VARCHAR map keys. Align
> the
> parallel XML condition from SPARK-60103 to match. Two items,
> message/formatting
> only -- do NOT change XML behavior (XML keys last-win; mapKeyDedupPolicy is
> not
> applied):
> 1. Message wording. Make UNSUPPORTED_XML_CHAR_VARCHAR_MAP_KEY parallel to the
> richer JSON wording.
> - JSON (target style), common/utils/.../error/error-conditions.json:
> line 1: "The JSON object name <key> is not a valid key for the map key
> type <dataType>."
> line 2: "A CHAR key must match the declared length exactly and a VARCHAR
> key
> must not exceed it; keys are never padded or trimmed. Use a
> STRING
> map key to accept any name."
> - XML (current, to update):
> line 1: "XML map keys of CHAR or VARCHAR cannot be padded or trimmed."
> line 2: "The key <key> is not valid for type <dataType>."
> Rework the XML text to the JSON structure (name-of-key first, then the
> CHAR-exact / VARCHAR-max rule and the "use STRING" hint), keeping
> XML-specific
> phrasing where appropriate.
> 2. 128-character key cap. QueryExecutionErrors.unsupportedXmlCharVarcharMapKey
> currently echoes the full key. Add the same truncation that
> unsupportedJsonCharVarcharMapKey uses: cap the displayed key at
> maxKeyChars = 128 and append "..." when longer (a key can be large user
> data).
> Files:
> - common/utils/src/main/resources/error/error-conditions.json
> (UNSUPPORTED_XML_CHAR_VARCHAR_MAP_KEY block)
> -
> sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
> (unsupportedXmlCharVarcharMapKey)
> Tests to update: XML map-key assertions in CharVarcharTestSuite
> (assertUnsupportedXmlMapKey / assertUnsupportedXmlMapKeyError) and
> SparkThrowableSuite error-condition formatting. Regenerate affected goldens.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]