comphead commented on code in PR #13919: URL: https://github.com/apache/datafusion/pull/13919#discussion_r1902030922
########## docs/source/user-guide/sql/scalar_functions.md: ########## @@ -1758,167 +1758,6 @@ encode(expression, format) - [decode](#decode) -## Regular Expression Functions - -Apache DataFusion uses a [PCRE-like](https://en.wikibooks.org/wiki/Regular_Expressions/Perl-Compatible_Regular_Expressions) -regular expression [syntax](https://docs.rs/regex/latest/regex/#syntax) -(minus support for several features including look-around and backreferences). -The following regular expression functions are supported: - -- [regexp_count](#regexp_count) -- [regexp_like](#regexp_like) -- [regexp_match](#regexp_match) -- [regexp_replace](#regexp_replace) - Review Comment: I'll file a ticket to make `user_doc` to work with predefined consts. Currently the `doc_section` attribute must match fully the predefined DocSection consts, for example ``` pub const DOC_SECTION_REGEX: DocSection = DocSection { include: true, label: "Regular Expression Functions", description: Some( r#"Apache DataFusion uses a [PCRE-like](https://en.wikibooks.org/wiki/Regular_Expressions/Perl-Compatible_Regular_Expressions) regular expression [syntax](https://docs.rs/regex/latest/regex/#syntax) (minus support for several features including look-around and backreferences). The following regular expression functions are supported:"#, ), }; ``` In case of `doc_section` attribute contains any mismatches such function will be silently ignored. I believe we can make doc macros more smart like: - the doc_section will be just a string - using the string find correspondent const from `scalar_doc_sections.doc_sections()` - in `datafusion/macros/src/user_doc.rs` when constructing the builder use the const instead of building `DocSection` manually -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org