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/04/09 14:22:51 UTC

[GitHub] [spark] iRakson opened a new pull request #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

iRakson opened a new pull request #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170
 
 
   <!--
   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'.
   -->
   
   ### What changes were proposed in this pull request?
   Documentation for JSON functions
   <!--
   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.
   -->
   
   
   ### Why are the changes needed?
   To complete the SQL references.
   <!--
   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.
   -->
   
   
   ### Does this PR introduce any user-facing change?
   Yes. Now users can access JSON functions doc.
   <!--
   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 no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   Manually
   <!--
   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.
   -->
   

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


[GitHub] [spark] HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611917191
 
 
   I actually discussed this with @gatorsmile and @cloud-fan offline. I think we should basically reuse `ExpressionDescription` and generate the function documentation there .
   
   We can add some more tags or fields into `ExpressionDescription`, and generate the documentation just like we do for SQL configuration (see also https://github.com/apache/spark/pull/27459, #24259). I am sure we can generate similar pages by grouping, updating, etc. in the Python script (e.g., [gen-sql-api-docs.py](https://github.com/apache/spark/blob/master/sql/gen-sql-api-docs.py) and [gen-sql-config-docs.py](https://github.com/apache/spark/blob/master/sql/gen-sql-config-docs.py).
   
   Also, we can remove the documentation when it's wrapped `ExpressionDescription`. For instance, I think we can remove all Scaladoc in the case like this: https://github.com/apache/spark/blob/6704103499d2003b1879ff0b4b8e29141e401b9f/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala#L310-L325
   
   Also, the examples in `ExpressionDescription` are tested in the PR builders so we won't have to update the examples.

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


[GitHub] [spark] iRakson commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
iRakson commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611935540
 
 
   @HyukjinKwon @maropu 
   Should i close this one then ? 

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


[GitHub] [spark] HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611917191
 
 
   I actually discussed this with @gatorsmile and @cloud-fan offline. I think we should basically reuse `ExpressionDescription` and generate the function documentation there .
   
   We can add some more tags or fields into `ExpressionDescription`, and generate the documentation just like we do for SQL configuration (see also https://github.com/apache/spark/pull/27459, #24259). I am sure we can generate similar pages by grouping, updating, etc. in the Python script.
   
   Also, we can remove the documentation when it's wrapped `ExpressionDescription`. For instance, I think we can remove all Scaladoc in the case like this: https://github.com/apache/spark/blob/6704103499d2003b1879ff0b4b8e29141e401b9f/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala#L310-L325
   
   Also, the examples in `ExpressionDescription` are tested in the PR builders so we won't have to update the examples.

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


[GitHub] [spark] HyukjinKwon commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611944449
 
 
   I think somebody can do the base job to add a field into `ExpressionDescription` and infra to generate the doc like the links I pointed out.
   
   Then we could add the documentations accordingly in this PR,  #28157 and #28120.
   
   @maropu, @huaxingao, @kevinyu98, I am very sorry I happened to check the ongoing on efforts in function documentation. Could we maybe try a way of reusing  https://spark.apache.org/docs/latest/api/sql/index.html?

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


[GitHub] [spark] huaxingao commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
huaxingao commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611913191
 
 
   When I did https://github.com/apache/spark/pull/28157, I actually changed the built-in function page to the following
   
   <img width="1050" alt="Screen Shot 2020-04-09 at 11 58 36 PM" src="https://user-images.githubusercontent.com/13592258/78970411-156c1080-7abe-11ea-82b7-84e6a83bb7cf.png">
   
   
   I think aggregation function and window function are worthwhile to document separately. We need to document Window function for sure because in query section, we have 
   ```[ WINDOW { named_window [ , WINDOW named_window, ... ] } ]```
   So we need an introduction page to explain what window function is, how to use it, and what window functions Spark supports. Aggregation function is very important, and it can be used as window function as well, so it would be worth having a page to document this too.
   
   @gatorsmile WDYT?

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


[GitHub] [spark] AmplabJenkins removed a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611556070
 
 
   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.
 
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


[GitHub] [spark] HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611944449
 
 
   I think somebody can do the base job to add a field into `ExpressionDescription` and infra to generate the doc like the links I pointed out.
   
   Then we could add the documentations accordingly in this PR,  #28157 and #28120.
   
   @maropu, @huaxingao, @kevinyu98, I am very sorry I happened to check the ongoing on efforts in function documentation late, and raise another way late like this. Could we maybe try a way of reusing  https://spark.apache.org/docs/latest/api/sql/index.html?

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


[GitHub] [spark] iRakson closed pull request #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
iRakson closed pull request #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170
 
 
   

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


[GitHub] [spark] AmplabJenkins commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611556070
 
 
   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.
 
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


[GitHub] [spark] maropu commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
maropu commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611954083
 
 
   @iRakson Yea, closing this looks fine to me. Anyway, thanks for work.

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


[GitHub] [spark] maropu edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
maropu edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611950768
 
 
   nvm, @HyukjinKwon. The proposed approach looks the best to me.
   Btw, is it ok that the target of  the `ExpressionDescription` improvement is `3.1`? I think we don't have much time until RC2 started and there are the other left SQL document writing tasks with higher priorities for 3.0.

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


[GitHub] [spark] HyukjinKwon commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611576780
 
 
   Hm, I think we don't need this - they will be automatically documented by `ExpressionDescription` you used (see https://spark.apache.org/docs/latest/api/sql/index.html)

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


[GitHub] [spark] iRakson commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
iRakson commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611579965
 
 
   > Hm, I think we don't need this - they will be automatically documented by `ExpressionDescription` you used (see https://spark.apache.org/docs/latest/api/sql/index.html)
   
   Actually @maropu asked to add this. If it is not required, i will close it. 
   
   https://issues.apache.org/jira/browse/SPARK-31009?focusedCommentId=17054251&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17054251

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


[GitHub] [spark] HyukjinKwon commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611954281
 
 
   Yes, I am good with any target version.

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


[GitHub] [spark] AmplabJenkins commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611559525
 
 
   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.
 
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


[GitHub] [spark] HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611917191
 
 
   I actually discussed this with @gatorsmile and @cloud-fan offline. I think we should basically reuse `ExpressionDescription` and generate the function documentation there .
   
   We can add some more tags or fields into `ExpressionDescription`, and generate the documentation just like we do for SQL configuration (see also https://github.com/apache/spark/pull/27459, #24259). I am sure we can generate similar pages by grouping, updating, etc. in the Python script (e.g., [gen-sql-api-docs.py](https://github.com/apache/spark/blob/master/sql/gen-sql-api-docs.py) and [gen-sql-config-docs.py](https://github.com/apache/spark/blob/master/sql/gen-sql-config-docs.py)).
   
   Also, we can remove the documentation when it's wrapped `ExpressionDescription`. For instance, I think we can remove all Scaladoc in the case like this (and merge the doc into `ExpressionDescription`): https://github.com/apache/spark/blob/6704103499d2003b1879ff0b4b8e29141e401b9f/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala#L310-L325
   
   Also, the examples in `ExpressionDescription` are tested in the PR builders as of https://github.com/apache/spark/pull/25942 so we won't have to update the examples.

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


[GitHub] [spark] iRakson commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
iRakson commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611559828
 
 
   @maropu @huaxingao 
   Kindly 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


With regards,
Apache Git Services

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


[GitHub] [spark] maropu commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
maropu commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611950768
 
 
   @HyukjinKwon nvm. The proposed approach looks the best to me.

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


[GitHub] [spark] HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611917191
 
 
   I actually discussed this with @gatorsmile and @cloud-fan offline. I think we should basically reuse `ExpressionDescription` and generate the function documentation there .
   
   We can add some more tags or fields into `ExpressionDescription`, and generate the documentation just like we do for SQL configuration (see also https://github.com/apache/spark/pull/27459, #24259). I am sure we can generate similar pages by grouping, updating, etc. in the Python script (e.g., [gen-sql-api-docs.py](https://github.com/apache/spark/blob/master/sql/gen-sql-api-docs.py) and [gen-sql-config-docs.py](https://github.com/apache/spark/blob/master/sql/gen-sql-config-docs.py)).
   
   Also, we can remove the documentation when it's wrapped `ExpressionDescription`. For instance, I think we can remove all Scaladoc in the case like this (and merge the doc into `ExpressionDescription`): https://github.com/apache/spark/blob/6704103499d2003b1879ff0b4b8e29141e401b9f/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala#L310-L325
   
   Also, the examples in `ExpressionDescription` are tested in the PR builders so we won't have to update the examples.

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


[GitHub] [spark] HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611917191
 
 
   I actually discussed this with @gatorsmile and @cloud-fan offline. I think we should basically reuse `ExpressionDescription` and generate the function documentation there .
   
   We can add some more tags or fields into `ExpressionDescription`, and generate the documentation just like we do for SQL configuration (see also https://github.com/apache/spark/pull/27459, #24259). I am sure we can generate similar pages by grouping, updating, etc. in the Python script (e.g., [gen-sql-api-docs.py](https://github.com/apache/spark/blob/master/sql/gen-sql-api-docs.py) and [gen-sql-config-docs.py](https://github.com/apache/spark/blob/master/sql/gen-sql-config-docs.py)).
   
   Also, we can remove the documentation when it's wrapped `ExpressionDescription`. For instance, I think we can remove all Scaladoc in the case like this: https://github.com/apache/spark/blob/6704103499d2003b1879ff0b4b8e29141e401b9f/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala#L310-L325
   
   Also, the examples in `ExpressionDescription` are tested in the PR builders so we won't have to update the examples.

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


[GitHub] [spark] maropu commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
maropu commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611899117
 
 
   I asked the same question in https://github.com/apache/spark/pull/28099#discussion_r402102476.
   (I'm still wondering if these document pages are really necessary though) Probably, the categorized document pages only for popular built-in function groups (e.g., aggregate, array, and date/time functions) might be more useful for users than a full flatten list of the functions in `api/sql/`. For example the PostgreSQL documents have the categorized pages for the builtin functions:
   
    - aggregate functions: https://www.postgresql.org/docs/current/functions-aggregate.html
    - date/timestamp functions: https://www.postgresql.org/docs/current/functions-datetime.html
    - JSON functions: https://www.postgresql.org/docs/current/functions-json.html
   
   Probably, I think this is an issue of maintainance cost vs document quality.
   
   cc: @huaxingao @kevinyu98 @gatorsmile 

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


[GitHub] [spark] HyukjinKwon commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611917191
 
 
   I actually discussed this with @gatorsmile and @cloud-fan offline. I think we should basically reuse `ExpressionDescription` and generate the function documentation there .
   
   We can add some more tags or fields into `ExpressionDescription`, and generate the documentation just like we do for SQL configuration (see also https://github.com/apache/spark/pull/27459)

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


[GitHub] [spark] HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions

Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on issue #28170: [SPARK-31369][SQL][DOCS] Documentation for JSON Functions
URL: https://github.com/apache/spark/pull/28170#issuecomment-611944449
 
 
   I think somebody can do the base job to add a field into `ExpressionDescription` and infra to generate the doc like the links I pointed out.
   
   Then we could add the documentations accordingly in this PR,  #28157 and #28120.
   
   @maropu, @huaxingao, @kevinyu98, I am very sorry I happened to check the ongoing on efforts in function documentation, and raise another way late like this. Could we maybe try a way of reusing  https://spark.apache.org/docs/latest/api/sql/index.html?

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