You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/10 10:00:41 UTC

[GitHub] [spark] SnchitGrover edited a comment on issue #22939: [SPARK-25446][R] Add schema_of_json() and schema_of_csv() to R

SnchitGrover edited a comment on issue #22939: [SPARK-25446][R] Add schema_of_json() and schema_of_csv() to R
URL: https://github.com/apache/spark/pull/22939#issuecomment-563958001
 
 
   @HyukjinKwon can we add support for jsons where value has null:
   
   Example: json <- '{"firstName":"Bob", "lastName":null}' 
   
   I am thinking that schema_of_json function can take an argument which casts all null as string ?
   
   `def schema_of_json(json: Column, cast_null_as_string : Option[Boolean] ) = new SchemaOfJson(json.expr, cast_null_as_string.getOrElse(false))
   `
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org