Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/14124
  
    @viirya Thanks for your comment! Actually, that's I want to have some 
feedback for from @marmbrus .
    
    It seems forcing to a nullable schema all is already happening when you 
read/write data via `read`/`write` API (but not for structured streaming and 
another API for json).
    
    So, actually, the reason of this PR is, to make all consistent. The reason 
to make them consistent in a way that the schema is forced as nullable is what 
he said in the mailing list.
    
    >Sure, but a traditional RDBMS has the opportunity to do validation before
    >loading data in.  Thats not really an option when you are reading random
    >files from S3.  This is why Hive and many other systems in this space treat
    >all columns as nullable.
    
    Actually, Parquet also reads and writes the schema with nullability 
correctly if we get rid of `asNullable` (I tested this before) but it seems 
that's prevented due to (I assume) the reason above.
    
    @marmbrus Do you mind if I ask to clarify here please?
    
    I think we may have to deal with this as datasource-specific problem.



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to