Skip to main content

Module limits

Module limits 

Source
Expand description

Resource bounds applied to inbound SQL.

v1 enforces two limits, both at parse/lower time:

  • max_input_bytes — how big the SQL string can be. Stops a runaway client from forcing the parser to chew through megabytes of text.
  • max_mir_nodes — how big the lowered MIR can be. Stops cleverly short queries (deep set-op chains, big CTE webs) from expanding into a graph the planner has to walk N² over.

Both are advisory: callers explicitly invoke enforce_input_size / enforce_graph_size (or use the *_with_limits helpers in lower). The default limits are deliberately generous enough for the conformance suite to pass unmodified.

Structs§

QueryLimits
Resource bounds applied to inbound SQL, surfaced to the gRPC layer so it can refuse oversized queries before parsing.

Functions§

enforce_graph_size
Returns SqlError::QueryTooComplex when nodes exceeds limits.max_mir_nodes.
enforce_input_size
Returns SqlError::QueryTooLarge when sql.len() exceeds limits.max_input_bytes.