Module utils

Module utils 

Source

Structs§

AliasLayer 🔒
PatchOptimizerContext 🔒
The ConstEvaluator in SimplifyExpressions might evaluate some UDFs early in the planning stage, by executing them directly. For example, the database() function. So the ConfigOptions here (which is set from the session context) should be present in the UDF’s ScalarFunctionArgs. However, the default implementation in DataFusion seems to lost track on it: the ConfigOptions is recreated with its default values again. So we create a custom OptimizerConfig with the desired ConfigOptions to walk around the issue. TODO(LFC): Maybe use DataFusion’s OptimizerContext again once https://github.com/apache/datafusion/pull/17742 is merged.
PlanTreeExpressionSimplifier 🔒
Simplify all expressions recursively in the plan tree which keeping the output schema unchanged

Functions§

aliased_columns_for
Return all the aliased columns(at aliased node) for the given original columns(at original node)
aliased_columns_for_inner 🔒
get_alias_layer_from_exprs 🔒
get_alias_layer_from_node 🔒
Return a mapping of original column to all the aliased columns in current node of the plan TODO(discord9): also support merge scan node
get_alias_original_column 🔒
original_column_for
Return all the original columns(at original node) for the given aliased columns at the aliased node
original_column_for_inner 🔒
patch_batch_timezone
A patch for substrait simply throw timezone away, so when decoding, if columns have different timezone then expected schema, use expected schema’s timezone
rewrite_column 🔒
rewrite_merge_sort_exprs
Rewrite the expressions of the given merge sort plan from original columns(at merge sort’s input plan) to aliased columns at the given aliased node

Type Aliases§

AliasMapping
Mapping of original column in table to all the alias at current node