| 244 | } |
| 245 | |
| 246 | std::string DataSource::tpchVerbPhrase() { |
| 247 | if (randomTrue(1 / 4)) |
| 248 | return std::string( |
| 249 | tpchVerbs[chRandom::uniformInt(0, tpchVerbs.size() - 1)]); |
| 250 | else if (randomTrue(1 / 4)) |
| 251 | return std::string(tpchAuxiliaries[chRandom::uniformInt( |
| 252 | 0, tpchAuxiliaries.size() - 1)]) + |
| 253 | " " + tpchVerbs[chRandom::uniformInt(0, tpchVerbs.size() - 1)]; |
| 254 | else if (randomTrue(1 / 4)) |
| 255 | return std::string( |
| 256 | tpchVerbs[chRandom::uniformInt(0, tpchVerbs.size() - 1)]) + |
| 257 | " " + |
| 258 | tpchAdverbs[chRandom::uniformInt(0, tpchAdverbs.size() - 1)]; |
| 259 | else |
| 260 | return std::string(tpchAuxiliaries[chRandom::uniformInt( |
| 261 | 0, tpchAuxiliaries.size() - 1)]) + |
| 262 | " " + tpchVerbs[chRandom::uniformInt(0, tpchVerbs.size() - 1)] + |
| 263 | " " + |
| 264 | tpchAdverbs[chRandom::uniformInt(0, tpchAdverbs.size() - 1)]; |
| 265 | } |
| 266 | |
| 267 | std::string DataSource::tpchPrepositionalPhrase() { |
| 268 | return std::string(tpchPrepositions[chRandom::uniformInt( |
nothing calls this directly
no test coverage detected