MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / tryParseQueryForFuzzedTables

Method tryParseQueryForFuzzedTables

src/Common/QueryFuzzer.h:85–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83private:
84 template <typename Parser>
85 ASTPtr tryParseQueryForFuzzedTables(const std::string_view & full_query)
86 {
87 String message;
88 const char * pos = full_query.data();
89 const char * end = full_query.data() + full_query.size();
90
91 if constexpr (std::is_same_v<Parser, ParserInsertQuery>)
92 {
93 Parser p(end, false);
94 return tryParseQuery(
95 p,
96 pos,
97 end,
98 message,
99 false,
100 "",
101 false,
102 DBMS_DEFAULT_MAX_QUERY_SIZE,
103 DBMS_DEFAULT_MAX_PARSER_DEPTH,
104 DBMS_DEFAULT_MAX_PARSER_BACKTRACKS,
105 true);
106 }
107 else
108 {
109 Parser p;
110 return tryParseQuery(
111 p,
112 pos,
113 end,
114 message,
115 false,
116 "",
117 false,
118 DBMS_DEFAULT_MAX_QUERY_SIZE,
119 DBMS_DEFAULT_MAX_PARSER_DEPTH,
120 DBMS_DEFAULT_MAX_PARSER_BACKTRACKS,
121 true);
122 }
123 }
124
125public:
126 template <typename ParsedAST, typename Parser>

Callers

nothing calls this directly

Calls 3

tryParseQueryFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected