Skip to content

Rename CLI_DIRECT_READ to DIRECTED_READ and make read/write #486

@apstndb

Description

@apstndb

Rename CLI_DIRECT_READ to DIRECTED_READ and make read/write

Context

Part of #47 (java-spanner compatibility). Currently CLI_DIRECTED_READ is a read-only variable with a name that was previously a typo (CLI_DIRECT_READ). It needs to match the upstream DIRECTED_READ name and support read/write access.

Upstream References

  • java-spanner (ClientSideStatements.json): DIRECTED_READ with SET/SHOW support (read/write)
  • go-sql-spanner: Not present as a runtime variable (ExecOptions only)

Changes Required

Variable Rename

  • Rename CLI_DIRECTED_READDIRECTED_READ
  • Drop CLI_ prefix to match java-spanner naming

Make Read/Write

  • Currently read-only (set only via --directed-read CLI flag)
  • Add SET support: reuse parseDirectedReadOption() from session.go as setter parser
  • Keep SHOW support

CLI Flag

  • Keep --directed-read CLI flag working (sets initial value)

Backward Compatibility

  • No backward compatibility required per project philosophy

Acceptance Criteria

  • SET DIRECTED_READ = '...' works with directed read option string
  • SHOW VARIABLE DIRECTED_READ works
  • --directed-read CLI flag still works
  • CLI_DIRECTED_READ is fully removed
  • make check passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    statement-compatibilityClient-side statement and system variable compatibility with java-spanner/go-sql-spanner

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions