Skip to content

sample()

Samples a future computation and returns its result as an actual Julia value

sample(future)

Description

Banyan is a suite of libraries with functions for processing big data. These functions operate on and return futures. To convert a future into an actual Julia value, you may either compute it for an exact result or sample it for an approximation.

Required Parameters

future (Future)

The future to sample.

Returns (Any)

The Julia value that results from sampling the future.

Example Usage

df = read_parquet("s3://inventory/availability.parquet")
df_filtered = filter(row -> row.availability < 3, df)
println(sample(df_filtered))
println(compute(df_filtered))