# eval()

{% hint style="warning" %}
The `eval()` function depends on [scalar functions and operators](/scanner/using-scanner-complete-feature-reference/beta-features/scalar-functions-and-operators.md), which are currently in beta and may change in the future.
{% endhint %}

`eval([...col = expression])` runs each `expression` and assigns it to the corresponding `col`.

`expression` supports any composition of [scalar functions and operators](/scanner/using-scanner-complete-feature-reference/beta-features/scalar-functions-and-operators.md).

Currently, scalar expressions can express more data types than table values can. Hence, at assignment, scalar expression values are converted back to table values as such:

* numbers, strings, and null values are preserved
* boolean values are converted to the strings `"true"` and `"false"`
* arrays are converted to a string via JSON serialization

{% hint style="warning" %}
This conversion behavior may change when direct support for these types is added to tables.
{% endhint %}

## Returns

A same table as the input, with additional columns corresponding to the `col`s specified.

## Examples

Get a list of HTTP 502s, converting the elapsed time from milliseconds to seconds.

```python
response.status=502
| eval elapsed_s = request.elapsed_ms / 1000
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/querying-and-analysis/aggregation-functions/eval.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
