Files
lancedb/docs/web/sql/dql/functions.mdx
T
Brendan Clement 1db0d3ca5f docs: label early access features and hide ones not ready to document (#4855)
Labels early access features and hides features we aren't documenting
yet.

**Early access label:** Functions (4 pages, plus the GPU refresh,
checkpointing and adaptive execution pages), Secrets (3 pages), Tiered
Index Cache, Blob V2, and merge insert, which is labelled for Enterprise
only. Two sidebar titles are shorter so the tag fits.

**Hidden:** branching, JSON columns and geospatial.
- The JSON functions page and the agent branch-experiments tutorial go
in `.mintignore`.
- `tables/branching` stays reachable but out of the nav, as #4859 left
it, because SDK error messages link to it.
- Other pages' mentions of these features become draft comments, so
they're easy to restore.

**Secrets page:** drops references to manual KMS setup, which the
control plane handles. It keeps the encryption-at-rest facts, states the
Azure value-size limit inline, and points a 501 error to support.
2026-11-05 00:13:02 -08:00

62 lines
2.5 KiB
Plaintext

---
title: "Functions"
sidebarTitle: "Functions"
description: "Where to find each kind of function, and the dialect version they come from."
icon: function
keywords: ["functions", "datafusion", "scalar", "aggregate", "window", "fts", "table function"]
availability:
embedded: unavailable
enterprise: available
---
LanceDB executes SQL with [Apache DataFusion](https://datafusion.apache.org),
currently **version 54**. The function set is DataFusion's default registration
plus what Lance adds.
| | |
| --- | --- |
| [Scalar functions](/sql/dql/scalar-functions) | per row: math, string, regex, date/time, array, struct{/* Draft until JSON columns reach early access: restore ", JSON" */} |
| [Aggregate functions](/sql/dql/aggregation#functions) | per group: `count`, `sum`, statistical, approximate |
| [Window functions](/sql/dql/window#functions) | per window: ranking, offset, running aggregates |
| [Table functions](#table-functions) | produce a relation rather than a value |
<Note>
Function availability is version-specific. DataFusion adds functions in most
releases, so one documented on `main` may not exist in 54. When a name is not
recognised, check it against the reference for that version before assuming a
bug.
</Note>
## Table functions {#table-functions}
A table function appears in `FROM` and produces a relation, which is what lets
it return columns a scalar function has nowhere to put. Each has its own
reference page:
| | |
| --- | --- |
| [`fts(table, query)`](/sql/dql/fts) | full-text search, with a relevance score alongside the matching rows |
| [`dedupe(table, column, ...)`](/sql/dql/dedupe) | one representative row per near-duplicate group |
| [`duplicate_pairs(table, column, ...)`](/sql/dql/duplicate-pairs) | every close pair, before resolving into groups |
| [`generate_series(start, stop)`](/sql/dql/generate-series) | rows from a range |
`_score`, the relevance pseudo-column `fts()` produces, is not a function;
see [Data types](/sql/data-types#pseudo-columns).
## What Lance accelerates {#accelerated}
`contains_tokens` uses an index rather than scanning, which is the difference
between a fast predicate and a slow one:
| | Index used |
| --- | --- |
| [`contains_tokens`](/sql/dql/contains-tokens) | full-text index |
{/*
Draft until JSON columns reach early access; restore "Two function families" above.
| [`json_get`, typed variants, `json_extract`](/sql/dql/json-functions) | JSON scalar index |
*/}
Confirm with [`EXPLAIN`](/sql/dql/explain): an accelerated predicate shows an
index node rather than a `LanceScan` followed by a filter.