rewrite_expr_to_prunable

Function rewrite_expr_to_prunable 

Source
fn rewrite_expr_to_prunable(
    column_expr: &PhysicalExprRef,
    op: Operator,
    scalar_expr: &PhysicalExprRef,
    schema: DFSchema,
) -> Result<(PhysicalExprRef, Operator, PhysicalExprRef)>
Expand description

This function is designed to rewrite the column_expr to ensure the column_expr is monotonically increasing.

For example,

  1. col > 10
  2. -col > 10 should be rewritten to col < -10
  3. !col = true would be rewritten to col = !true
  4. abs(a - 10) > 0 not supported
  5. cast(can_prunable_expr) > 10
  6. try_cast(can_prunable_expr) > 10

More rewrite rules are still in progress.