Skip to content

Add Table::describe - #3239

Merged
texodus merged 1 commit into
masterfrom
describe
Sep 24, 2026
Merged

texodus merged 1 commit into
masterfrom
describe

Conversation

@texodus

@texodus texodus commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

This PR "replaces" Table::validate_expressions with Table::describe, which validates a complete ViewConfig against a table and reports the schema a View built from it would have, without creating one. The old call could only type-check expressions in isolation; everything else about a config (bad column names, bad windows, bad aggregates) only surfaced by building a View and catching the failure.

The actual Table::validate_expressions method still exists, so this change is only breaking in the sense that the Virtual Server API now requires implementing describe instead of just validate_expressions. Internally however, it now creates an entire blank ViewConfig to host the expressions.

For a config like:

const verdict = await table.describe({
     // Config here
});

Expect one of these return values:

Return value
{ expression_schema, view_schema } view_schema equals View::schema() of the same config
{ expression_schema, expression_errors } one or more expressions failed to compile, valid ones still report their type
{ config_error } expressions are fine, the rest of the config is not

In addition to perspective-server, all virtual servers have been updated and dedicated tests added.

Signed-off-by: Andrew Stein <steinlink@gmail.com>
@texodus texodus added enhancement Feature requests or improvements breaking labels Sep 24, 2026
@texodus
texodus merged commit df7743e into master Sep 24, 2026
34 of 35 checks passed
@texodus
texodus deleted the describe branch September 24, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking enhancement Feature requests or improvements

Development

Successfully merging this pull request may close these issues.

1 participant