cloud-fan commented on code in PR #58545:
URL: https://github.com/apache/spark/pull/58545#discussion_r3991529162
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala:
##########
@@ -617,16 +629,20 @@ class JacksonParser(
*/
private def convertMap(
parser: JsonParser,
- fieldConverter: ValueConverter): MapData = {
+ fieldConverter: ValueConverter,
+ keyType: DataType,
+ valueType: DataType): MapData = {
val keys = ArrayBuffer.empty[UTF8String]
val values = ArrayBuffer.empty[Any]
var badRecordException: Option[Throwable] = None
while (nextUntil(parser, JsonToken.END_OBJECT)) {
- keys += UTF8String.fromString(parser.currentName)
+ keys += CharVarcharUtils.applyTextParseSemantics(
Review Comment:
Thanks, the atomic append fixes the unequal-array and sibling-recovery
paths. The original two-entry case is still unresolved, though: dropping the
malformed entry's raw key means `{"a":"bad","a ":2}` never reaches EXCEPTION.
Could we track normalized-key collisions independently of whether a value is
retained, so partial-result recovery cannot suppress mapKeyDedupPolicy?
<!-- SPARK_DEV_REVIEW_REPLY
{"feedback_id":"inline:3960161099","thread_id":"inline:3960161099","verdict_sha256":"f1ff34a1578463dbdcefbddebb51bdda3eb95b931d81aef73ec0cc8480e8864e"}
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]