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 2020/10/30 08:09:00 UTC

[GitHub] [spark] MaxGekk opened a new pull request #30201: [SPARK-33299][SQL] Support schema in JSON format in `from_json`/`from_csv` in all APIs

MaxGekk opened a new pull request #30201:
URL: https://github.com/apache/spark/pull/30201


   ### What changes were proposed in this pull request?
   Move schema parsing from `from_json` in Scala API to the common function in `ExprUtils.evalTypeExpr` which is used in the `JsonToStructs` and `CsvToStructs` expressions, and as a consequence in SQL API, for instance.
   
   ### Why are the changes needed?
   Currently, `from_json` has different behavior in Scala API and in other APIs. In Scala API, it accepts schema in JSON format. To improve user experience with Spark SQL and PySpark, this PR proposes to unify the behavior of `from_json` and `from_csv`.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes.
   
   Before (in Spark 3.0)
   ```sql
   spark-sql> select from_json('{"a":1}', '{"type" : "map", "keyType" : "string", "valueType" : "integer", "valueContainsNull" : true}');
   Error in query:
   mismatched input '{' expecting {'ADD', 'AFTER', ...}(line 1, pos 0)
   
   == SQL ==
   {"type" : "map", "keyType" : "string", "valueType" : "integer", "valueContainsNull" : true}
   ^^^
   ```
   
   After:
   ```sql
   spark-sql> select from_json('{"a":1}', '{"type" : "map", "keyType" : "string", "valueType" : "integer", "valueContainsNull" : true}');
   {"a":1}
   ```
   
   ### How was this patch tested?
   Added test cases to `csv-functions.sql` and `json-functions.sq`


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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719440439


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35054/
   Test FAILed.


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



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


[GitHub] [spark] SparkQA commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719399832


   **[Test build #130449 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/130449/testReport)** for PR 30201 at commit [`44c869c`](https://github.com/apache/spark/commit/44c869cd913bf37998e63d0a1a0b23160c8ae5b4).


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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719444330


   Merged build finished. Test FAILed.


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



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


[GitHub] [spark] SparkQA commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719429187


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35054/
   


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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719444344


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35055/
   Test FAILed.


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



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


[GitHub] [spark] AmplabJenkins commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719444330






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



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


[GitHub] [spark] MaxGekk commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` Spark SQL and PySpark

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-720416862


   Please, review this https://github.com/apache/spark/pull/30226


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



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


[GitHub] [spark] dongjoon-hyun closed pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` Spark SQL and PySpark

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #30201:
URL: https://github.com/apache/spark/pull/30201


   


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



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


[GitHub] [spark] SparkQA commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719430783


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35055/
   


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



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719440428


   Merged build finished. Test FAILed.


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



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


[GitHub] [spark] SparkQA commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719444310


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35055/
   


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



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


[GitHub] [spark] MaxGekk commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719395276


   @HyukjinKwon @maropu Please, review this PR.


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



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


[GitHub] [spark] SparkQA commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719440403


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35054/
   


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



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


[GitHub] [spark] AmplabJenkins commented on pull request #30201: [SPARK-33299][SQL] Support schema in JSON format by `from_json`/`from_csv` across all APIs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30201:
URL: https://github.com/apache/spark/pull/30201#issuecomment-719440428






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



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