# Pushdown functions

## What is a pushdown function?

A pushdown function is a function that Indexima Engine does not yet support and is delegated to the underlying source on an external table.

When a DataViz tool sends a function recognized as a pushdown function, Indexima will force a delegation of the request and rewrite it to make it compatible with the underlying database.

This way, you can use the window function on your database through Indexima.

## What pushdown function does Indexima support?

Supported functions are the following:

### Statistics functions

- COVAR_POP / COVAR_SAMP : Population and sample covariance.
- PERCENTILE: Exact p
^{th}percentile. - PERCENTILE_APPROX: Approximate p
^{th}percentile. - STDDEV_POP / STDDEV_SAMP : Standard / unbiased sample deviation.
- VAR_POP / VAR_SAMP : Standard / unbiased sample variance.

### Over Partition functions

- FIRST_VALUE OVER PARTITION: The column for which you want the first value.
- LAG OVER PARTITION: The number of rows to lag.
- LAST_VALUE OVER PARTITION: The column for which you want the last value.
- LEAD OVER PARTITION: The number of rows to lead.
- RANK: The rank of the column.
- ROW_NUMBER: The row number of the column.
- <AGGREGATE> OVER PARTITION: Standard aggregations such as COUNT, AVG, MIN, MAX, SUM.

## Supported Table type

By definition, those functions are only supported on **external tables**.

## Supported Databases

Indexima currently supports the pushdown function on:

- Snowflake - since 1.7.11
- BigQuery - since 1.7.11