MCPcopy Create free account
hub / github.com/ByConity/ByConity / executeQuery

Function executeQuery

src/Interpreters/executeQuery.cpp:1945–1968  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1943}
1944
1945BlockIO
1946executeQuery(const String & query, ContextMutablePtr context, bool internal, QueryProcessingStage::Enum stage, bool may_have_embedded_data)
1947{
1948 ASTPtr ast;
1949 BlockIO streams;
1950
1951
1952 std::tie(ast, streams)
1953 = executeQueryImpl(query.data(), query.data() + query.size(), nullptr, context, internal, stage, !may_have_embedded_data, nullptr);
1954
1955 if (const auto * ast_query_with_output = dynamic_cast<const ASTQueryWithOutput *>(ast.get()))
1956 {
1957
1958 // Try to redirect streams to the target file instead of the client when outfile_in_server_with_tcp is true
1959 tryOutfile(streams, ast, context);
1960
1961 String format_name = ast_query_with_output->format ? getIdentifierName(ast_query_with_output->format) : context->getDefaultFormat();
1962
1963 if (format_name == "Null")
1964 streams.null_format = true;
1965 }
1966
1967 return streams;
1968}
1969
1970BlockIO executeQuery(
1971 const String & query,

Callers 15

reproduceExecuteImplMethod · 0.70
getSelectResultMethod · 0.70
executeMethod · 0.70
executeTEALimitMethod · 0.70
sendQueryMethod · 0.70
executeMethod · 0.70
executeMethod · 0.70
executeMethod · 0.70
tryExecuteQueryMethod · 0.70

Calls 15

executeQueryImplFunction · 0.85
tryOutfileFunction · 0.85
parseQueryFunction · 0.85
interpretSettingsFunction · 0.85
getDefaultFormatMethod · 0.80
getInputStreamMethod · 0.80
hasPendingDataMethod · 0.80
bufferMethod · 0.80
isAsyncModeMethod · 0.80
getNumThreadsMethod · 0.80

Tested by 2

executeMethod · 0.40
executeTestDBQueryFunction · 0.40