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

Function append

src/Common/parseRemoteDescription.cpp:17–36  ·  view source on GitHub ↗

The Cartesian product of two sets of rows, the result is written in place of the first argument

Source from the content-addressed store, hash-verified

15
16/// The Cartesian product of two sets of rows, the result is written in place of the first argument
17static void append(std::vector<String> & to, const std::vector<String> & what, size_t max_addresses)
18{
19 if (what.empty())
20 return;
21
22 if (to.empty())
23 {
24 to = what;
25 return;
26 }
27
28 if (what.size() * to.size() > max_addresses)
29 throw Exception(ErrorCodes::BAD_ARGUMENTS, "Table function 'remote': first argument generates too many result addresses");
30 std::vector<String> res;
31 for (const auto & elem_to : to)
32 for (const auto & elem_what : what)
33 res.push_back(elem_to + elem_what);
34
35 to.swap(res);
36}
37
38
39/// Parse number from substring

Callers 11

toBufferMethod · 0.70
parseRemoteDescriptionFunction · 0.70
calculateHashMethod · 0.50
appendMethod · 0.50
describeMethod · 0.50
runMethod · 0.50
appendMethod · 0.50
appendMethod · 0.50
executeMethod · 0.50
buildOutputMethod · 0.50

Calls 5

ExceptionClass · 0.70
emptyMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
swapMethod · 0.45

Tested by

no test coverage detected