2015-11-19 21:34:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Parsers/IParserBase.h>
|
2015-11-19 21:34:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-05-27 17:29:55 +00:00
|
|
|
/** Sampling factor of the form 0.1 or 1/10.
|
|
|
|
* It is parsed as a rational number without conversion to IEEE-754.
|
2015-11-19 21:34:53 +00:00
|
|
|
*/
|
|
|
|
class ParserSampleRatio : public IParserBase
|
|
|
|
{
|
|
|
|
protected:
|
2020-01-21 08:54:26 +00:00
|
|
|
const char * getName() const override { return "Sample ratio or offset"; }
|
|
|
|
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
|
2015-11-19 21:34:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|