-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc-gen: make user_doc to work with predefined consts #14086
Conversation
346c919
to
fcbc4a3
Compare
Thanks @ding-young I think we are very close. |
For MSRV I believe you need to update the codebase and run |
fcbc4a3
to
3ae466d
Compare
datafusion/macros/src/user_doc.rs
Outdated
if doc_section_lbl.is_none() { | ||
eprintln!("label for doc_section should exist"); | ||
} | ||
let label = doc_section_lbl.as_ref().unwrap().value(); | ||
// Try to find a predefined const by label first. | ||
// If there is no match but label exists, default value will be used for include and description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the changes here
datafusion/macros/src/user_doc.rs
Outdated
/// For `doc_section`, this macro will try to find corresponding predefined `DocSection` by label field | ||
/// Predefined `DocSection` can be found in datafusion/expr/src/udf.rs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also documented here
d00e65a
to
0590e5f
Compare
0590e5f
to
0a7bd9d
Compare
@comphead Thank you for review. Please tell me if there is any suggestion about the documentation or else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks @ding-young for doing this PR
Which issue does this PR close?
Closes #14001 .
Rationale for this change
What changes are included in this PR?
This pr modifies
user_doc
to findlabel
only for givendoc_section
attribute and try correspondent const from predefinedDocSections
. If there is no match but label exists, (ex.General Functions
) it will automatically fillinclude
anddescription
with default value as before.Are these changes tested?
will test with github CI.
Are there any user-facing changes?