datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

doc-gen: Migrate builtin scalar functions from code based documentation to attribute based

Open comphead opened this issue 2 years ago • 8 comments

Is your feature request related to a problem or challenge?

It is needed to migrate whenever it is possible builtin UDF documentation from code based to attribute based.

Function list can be found in SessionStateDefaults::default_scalar_functions()

Example can be found https://github.com/apache/datafusion/pull/13646/files#diff-1528bf73810e3fb12fd1d4e76a8b46acb650549ef37d3c131464e087f97ca515L25

The translation can be done manually or in semi automatic way, uncommenting a function in PR https://github.com/apache/datafusion/pull/13669 locally. This will generate local text files with attribute text which can be copy pasted to structs. However its still needed to remove code based documentation manually, add imports, etc

Please refer to PR #13646 which completed the migration for aggregation functions

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

comphead avatar Dec 05 '24 17:12 comphead

take

Chen-Yuan-Lai avatar Dec 09 '24 13:12 Chen-Yuan-Lai

Hi @alamb @Omega359 @comphead I've split the changes into several smaller PRs based on function categories. Could you please review these PRs? Thx 🙏

BTW, I put Cargo.toml and Cargo.lock changes in #13928 , this PR may need to be merged first than other array functions PRs

Chen-Yuan-Lai avatar Dec 27 '24 16:12 Chen-Yuan-Lai

Thanks for all your work on this! I'll do my best to start reviewing these PR's this weekend if no one beats me to it.

Omega359 avatar Dec 27 '24 17:12 Omega359

Thank you @Chen-Yuan-Lai and @Omega359 for driving this forward

alamb avatar Dec 28 '24 15:12 alamb

Supposedly it was closed automatically, I think we can close it once all the PRs merged.

comphead avatar Dec 28 '24 19:12 comphead

Okay, I think some still left

  • GreatestFunc
  • ArrowCastFunc
  • ArrowTypeOfFunc
  • CoalesceFunc
  • GetFieldFunc
  • LeastFunc
  • NamedStructFunc
  • NullIfFunc
  • NVLFunc
  • NVL2Func
  • StructFunc

comphead avatar Jan 16 '25 16:01 comphead

@comphead I'll complete these ignored functions

Chen-Yuan-Lai avatar Jan 17 '25 01:01 Chen-Yuan-Lai

Nice work everyone and thank you @Chen-Yuan-Lai especially 🚀

alamb avatar Jan 17 '25 17:01 alamb