---
name: TableInput
lang: cpp
domain: core
version: "1.0.0"
algebraic: product
definition: |
  struct TableInput {
      std::string               name;
      std::vector<std::string>  headers;
      std::vector<ColumnType>   types;
      const char* const*        cells;
      int                       rows;
      int                       cols;
  };
description: "Tabla materializada en memoria pasada a data_table::render(). Owner externo. Multiple tables = main + joinables (fase 9 issue 0078)."
tags: [tql, table, joins, mbql, product-type]
uses_types: [Op_cpp_core]
file_path: "cpp/functions/core/data_table_types.h"
---

## Notas

`name` es el identificador estable que matchea `Join.source` cuando se aplica un join. `cells` es row-major (rows * cols `const char*`). Apuntadores estables durante todo el frame de render.

Cells son strings — auto_detect_type infiere ColumnType si `types[i] == Auto`. Numericos se parsean por celda en compare/agg via `parse_number()`.

## Usado por

- `data_table_cpp_viz::render(tables, state)`
- `resolve_main_idx` (matchea state.main_source)
- `join_tables_cpp_core` (right table)
- `tql_to_sql_cpp_core` (schema para emitir SELECT FROM `name`)
