2010YOUY01 commented on code in PR #17264:
URL: https://github.com/apache/datafusion/pull/17264#discussion_r2290507219
##########
datafusion/expr-common/src/signature.rs:
##########
@@ -44,42 +43,79 @@ pub const TIMEZONE_WILDCARD: &str = "+TZ";
/// valid length. It exists to avoid the need to enumerate all possible fixed
size list lengths.
pub const FIXED_SIZE_LIST_WILDCARD: i32 = i32::MIN;
-/// A function's volatility, which defines the functions eligibility for
certain optimizations
+/// When a function's output changes when the input does not
+///
+/// The volatility of a function determine eligibility for certain
+/// optimizations. You should always defined your function to have the
strictest
+/// volatility that applies to it to maximize performance and avoid unexpected
+/// results.
+///
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
pub enum Volatility {
- /// An immutable function will always return the same output when given
the same
- /// input. DataFusion will attempt to inline immutable functions during
planning.
+ /// Always returns the same output when given the same input.
+ ///
+ /// DataFusion will inline immutable functions during planning.
Review Comment:
I think it's like replacing `upper("hello")` with `"HELLO"` during planning.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]