Bigtable/src/Filter/Builder/KeyFilter.php
public function sample($probability)
    {
        if ($probability < 0) {
            throw new \InvalidArgumentException('Probability must be positive');
        }
        if ($probability >= 1.0) {
            throw new \InvalidArgumentException('Probability must be less than 1.0');
        }

        return new SimpleFilter(
            (new RowFilter)->setRowSampleFilter($probability)
        );
    }
public function sample($probability)
    {
        if ($probability < 0) {
            throw new \InvalidArgumentException('Probability must be positive');
        }
        if ($probability >= 1.0) {
            throw new \InvalidArgumentException('Probability must be less than 1.0');
        }

        return new SimpleFilter(
            (new RowFilter)->setRowSampleFilter($probability)
        );
    }
public function sample ( $ probability ) { if ( $ probability < 0 ) { throw new \ InvalidArgumentException ( 'Probability must be positive' ) ; } if ( $ probability >= 1.0 ) { throw new \ InvalidArgumentException ( 'Probability must be less than 1.0' ) ; } return new SimpleFilter ( ( new RowFilter ) -> setRowSampleFilter ( $ probability ) ) ; }
Matches all cells from a row with `probability`, and matches no cells
from the row with probability 1-`probability`.

Example:
```
$keyFilter = $builder->sample(.7);
```

@param float $probability The probability to filter by. Must be within
the range [0, 1], end points excluded.
@return SimpleFilter
@throws \InvalidArgumentException When the probability does not fall
within the acceptable range.
Matches all cells from a row with probability and matches no cells from the row with probability 1 - probability .