Skip to content

Conversation

Adez017
Copy link
Contributor

@Adez017 Adez017 commented Aug 2, 2025

Which issue does this PR close?

Rationale for this change

while Browsing through the documentation i find the example for the scalar functions are missing

What changes are included in this PR?

Added examples for documentation

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

Adez017 commented Aug 2, 2025

hi @alamb , i coudnt find any rust file for this function . directly added the examples to the markdown . need a little help , while firing

./dev/update_function_docs.sh

my system doesnt updates the files . please can you do that

@alamb
Copy link
Contributor

alamb commented Aug 2, 2025

Hi @Adez017

hi @alamb , i coudnt find any rust file for this function .

I think you can find the corresponding rust file by searching for the function description. For example, to find abs search for "Returns the absolute value of a number." like this:

https://github.com/search?q=repo%3Aapache%2Fdatafusion+%22Returns+the+absolute+value+of+a+number.%22&type=code

If you are having problems running update_docs perhaps you can try using the codespace:

Screenshot 2025-08-02 at 6 22 00 AM

@alamb alamb marked this pull request as draft August 2, 2025 10:25
@Adez017
Copy link
Contributor Author

Adez017 commented Aug 5, 2025

Hi @Adez017

hi @alamb , i coudnt find any rust file for this function .

I think you can find the corresponding rust file by searching for the function description. For example, to find abs search for "Returns the absolute value of a number." like this:

https://github.com/search?q=repo%3Aapache%2Fdatafusion+%22Returns+the+absolute+value+of+a+number.%22&type=code

If you are having problems running update_docs perhaps you can try using the codespace:

Screenshot 2025-08-02 at 6 22 00 AM

just a quick question , does i need to install all dependencies over there or this are preconfigured

@alamb
Copy link
Contributor

alamb commented Aug 5, 2025

just a quick question , does i need to install all dependencies over there or this are preconfigured

they are pre-configured mostly

You may have to run this command in the container

apt-get install npm

(I made a PR to add this explicitly to the container here #17019)

@comphead
Copy link
Contributor

comphead commented Aug 6, 2025

@Adez017 this document is autogenerated by the ./dev/update_function_docs.sh script which runs separate rust console app to gather documentation from scalar functions documentation methods and creates an md file on top of that.

Do you see any issues with the tool?

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 6, 2025

@Adez017 this document is autogenerated by the ./dev/update_function_docs.sh script which runs separate rust console app to gather documentation from scalar functions documentation methods and creates an md file on top of that.

Do you see any issues with the tool?

i haven't used yet , will do it later at EOD

@github-actions github-actions bot added the functions Changes to functions implementation label Aug 6, 2025
@Adez017
Copy link
Contributor Author

Adez017 commented Aug 6, 2025

just a quick question , does i need to install all dependencies over there or this are preconfigured

they are pre-configured mostly

You may have to run this command in the container

apt-get install npm

(I made a PR to add this explicitly to the container here #17019)

Not working ,
image

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 6, 2025

@comphead , @alamb , kindly take a look

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 6, 2025

Hi @alamb , i fired the ./dev/update_doc.sh but it only updates the aggregate_function.md file not the scalar part.
also it shows like this
image

@comphead
Copy link
Contributor

comphead commented Aug 6, 2025

npm i -g npx
npm i -g prettier

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 6, 2025

npm i -g prettier

image

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 6, 2025

Hi @comphead , could you give it a try in the codespace , like if the changes are correct or note also i would like to mentioned that check the commits also

@comphead
Copy link
Contributor

comphead commented Aug 6, 2025

Hi @comphead , could you give it a try in the codespace , like if the changes are correct or note also i would like to mentioned that check the commits also

I feel it would be easier to run on local machine and follow https://docs.npmjs.com/downloading-and-installing-node-js-and-npm

@alamb
Copy link
Contributor

alamb commented Aug 7, 2025

Not working ,

Perhaps you need to run apt-get update first to update the package registry

@Adez017 Adez017 marked this pull request as ready for review August 24, 2025 14:40
@Adez017
Copy link
Contributor Author

Adez017 commented Aug 24, 2025

Hi @alamb ,i think this is ready now , a bit late but everything is working now .
CC: @comphead

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 25, 2025

any Updates @alamb

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 27, 2025

Any Updates @alamb

@comphead
Copy link
Contributor

@Adez017 I'll take a look today

#### Example

```sql
> SELECT trunc(42.738);
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure why this is here, was this file created manually?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think so , because later that time the build commands are halting

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 29, 2025

Any Updates?? @comphead

@comphead
Copy link
Contributor

To make this PR mergeable it is needed to fix .md file. Otherwise it would fail the CI, you can try doing this in github codespace if local machine cannot run scripts

@Adez017
Copy link
Contributor Author

Adez017 commented Aug 30, 2025

To make this PR mergeable it is needed to fix .md file. Otherwise it would fail the CI, you can try doing this in github codespace if local machine cannot run scripts

what need to be fixed could you please explain

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.

[Docs Fix]: Missing examples for Scalar Fucntions in docs
3 participants