Documentation
¶
Overview ¶
Package expr holds engine-internal binding and coercion helpers that operate on the public cosma/expr tree. The user-facing AST, op types, and fluent builders live in cosma/expr; only logic that is not part of the public contract — literal type promotion against a bound schema — stays here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PromoteLiterals ¶
PromoteLiterals retypes default-inferred numeric literals so they match a sibling column's resolved type within BinaryNode operands. It exists so callers can write `Col("ids:int32").Gt(Lit(2))` without explicitly writing Int32(2) — the literal 2 infers to Int64 and without this pass would mismatch the int32 column at the kernel.
The pass is conservative: it only retypes a LiteralNode when its sibling resolves to a single, distinct numeric type via the schema. Lit-vs-Lit and column-vs-column nodes are left alone — downstream type checking surfaces those.
Types ¶
This section is empty.