Expand description
Optimizer rule for type validation and coercion
Structsยง
- Type
Coercion - Performs type coercion by determining the schema and performing the expression rewrites.
- Type
Coercion Rewriter - Rewrite expressions to apply type coercion.
Functionsยง
- analyze_
internal ๐ - use the external schema to handle the correlated subqueries case
- coerce_
arguments_ ๐for_ signature_ with_ aggregate_ udf - Returns
expressionscoerced to types compatible withsignature, if possible. - coerce_
arguments_ ๐for_ signature_ with_ scalar_ udf - Returns
expressionscoerced to types compatible withsignature, if possible. - coerce_
case_ ๐expression - coerce_
frame_ ๐bound - Coerces the given (window frame)
boundtotarget_type. - coerce_
output ๐ - Coerce output schema based upon optimizer config.
- coerce_
scalar ๐ - Casts the given
valuetotarget_type. Note that this function only considersNullorUtf8values. - coerce_
scalar_ ๐range_ aware - This function coerces
valuetotarget_typein a range-aware fashion. If the coercion is successful, we return anOkvalue with the result. If the coercion fails becausetarget_typeis not wide enough (i.e. we can not coerce totarget_type, but we can to a wider type in the same family), we return aNullvalue of this type to signal this situation. Downstream code uses this signal to treat these values as unbounded. - coerce_
union_ schema - Get a common schema that is compatible with all inputs of UNION.
- coerce_
union_ ๐schema_ with_ schema - coerce_
window_ ๐frame - extract_
window_ ๐frame_ target_ type - get_
casted_ ๐expr_ for_ bool_ op - get_
widest_ ๐type_ in_ family - This function returns the widest type in the family of
given_type. If the given type is already the widest type, it returnsNone. For example, ifgiven_typeisInt8, it returnsInt64. - project_
with_ ๐column_ index - See
<https://github.com/apache/datafusion/pull/2108> - transform_
schema_ ๐to_ nonview - Transform a schema to use non-view types for Utf8View and BinaryView