Skip to content

Commit 6eaa14d

Browse files
kashwybkuschel
authored andcommitted
Kusto-phase2: add kusto_auto dialect
1 parent 7ddb9e0 commit 6eaa14d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/Client/ClientBase.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ ASTPtr ClientBase::parseQuery(const char *& pos, const char * end, bool allow_mu
306306
const auto & settings = global_context->getSettingsRef();
307307
size_t max_length = 0;
308308

309+
auto begin = pos;
310+
309311
if (!allow_multi_statements)
310312
max_length = settings.max_query_size;
311313

@@ -334,8 +336,14 @@ ASTPtr ClientBase::parseQuery(const char *& pos, const char * end, bool allow_mu
334336

335337
if (!res)
336338
{
337-
std::cerr << std::endl << message << std::endl << std::endl;
338-
return nullptr;
339+
if (sql_dialect != "kusto")
340+
res = tryParseQuery(kql_parser, begin, end, message, true, "", allow_multi_statements, max_length, settings.max_parser_depth);
341+
342+
if (!res)
343+
{
344+
std::cerr << std::endl << message << std::endl << std::endl;
345+
return nullptr;
346+
}
339347
}
340348
}
341349
else

0 commit comments

Comments
 (0)