What is the exact meaning of foldable column in this context?
CodePudding user response:
Based on document here:
Returns true when an expression is a candidate for static evaluation before the query is executed. The following conditions are used to determine suitability for constant folding:
- A Coalesce is foldable if all of its children are foldable
- A BinaryExpression is foldable if its both left and right child are foldable
- A Not, IsNull, or IsNotNull is foldable if its child is foldable
- A Literal is foldable
- A Cast or UnaryMinus is foldable if its child is foldable