Skip to content

Calvin RETURNING swallows shaper errors; a failed row encode answers an ERROR tag #342

Description

@EnRaiha

Three sites replace a shaper failure instead of surfacing it. Verified on a89b56ddb.

Sites

Site Behaviour
pgwire/handler/routing/calvin_response.rs:74 && let Ok(ShapeOutcome::Rows(shaped)) = … — an Err falls through to the command-tag/affected-count path, so a RETURNING payload that failed to shape reports a successful statement with no rows
native/dispatch/conversion.rs:229 same && let Ok(..) swallow; the response degrades to a count-only result
pgwire/handler/plan.rs:207-210 an encode_field failure logs and answers an ERROR command tag, replacing the error

Should

  • Calvin pgwire: raise the error through shape_error_to_pg (the routed-path helper) with the error's own SQLSTATE.
  • Native apply: raise through shape_error_to_native.
  • plan.rs: ToSqlText for &str is total in pgwire 0.41, so the encode failure cannot happen — remove the dead fallback instead of keeping a branch that reads as a swallow.

Evidence

  • The two let Ok(ShapeOutcome) sites are the only shaper-error swallows left after the routed-site fix (repo-wide grep).
  • A local fix with the surrounding suites green exists and will be proposed with Closes to this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:pgwirePostgreSQL wire protocol / client compatsev:2-highMajor functionality broken; no acceptable workaroundtype:bugA defect — broken, incorrect, or lost data

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions