Skip to content

Commit

Permalink
doc-gen: make user_doc to work with predefined consts
Browse files Browse the repository at this point in the history
  • Loading branch information
ding-young committed Jan 15, 2025
1 parent c7c200a commit 0590e5f
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 67 deletions.
102 changes: 54 additions & 48 deletions datafusion-cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions datafusion/expr/src/udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,22 @@ pub mod scalar_doc_sections {
]
}

pub const fn doc_sections_const() -> &'static [DocSection] {
&[
DOC_SECTION_MATH,
DOC_SECTION_CONDITIONAL,
DOC_SECTION_STRING,
DOC_SECTION_BINARY_STRING,
DOC_SECTION_REGEX,
DOC_SECTION_DATETIME,
DOC_SECTION_ARRAY,
DOC_SECTION_STRUCT,
DOC_SECTION_MAP,
DOC_SECTION_HASHING,
DOC_SECTION_OTHER,
]
}

pub const DOC_SECTION_MATH: DocSection = DocSection {
include: true,
label: "Math Functions",
Expand Down
1 change: 1 addition & 0 deletions datafusion/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ path = "src/user_doc.rs"
proc-macro = true

[dependencies]
datafusion-expr = { workspace = true }
quote = "1.0.37"
syn = { version = "2.0.79", features = ["full"] }
Loading

0 comments on commit 0590e5f

Please sign in to comment.