feat: use SQL for remote view lifecycle

Stacked on #4675.

Remote view create, describe, list, and drop now execute SQL. CREATE returns the stored definition, resolution defaults, and Arrow schema from the same execution; DESCRIBE VIEW returns that metadata and SHOW VIEWS supports scoped pagination.

`drop_view_async()` returns a `job_type="query"` handle whose single `job.id` is the SQL query UUID. Waiting drains the query result once and caches completion; `describe_query(job.id)` works on the submitting connection. Completion means catalog removal, with physical cleanup continuing separately. Query handles have no registry history and cannot be reopened through `open_job()`.
This commit is contained in:
Jack Ye
2026-10-31 02:09:54 +08:00
committed by GitHub
parent 45e00d4de7
commit ac7930fa77
13 changed files with 477 additions and 562 deletions
+6 -7
View File
@@ -558,10 +558,11 @@ on the returned job to know when cleanup has finished.
abstract dropView(name, namespacePath?): Promise<void>
```
Drop the view named `name` and wait for its definition to be deleted.
Drop the view named `name` and wait for catalog removal.
The tables it reads are untouched: a view holds no rows of its own. Use
[dropViewAsync](Connection.md#dropviewasync) to retain the cleanup job instead of waiting on it.
[dropViewAsync](Connection.md#dropviewasync) to retain its SQL query job. Completion confirms
catalog removal; physical cleanup continues in the background.
#### Parameters
@@ -581,11 +582,9 @@ The tables it reads are untouched: a view holds no rows of its own. Use
abstract dropViewAsync(name, namespacePath?): Promise<Job>
```
Start dropping the view named `name` and return the job deleting its
definition, without waiting for completion.
The name is free before this resolves. When nothing was bound to it, the
returned job is already finished and has no id.
Drop a view and return its SQL query job.
The job has type `query` and its ID is the SQL query UUID. Waiting confirms
catalog removal; physical cleanup continues in the background.
#### Parameters