You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "jonathanc-n (via GitHub)" <gi...@apache.org> on 2024/10/11 16:15:39 UTC

[PR] Minor: fix Aggregation Docs from review [datafusion]

jonathanc-n opened a new pull request, #12880:
URL: https://github.com/apache/datafusion/pull/12880

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #.
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   Implements the changes from the review in #12861 by @Omega359 
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#issuecomment-2417462793

   I think we can improve the argument handling as follow on PRs
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "jonathanc-n (via GitHub)" <gi...@apache.org>.
jonathanc-n commented on PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#issuecomment-2408462419

   @findepi Does it look good?
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "Omega359 (via GitHub)" <gi...@apache.org>.
Omega359 commented on PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#issuecomment-2411340254

   > > Does it look good?
   > 
   > per [#12880 (comment)](https://github.com/apache/datafusion/pull/12880#discussion_r1797440377), i would prefer to have these `"The"` removed. Would you like to add a commit for this?
   
   I think we may need to update the `with_standard_argument` in some manner or have another method to clean that up. I was toying with either "" == "Expression to operate on....", Change the arg to an option, or `with_standard_argument_<something_here>(..)


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "findepi (via GitHub)" <gi...@apache.org>.
findepi commented on code in PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#discussion_r1797440377


##########
datafusion/functions-aggregate/src/approx_percentile_cont.rs:
##########
@@ -293,7 +293,7 @@ fn get_approx_percentile_cont_doc() -> &'static Documentation {
 | 65.0                                            |
 +-------------------------------------------------+
 ```"#)
-            .with_argument("expression", "Expression to operate on. Can be a constant, column, or function, and any combination of arithmetic operators.")
+            .with_standard_argument("expression", "The")

Review Comment:
   curious, what does `"The"` stand for?



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "findepi (via GitHub)" <gi...@apache.org>.
findepi commented on code in PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#discussion_r1797750741


##########
datafusion/functions-aggregate/src/approx_percentile_cont.rs:
##########
@@ -293,7 +293,7 @@ fn get_approx_percentile_cont_doc() -> &'static Documentation {
 | 65.0                                            |
 +-------------------------------------------------+
 ```"#)
-            .with_argument("expression", "Expression to operate on. Can be a constant, column, or function, and any combination of arithmetic operators.")
+            .with_standard_argument("expression", "The")

Review Comment:
   Thanks for the link. `"The"` still looks weird to me. I guess it gets concatenated with something else.
   
   if i follow the link correctly, this gets passed as `expression_type` argument, but "The" does not look like expression type.
   
   Could we have an overload so that `"The"` is not needed?
   eg `with_standard_sole_argument` could produce "The expression to operate on. Can be a constant, column, or function, and any combination of operators." without requiring "The" from the caller.
   



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "Omega359 (via GitHub)" <gi...@apache.org>.
Omega359 commented on PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#issuecomment-2407849463

   LGTM, thx!


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "Omega359 (via GitHub)" <gi...@apache.org>.
Omega359 commented on code in PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#discussion_r1797767949


##########
datafusion/functions-aggregate/src/approx_percentile_cont.rs:
##########
@@ -293,7 +293,7 @@ fn get_approx_percentile_cont_doc() -> &'static Documentation {
 | 65.0                                            |
 +-------------------------------------------------+
 ```"#)
-            .with_argument("expression", "Expression to operate on. Can be a constant, column, or function, and any combination of arithmetic operators.")
+            .with_standard_argument("expression", "The")

Review Comment:
   I agree, it really does look strange. .`with_standard_argument("expression", None)` / `with_standard_argument("expression", Some("String"))` ?
   



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#issuecomment-2414258953

   Thank you @jonathanc-n and @Omega359 and @findepi 


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "Omega359 (via GitHub)" <gi...@apache.org>.
Omega359 commented on code in PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#discussion_r1797494019


##########
datafusion/functions-aggregate/src/approx_percentile_cont.rs:
##########
@@ -293,7 +293,7 @@ fn get_approx_percentile_cont_doc() -> &'static Documentation {
 | 65.0                                            |
 +-------------------------------------------------+
 ```"#)
-            .with_argument("expression", "Expression to operate on. Can be a constant, column, or function, and any combination of arithmetic operators.")
+            .with_standard_argument("expression", "The")

Review Comment:
   https://github.com/apache/datafusion/blob/a8d3fae21d12a9caafad77a11b8a22bcfe9555fd/datafusion/expr/src/udf_docs.rs#L148



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "findepi (via GitHub)" <gi...@apache.org>.
findepi commented on PR #12880:
URL: https://github.com/apache/datafusion/pull/12880#issuecomment-2410904303

   > Does it look good?
   
   per https://github.com/apache/datafusion/pull/12880#discussion_r1797440377, i would prefer to have these `"The"` removed. Would you like to add a commit for this?


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Minor: fix Aggregation Docs from review [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #12880:
URL: https://github.com/apache/datafusion/pull/12880


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org