Skip to main content

Module ast_helpers

Module ast_helpers 

Source
Expand description

Shared AST manipulation helpers for DML planners.

Functionsยง

flatten_and_expr
Flatten a right-leaning AND expression tree into a list of conjuncts.
qualified_ident_pair
Return (table, column) for a table.col compound identifier, or None.
rebuild_and_expr
Reassemble conjuncts into a right-leaning AND tree. Panics if empty.
strip_and_convert_filters
Strip qualifier. from all compound identifiers in expr, then convert the result to Vec<Filter> via convert_where_to_filters.
strip_table_qualifier
Walk an expression and replace every table.col compound identifier where table == qualifier with a bare col identifier. Lets target-side predicates like t.score > 15 be evaluated against documents that store fields without a table qualifier.