| 167 | using RelativeSize = boost::rational<ASTSampleRatio::BigNum>; |
| 168 | |
| 169 | static std::string toString(const RelativeSize & x) |
| 170 | { |
| 171 | return ASTSampleRatio::toString(x.numerator()) + "/" + ASTSampleRatio::toString(x.denominator()); |
| 172 | } |
| 173 | |
| 174 | /// Converts sample size to an approximate number of rows (ex. `SAMPLE 1000000`) to relative value (ex. `SAMPLE 0.1`). |
| 175 | static RelativeSize convertAbsoluteSampleSizeToRelative(const ASTSampleRatio::Rational & ratio, size_t approx_total_rows) |