Skip to content

Conversation

Adez017
Copy link
Contributor

@Adez017 Adez017 commented Jul 26, 2025

Which issue does this PR close?

Rationale for this change

There are missing Example in the user guide for Statistical Functions in the user guide.

What changes are included in this PR?

Updated the aggregate_functions.md

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 26, 2025
@Adez017
Copy link
Contributor Author

Adez017 commented Jul 26, 2025

@xudong963 @alamb

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Adez017 -- this is a great start

Is there any chance you can include the SQL / table definitions for the other examples as well?

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 28, 2025

Thanks @Adez017 -- this is a great start

Is there any chance you can include the SQL / table definitions for the other examples as well?

for sure @alamb , will update soon

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 28, 2025

i notice that although i had added the SQL table reference for the statistical functions , there is many table creation reference is missing from the aggregates functions . we can follow up this in a new issue , i would like to work upon this

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 28, 2025

CC: @alamb

@Adez017 Adez017 requested a review from alamb July 28, 2025 17:13
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Adez017 -- I left a few more comments -- when I double checked some of these examples, they don't seem to work / refer to missing tables or columns

Is there any chance you can double check that they all work? Perhaps by running them in datafusion-cli?

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 29, 2025

hi @alamb , i had updated some examples and still some left will ,and will update the remaining by the end of the day

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 29, 2025

Done @alamb , done with all the statistical exmples yet there are examples without SQL reference we can open a new issue for that purpose

@github-actions github-actions bot added the functions Changes to functions implementation label Jul 29, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Adez017 -- I was looking more at this PR and another thing I noticed is that the new examples are wiped out when the docs are regenerated from source

The way to get them to show up is to put them inline in the source code. I pushed a commit that shows how to do it. Hopefully that makes sense

Here are the commands to update the docs

# regenerate the docs
./dev/update_function_docs.sh
# build the docs
(cd docs && ./build.sh)
# view the docs
open docs/build/html/index.html

Here is an example of how it looks on my local machine:

file:///Users/andrewlamb/Software/datafusion/docs/build/html/user-guide/sql/aggregate_functions.html#regr-slope

Screenshot 2025-07-29 at 3 13 05 PM

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 30, 2025

hi @alamb , i had fixed the docs , the only thing that's need to be fixed is to rerun the commands

./dev/update_function_docs.sh
# build the docs
(cd docs && ./build.sh)
# view the docs
open docs/build/html/index.html

because the pretier is not working in my system ,also please verify

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 30, 2025

any updates @alamb

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @Adez017 -- very much apprecaited

I tried all the examples in this PR, and I found a few more fixups I had to do to match the output of datafusion-cli. I pushed them to this PR along with running prettier and now I think it looks very nice.

Thank you again

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 31, 2025

Hi @alamb , much appreciated efforts . thank you very much

@Adez017
Copy link
Contributor Author

Adez017 commented Jul 31, 2025

Hi @alamb , @xudong963 . As of now its look good to me , if any further updates needed let me know . if not , we can move forward to merge it

@alamb
Copy link
Contributor

alamb commented Jul 31, 2025

I think this one is good to go -- thanks @Adez017

@alamb alamb merged commit 2a90ff6 into apache:main Jul 31, 2025
28 checks passed
Standing-Man pushed a commit to Standing-Man/datafusion that referenced this pull request Aug 4, 2025
* Update aggregate_functions.md

* Update aggregate_functions.md

* formating fix

* Update aggregate_functions.md

* Update docs/source/user-guide/sql/aggregate_functions.md

Co-authored-by: Andrew Lamb <[email protected]>

* Update docs/source/user-guide/sql/aggregate_functions.md

Co-authored-by: Andrew Lamb <[email protected]>

* Update docs/source/user-guide/sql/aggregate_functions.md

Co-authored-by: Andrew Lamb <[email protected]>

* Update aggregate_functions.md

* Update aggregate_functions.md

* Update aggregate_functions.md

* Add examples to code

* Alamb Update

* Updated docs , build

* prettier

* Updates + prettier

---------

Co-authored-by: Andrew Lamb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation functions Changes to functions implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Doc Fix] : Missing Example for Statistical Functions in the Docs
2 participants