mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-13 07:12:27 +00:00
docs: declare where SQL and the SDKs apply
SQL is unavailable in the embedded library and varies on a deployment, which serves it only when its Flight SQL endpoint is enabled and reachable, and the SDK has to be told where that is. The page's opening badge goes. The SDKs page declares both offerings. Neither SDK aggregates or joins, so the parity tables no longer say they do, and views can be created through the SDKs on a deployment. Pages that said vector search has no SQL form now point to the version-dependent SQL form, and COPY, which newer deployment versions refuse, is marked as such in the reference.
This commit is contained in:
@@ -6,7 +6,11 @@ icon: file-export
|
||||
keywords: ["copy", "export", "parquet", "sql"]
|
||||
---
|
||||
|
||||
<Badge color="red">Enterprise</Badge> [SQL runs on a deployment.](/sql)
|
||||
<Warning>
|
||||
Newer deployment versions refuse `COPY` over the SQL endpoint with "COPY is not
|
||||
supported". On those, export a result by reading it through a Flight SQL client
|
||||
or an SDK and writing the files from your application.
|
||||
</Warning>
|
||||
|
||||
```sql
|
||||
COPY (SELECT id, title FROM documents) TO 's3://bucket/export/' STORED AS PARQUET
|
||||
|
||||
@@ -112,7 +112,8 @@ estimate -- a 1% sample of a skewed column will miss rare categories entirely.
|
||||
|
||||
## What aggregation does not do {#not}
|
||||
|
||||
Aggregates run over rows the query already produced. They cannot combine with
|
||||
[vector search](/search/vector-search) in one statement, because similarity
|
||||
search has no SQL form. Run the search in an SDK and aggregate its result, or
|
||||
materialize the search output first.
|
||||
Aggregates run over rows the query already produced. Whether a statement can
|
||||
include [vector search](/search/vector-search)
|
||||
[depends on the deployment](/basics/sql#no-vector-sql); where it cannot, run the
|
||||
search in an SDK and aggregate its result, or materialize the search output
|
||||
first.
|
||||
|
||||
@@ -6,9 +6,9 @@ icon: table-list
|
||||
keywords: ["sql", "datafusion", "flight sql", "reference", "dialect"]
|
||||
---
|
||||
|
||||
<Badge color="red">Enterprise</Badge> SQL runs on a deployment. A local database
|
||||
has no engine to plan a statement, so `execute_query` raises there -- see
|
||||
[SQL](/basics/sql#sql-is-remote).
|
||||
<Badge color="red">Enterprise</Badge> SQL runs on a deployment that enables its
|
||||
Flight SQL endpoint. A local database has no SQL endpoint, so `execute_query`
|
||||
raises there -- see [SQL](/basics/sql#sql-is-remote).
|
||||
|
||||
This is a reference rather than a guide: one page per construct, syntax first.
|
||||
The guides elsewhere in these docs show the same operations from the SDKs.
|
||||
@@ -87,8 +87,8 @@ const result = await client.query("SELECT * FROM flights WHERE origin = 'SFO'");
|
||||
|
||||
The endpoint executes one statement per request and is meant for the queries
|
||||
and DDL/DML pages below. Reach for the SDKs instead for table-management
|
||||
operations that have no SQL form, such as building a vector index or a merge
|
||||
insert -- see [What SQL cannot do](#cannot).
|
||||
operations that have no SQL form, such as a merge insert -- see
|
||||
[What SQL cannot do](#cannot).
|
||||
|
||||
## Reference {#reference}
|
||||
|
||||
@@ -111,7 +111,7 @@ insert -- see [What SQL cannot do](#cannot).
|
||||
| [Insert](/sql/dml/insert) | `INSERT INTO`, including `INSERT ... SELECT` |
|
||||
| [Update](/sql/dml/update) | `UPDATE ... SET` |
|
||||
| [Delete](/sql/dml/delete) | `DELETE FROM` |
|
||||
| [Copy](/sql/dml/copy) | `COPY INTO` / `COPY TO` |
|
||||
| [Copy](/sql/dml/copy) | `COPY` -- refused by newer deployment versions |
|
||||
| [Refresh](/sql/dml/refresh) | filling computed columns and materialized views |
|
||||
|
||||
### DQL {#dql}
|
||||
@@ -141,9 +141,10 @@ insert -- see [What SQL cannot do](#cannot).
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| Vector search | no SQL form -- a query-builder operation |
|
||||
| Vector search | [depends on the deployment](/basics/sql#no-vector-sql); the query builder always has it |
|
||||
| Merge insert | no SQL form -- needs a source relation and a per-match policy |
|
||||
| `information_schema` | not enabled, so `SHOW TABLES` and `SHOW COLUMNS` fail |
|
||||
| `COPY` | refused by newer deployment versions -- see [Copy](/sql/dml/copy) |
|
||||
| `PREPARE` / `EXECUTE` | preparation is a [protocol feature](/sql/prepared-statements), not a statement |
|
||||
| Run on a local database | no engine to plan the statement |
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ IN`, which is the usual place this bites. See
|
||||
<Warning>
|
||||
Arithmetic over a vector column is **list** arithmetic, not scalar arithmetic —
|
||||
a vector is a `FixedSizeList<Float32>`. When the operation you want is a
|
||||
similarity comparison, use [vector search](/search/vector-search); there is no
|
||||
SQL form for it.
|
||||
similarity comparison, use [vector search](/search/vector-search); whether SQL
|
||||
can express it [depends on the deployment](/basics/sql#no-vector-sql).
|
||||
</Warning>
|
||||
|
||||
## Literals {#literals}
|
||||
|
||||
Reference in New Issue
Block a user