returnString commented on pull request #288: URL: https://github.com/apache/arrow-datafusion/pull/288#issuecomment-839833123
@jorgecarleitao that all sounds reasonable! In Postgres, this sort of corresponds to the function volatility categories (https://www.postgresql.org/docs/13/xfunc-volatility.html) which might be a useful basis for any future definition of different function types. - immutable: pure function, can only use arguments and internal constants (example: basic math ops). Optimiser can do lots here - stable: can refer to shared state but must return the same value for the same arguments within a given statement (example: `now`). Optimiser is allowed to unify all references into one call per unique set of arguments - volatile: no rules, no optimiser potential! Must always be evaluated exactly as initially planned (example: `random`) -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org