---
source: https://iinventedlight.com/library/notes/arrow-compute-kernels.md
title: "Run Apache Arrow compute functions over arrays and tables"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Apache Arrow Python docs); Apache-2.0 (Apache Arrow source); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Apache Arrow Python docs, Compute Functions; Apache Arrow source, function.h (Function, Arity). Apache-2.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-20
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-20
as_of: 2026-11-20
confidence: medium
untested: "Not reproduced (2026-11-20). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-systems: Apache Arrow compute kernels"
tags: ["arrow", "compute", "kernels", "pyarrow"]
client: Librarian
sources:
  - id: S1
    title: "Compute Functions"
    publisher: "Apache Arrow Python docs"
    url: https://arrow.apache.org/docs/python/compute.html
    accessed: 2026-11-20
    license: "Apache-2.0"
  - id: S2
    title: "function.h (Function, Arity)"
    publisher: "Apache Arrow source"
    url: https://raw.githubusercontent.com/apache/arrow/main/cpp/src/arrow/compute/function.h
    accessed: 2026-11-20
    license: "Apache-2.0"
---
# Run Apache Arrow compute functions over arrays and tables
**Answer:** Arrow can run logical compute operations on inputs whose types vary. Python callers use the pyarrow.compute module for the standard operations. Selecting a viable kernel for executing a function is referred to as dispatching.

## Calling compute functions

Logical compute operations in Arrow can run over inputs of varying types. The `pyarrow.compute` module provides the standard operations, and you can call them directly. Many compute functions accept an array (chunked or not) or a scalar, though some mandate one or the other. `sort_indices` is an example that requires its only input to be an array.

Grouped aggregations are not invoked that way; they raise an exception and must go through `pyarrow.Table.group_by()`. The Compute Functions reference lists the functions PyArrow provides.

| compute functions | inputs |
|---|---|
| pyarrow.compute | array and scalar inputs |
| group_by | grouped aggregations |
| Function | name, summary, arity |

## Kernels and arity

Arity records how many arguments a function requires. There is a function taking no arguments, a function taking 1 argument, a function taking 2 arguments, and a function taking a variable number of arguments.

Dispatching is the name given to selecting a viable kernel when executing a function. A Function carries a name, a summary, a detailed description, and symbolic names for its arguments.

## See also

- [arrow-record-batches](https://iinventedlight.com/library/notes/arrow-record-batches/)
- [arrow-flight-rpc](https://iinventedlight.com/library/notes/arrow-flight-rpc/)

## Claims

- id: C1
  claim: Arrow supports logical compute operations over inputs of possibly varying types.
  source: S1
  evidence: "Arrow supports logical compute operations over inputs of possibly varying types."

- id: C2
  claim: Many compute functions accept both array and scalar inputs, with some mandating one kind.
  source: S1
  evidence: "Many compute functions support both array (chunked or not)"

- id: C3
  claim: Selecting a viable kernel for a function is called dispatching.
  source: S2
  evidence: "Selecting a viable kernel for executing a function"

## Sources

- [S1] Compute Functions. Apache Arrow Python docs. https://arrow.apache.org/docs/python/compute.html . License: Apache-2.0. Accessed 2026-11-20.

- [S2] function.h (Function, Arity). Apache Arrow source. https://raw.githubusercontent.com/apache/arrow/main/cpp/src/arrow/compute/function.h . License: Apache-2.0. Accessed 2026-11-20.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Apache Arrow Python docs, Compute Functions; Apache Arrow source, function.h (Function, Arity). Apache-2.0. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
