First page Back Continue Last page Overview Text


My friend the dataset, he's got a big ego and doesn't think he can be improved.

Let's say you want him to change, maybe by calling filter to restrict the rows he represents to a subset.

He's going to pull a fast one on you, by returning a dataset looks like him, but with the filter changed.

However, the dataset itself won't change.

And if you ask that copy to change by calling limit, it's going to return another copy with both the filter and limit applied.

This is known as a functional style API, where objects return modified copies of themselves. It's great as it allows you to share datasets in multiple threads without worrying that those threads will modify shared state.