Skip to content

Consolidate client-side tabular outputs behind a shared helper #652

Description

@apstndb

Category

Non-breaking refactor.

Background

PR #648 removes the old buffered formatter registry and keeps regular non-table query output streaming. Result.Rows remains widely used for small client-side or metadata-style tables such as system variables, params, proto/schema statements, query profile output, and EXPLAIN/DESCRIBE helpers.

These are generally small outputs, so this is not a memory-safety issue.

Problem

Ad hoc Result{Rows: ...} construction keeps printTableData as a broad compatibility adapter and makes it harder to reason about which paths are true query streaming paths versus small client-side tables.

Suggested PR scope

  • Introduce or consolidate a helper for small client-side tabular outputs.
  • Migrate a coherent set of statement handlers in one PR, for example system variables/params/proto listing, while keeping diff size reviewable.
  • Preserve all existing display formats and result-line behavior.
  • Do not force TABLE rendering or spanvalue writer ownership into this cleanup.
  • Leave large query paths and partitioned query paths to separate issues.

Acceptance criteria

  • The migrated client-side statements no longer hand-roll Result.Rows construction at each call site.
  • Output snapshots/expectations remain unchanged.
  • The helper makes it explicit that these are small, already-materialized client-side result tables.
  • make check passes.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    output-formattingOutput format and display improvementsrefactortech-debtTechnical debt and code quality improvements

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions