> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-vortex-format.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table listing hypothetical (what-if) projections defined in the current session

# system.hypothetical_projections

## Descrição

Lista todas as projeções hipotéticas (what-if) definidas na sessão atual. Consulte [`CREATE HYPOTHETICAL PROJECTION`](/pt-BR/reference/statements/hypothetical-projection#create-hypothetical-projection) e [`EXPLAIN WHATIF`](/pt-BR/reference/statements/explain#explain-whatif).

O conteúdo tem escopo de sessão: cada conexão vê apenas as suas próprias projeções hipotéticas, e a tabela fica vazia quando nenhuma foi criada na sessão atual.

Os valores atuais de `(database, table)` são resolvidos por UUID em tempo de consulta, de modo que refletem `RENAME TABLE`, e as entradas de tabelas removidas são ocultadas automaticamente.

## Colunas

* `database` ([String](/pt-BR/reference/data-types/string)) — Nome do banco de dados
* `table` ([String](/pt-BR/reference/data-types/string)) — Nome da tabela
* `name` ([String](/pt-BR/reference/data-types/string)) — Nome da projeção
* `type` ([Enum8('Normal' = 0, 'Aggregate' = 1)](/pt-BR/reference/data-types/enum)) — Tipo da projeção
* `sorting_key` ([Array(String)](/pt-BR/reference/data-types/array)) — Chave de ordenação da projeção
* `query` ([String](/pt-BR/reference/data-types/string)) — Consulta SELECT da projeção, vazia para a forma INDEX ... TYPE ...
* `definition` ([String](/pt-BR/reference/data-types/string)) — Declaração completa da projeção, tal como foi escrita
* `settings` ([Map(String, String)](/pt-BR/reference/data-types/map)) — Configurações da projeção definidas em WITH SETTINGS

## Exemplos

```sql theme={null}
CREATE HYPOTHETICAL PROJECTION p_by_b ON t (SELECT a, b ORDER BY b);
SELECT name, type, sorting_key FROM system.hypothetical_projections;
```

```text theme={null}
┌─name───┬─type───┬─sorting_key─┐
│ p_by_b │ Normal │ ['b']       │
└────────┴────────┴─────────────┘
```

## Veja também

* [`CREATE HYPOTHETICAL PROJECTION`](/pt-BR/reference/statements/hypothetical-projection#create-hypothetical-projection)
* [`EXPLAIN WHATIF`](/pt-BR/reference/statements/explain#explain-whatif)
