Skip to content

planner: an unopenable file-reader input has no SQLSTATE, and EXPLAIN over it still prints a plan #1245

Description

@derekmwright

Two places where a file reader whose input cannot be opened is not yet an ordinary relation. Both pre-existing, measured identically at 0c0d33b6 and after arc FR.

  1. SELECT * FROM read_json('<missing>')executing query: source init: read_json: open …: no such file or directory with an EMPTY SQLSTATE. PostgreSQL's nearest class for a relation that does not exist is 42P01 (or 58P01 undefined_file). Pick one, carry it on every door.
  2. EXPLAIN SELECT * FROM read_json('<missing>') prints a plan; EXPLAIN SELECT * FROM missing is 42P01 on 17.11. The plan-time schema resolver declines rather than refuses on an unreachable input.

Acceptance

  • A named SQLSTATE for an unopenable reader input on embedded, pgwire, HTTP, gRPC and both coordinator paths; wire-oracle cell.
  • EXPLAIN position decided (refuse like PostgreSQL, or documented divergence in ADR-0012).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingengineEmbedded engine (MIT): wrong on every arm or on the single-process armplannerPlanning, optimization, pushdown

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions