Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9759#discussion_r45307826
  
    --- 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 --
    
    I want to be able to process both quoted nans and nans and treat them as 
numeric values. I think in order to do that we need both special handling for 
quoted chars, and turn JsonParser.Feature.ALLOW_NON_NUMERIC_NUMBERS on?


---
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]

Reply via email to