Loading...

vastorbit.VastFrame.explain

VastFrame.explain(analyze: bool = False, verbose: bool = False) str

Provides information on how Trino is computing the current VastFrame relation.

Parameters:
  • analyze (bool, optional) – If set to True, executes the query and returns runtime statistics in addition to the plan.

  • verbose (bool, optional) – If set to True, returns more detailed information including cost estimates and statistics.

Returns:

explain plan

Return type:

str

Examples

Let’s begin by importing vastorbit.

import vastorbit as vo

Hint

By assigning an alias to vastorbit, we mitigate the risk of code collisions with other libraries. This precaution is necessary because vastorbit uses commonly known function names like “average” and “median”, which can potentially lead to naming conflicts. The use of an alias ensures that the functions from vastorbit are used as intended without interfering with functions from other libraries.

Let us create a dummy dataset and check its Query Plan:

vdf = vo.VastFrame({"val": [0, 10, 20]})
123
val
Integer
10
210
320
Rows: 1-3 | Column: val | Type: integer

We can display the Query Plan of the VastFrame using:

print(vdf.explain())

For more detailed information with runtime statistics:

print(vdf.explain(analyze=True))

See also

VastFrame.info() : Displays information about the different VastFrame transformations