Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/9759#discussion_r45307567
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/json/JSONRelation.scala
---
@@ -175,12 +176,15 @@ private[sql] class JSONRelation(
private[json] class JsonOutputWriter(
path: String,
dataSchema: StructType,
- context: TaskAttemptContext)
+ context: TaskAttemptContext,
+ quoteNonNumeric: Boolean)
extends OutputWriter with SparkHadoopMapRedUtil with Logging {
private[this] val writer = new CharArrayWriter()
// create the Generator without separator inserted between 2 records
- private[this] val gen = new
JsonFactory().createGenerator(writer).setRootValueSeparator(null)
+ private[this] val factory = new JsonFactory()
+ factory.configure(JsonGenerator.Feature.QUOTE_NON_NUMERIC_NUMBERS,
quoteNonNumeric)
--- End diff --
No, we can't.
Since we need to do special case handling for quoted non-numeric numbers,
is `JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS` still useful for us? Because
no matter we use it or not, we all need to do that handling.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]