tursodatabase/turso · error · SystemExit

has columns , has

Error message

{run.path} has columns {run.columns}, {runs[0].path} has {columns}

What it means

All CSV files given to the plotter are plotted as series on the same axes, so every run must share an identical column set. When a later run's columns differ from the first run's, the script exits naming both files and their column lists.

Solutions

  1. Regenerate all CSVs with the same benchmark version so schemas match.
  2. Inspect the column mismatch: `head -1 old.csv` vs `head -1 new.csv`, and drop or convert the incompatible file.
  3. Plot only runs from the same schema generation in one invocation.
  4. If a column rename is expected, update the plotting script's expectations and migrate old CSVs.

Example fix

// before
python plot-tpch.py --csv-files old_schema.csv new_schema.csv -o out
// after
python plot-tpch.py --csv-files new_schema_run1.csv new_schema_run2.csv -o out
Defensive patterns

Strategy: validation

Validate before calling

import csv
def columns_of(path):
    with open(path, newline="") as f:
        return next(csv.reader(f), [])
def schemas_match(paths):
    cols = columns_of(paths[0])
    return all(columns_of(p) == cols for p in paths[1:])

Prevention

When it happens

Trigger: Running plot-tpch.py with multiple --csv-file/--name inputs produced by different benchmark versions, different scale factors, or a benchmark whose output columns changed between runs.

Common situations: Comparing results across git revisions after the benchmark's CSV schema changed; mixing old benchmark outputs with new ones; one CSV generated by a modified script with extra/renamed columns.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of tursodatabase/turso@8d4a589f8d (2026-09-13). Data as JSON: /api/errors/567d79847c2c0aa7. Report an issue: GitHub.

Appendix: source

Thrown at perf/tpc-h/plot/plot-tpch.py:71


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("csv_files", type=Path, nargs="+")
    parser.add_argument("--out", type=Path, default=Path("tpch"), metavar="PREFIX",
                        help="write PREFIX.png, PREFIX.pdf and PREFIX.tikz (default tpch)")
    parser.add_argument("--name", action="append", default=[], metavar="ENGINE=NAME",
                        help="legend name for an engine, e.g. limbo=Turso")
    args = parser.parse_args()
    names = dict(name.split("=", 1) for name in args.name)

    runs = [read_run(path) for path in args.csv_files]
    columns = runs[0].columns
    if not runs[0].rows or not columns:
        raise SystemExit("no results found")
    for run in runs[1:]:
        if run.columns != columns:
            raise SystemExit(f"{run.path} has columns {run.columns}, {runs[0].path} has {columns}")

    figure = Figure(runs, columns, names)
    for suffix in (".png", ".pdf"):
        output = args.out.with_suffix(suffix)
        figure.matplotlib(output)
        print(f"wrote {output}")
    output = args.out.with_suffix(".tikz")
    output.write_text(figure.tikz())
    print(f"wrote {output}")


class Run:
    """One CSV: the queries in file order and every engine's time for each."""

    def __init__(self, path, columns, rows):
        self.path = path
        self.columns = columns
        self.rows = rows

View on GitHub (pinned to 8d4a589f8d)