> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_H3Uncompact

> Expand H3 cells to a requested resolution.

Expands an array of H3 cell IDs to the requested resolution using H3's [uncompactCells(cells, resolution)](https://h3geo.org/docs/api/hierarchy#uncompactcells).

The input cells may have different resolutions and do not need to come from a compaction operation. Each coarser cell is replaced by its descendants at the target resolution. Cells already at the target resolution are retained.

The requested resolution must be between 0 and 15, inclusive, and at least as fine as every input cell's resolution. A lower resolution or a resolution outside this range raises an error. An empty input array returns an empty array. A null array or resolution returns null.

Input cells should be unique and non-overlapping; duplicate or overlapping cells may produce duplicates in the output. The order of the returned cells is not guaranteed. The result can grow rapidly when expanding to a much finer resolution.

## Signature

```sql theme={"system"}
ST_H3Uncompact(cells: Array<Long>, resolution: Int)
```

## Return type

`Array<Long>`

## Examples

```sql theme={"system"}
SELECT ST_H3Uncompact(array(601041811137363967), 5)
```

Output:

```text theme={"system"}
[601041811137363967]
```

To expand this resolution 5 hexagon to its seven immediate children:

```sql theme={"system"}
SELECT SIZE(ST_H3Uncompact(array(601041811137363967), 6)) AS cell_count
```

Output:

```text theme={"system"}
7
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.