sarutak commented on pull request #32506: URL: https://github.com/apache/spark/pull/32506#issuecomment-852129287
> parts of JSON standard for numbers? or are these the output from Spark JSON? It's neither JSON standard for numbers nor the output From Spark JSON. It's not often but such JSON texts can be generated by a system and exchanged with Spark. One possible case would be that a JSON text is generated from [proto3](https://developers.google.com/protocol-buffers/docs/proto3#json). proto3 allows its representation to map a JSON representation, and 64-bit integers will be represented as string. Another possible case is a JSON text originates from a Web service. Due to 64-bit integers are not ensured to be represented safely in JavaScript, some Web services consider it and return 64-bit integers as string values. In such cases, 64-bit integers represented as string should be interpreted as `LongType` rather than `DecimalType` when they are loaded. I have no idea whether numbers except for 64-bit integers can be represented as string but I implemented for them for consistency. -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
