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 2021/12/05 12:49:41 UTC

[GitHub] [spark] byyue opened a new pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

byyue opened a new pull request #34809:
URL: https://github.com/apache/spark/pull/34809


   
   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Adding an additional example to demonstrate how to parse jsonStr with nested types including ArrayType and StructType.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   The documentation for from_json currently contains only examples of getting struct value from jsonStr with simple schema. It can take a lot of time to figure out how to parse jsonStr with complex types, especially for beginners. This change can make the documentation more intuitive.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   It will enrich the documentation of Spark SQL, Built-in Functions.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   The added example shows the real query result.


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   **[Test build #145937 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145937/testReport)** for PR 34809 at commit [`27a355e`](https://github.com/apache/spark/commit/27a355e3de5436af427d7510f1cd1f2be736cf97).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   Can one of the admins verify this patch?


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   **[Test build #145937 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145937/testReport)** for PR 34809 at commit [`27a355e`](https://github.com/apache/spark/commit/27a355e3de5436af427d7510f1cd1f2be736cf97).


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] HyukjinKwon commented on pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   ok to test


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   Can one of the admins verify this patch?


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] srowen commented on pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   Jenkins test this please


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] HyukjinKwon closed pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #34809:
URL: https://github.com/apache/spark/pull/34809


   


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 removed a comment on pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   **[Test build #145934 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145934/testReport)** for PR 34809 at commit [`4a314cd`](https://github.com/apache/spark/commit/4a314cd6742b1dc49b0416397267db0da3eb8567).


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] HyukjinKwon commented on pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   Merged to master.


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   **[Test build #145934 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145934/testReport)** for PR 34809 at commit [`4a314cd`](https://github.com/apache/spark/commit/4a314cd6742b1dc49b0416397267db0da3eb8567).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   **[Test build #145934 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145934/testReport)** for PR 34809 at commit [`4a314cd`](https://github.com/apache/spark/commit/4a314cd6742b1dc49b0416397267db0da3eb8567).


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] HyukjinKwon commented on a change in pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34809:
URL: https://github.com/apache/spark/pull/34809#discussion_r762640303



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
##########
@@ -522,6 +522,8 @@ case class JsonTuple(children: Seq[Expression])
     Examples:
       > SELECT _FUNC_('{"a":1, "b":0.8}', 'a INT, b DOUBLE');
        {"a":1,"b":0.8}
+      > SELECT from_json('{"teacher": "Alice", "student": [{"name": "Bob", "rank": 1}, {"name": "Charlie", "rank": 2}]}', 'STRUCT<teacher: STRING, student: ARRAY<STRUCT<name: STRING, rank: INT>>>');

Review comment:
       BTW, I would add this example in the end below `timestampFormat` example considering that this example is more complicated then others, and the examples should ideally show from easy ones to harder ones




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 removed a comment on pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


   **[Test build #145937 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145937/testReport)** for PR 34809 at commit [`27a355e`](https://github.com/apache/spark/commit/27a355e3de5436af427d7510f1cd1f2be736cf97).


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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 #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

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


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


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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] srowen commented on a change in pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

Posted by GitBox <gi...@apache.org>.
srowen commented on a change in pull request #34809:
URL: https://github.com/apache/spark/pull/34809#discussion_r762639632



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
##########
@@ -522,6 +522,8 @@ case class JsonTuple(children: Seq[Expression])
     Examples:
       > SELECT _FUNC_('{"a":1, "b":0.8}', 'a INT, b DOUBLE');
        {"a":1,"b":0.8}
+      > SELECT from_json('{"teacher": "Alice", "student": [{"name": "Bob", "rank": 1}, {"name": "Charlie", "rank": 2}]}', 'STRUCT<teacher: STRING, student: ARRAY<STRUCT<name: STRING, rank: INT>>>');

Review comment:
       Shouldn't this be "SELECT _FUNC_" here for consistency? otherwise seems fine




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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] byyue commented on a change in pull request #34809: [SPARK-37550][SQL][DOCS] Add an example of parsing jsonStr with complex types for from_json

Posted by GitBox <gi...@apache.org>.
byyue commented on a change in pull request #34809:
URL: https://github.com/apache/spark/pull/34809#discussion_r762680503



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala
##########
@@ -522,6 +522,8 @@ case class JsonTuple(children: Seq[Expression])
     Examples:
       > SELECT _FUNC_('{"a":1, "b":0.8}', 'a INT, b DOUBLE');
        {"a":1,"b":0.8}
+      > SELECT from_json('{"teacher": "Alice", "student": [{"name": "Bob", "rank": 1}, {"name": "Charlie", "rank": 2}]}', 'STRUCT<teacher: STRING, student: ARRAY<STRUCT<name: STRING, rank: INT>>>');

Review comment:
       Thanks for your review! I've updated the code. Could you please help with the test failure?




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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