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

Function joinTypePretty

src/Processors/QueryPlan/JoinStepLogical.cpp:237–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237std::string_view joinTypePretty(JoinKind join_kind, JoinStrictness strictness)
238{
239 /*
240 * Inner Join: ⋈ (Unicode U+22C8)
241 * Left Outer Join: ⟕ (Unicode U+27D5)
242 * Right Outer Join: ⟖ (Unicode U+27D6)
243 * Full Outer Join: ⟗ (Unicode U+27D7)
244 * Semi Join: ⋉ (Unicode U+22C9)
245 * Right Semi Join: ⋊ (Unicode U+22CA)
246 * Anti Join: ⋉̸ (Unicode U+22C9 U+0338)
247 * Right Anti Join: ⋊̸ (Unicode U+22CA U+0338)
248 * Cross Join: × (Unicode U+00D7)
249 * Paste Join: ⟘ (Unicode U+27D8)
250 */
251
252 constexpr auto def_symb = "?";
253 auto symbols = std::array{
254 /// Inner Left Right Full Cross Comma Paste
255 std::array{"\u22C8", "\u27D5", "\u27D6", "\u27D7", "\u00D7", ",", "\u27D8"}, /// All/Any
256 std::array{"\u22C8", "\u22C9", "\u22CA", "\u22C8", def_symb, def_symb, def_symb}, /// Semi
257 std::array{def_symb, "\u22C9\u0338", "\u22CA\u0338", def_symb, def_symb, def_symb, def_symb}, /// Anti
258 };
259
260 size_t row = 0;
261 switch (strictness)
262 {
263 case JoinStrictness::Semi: row = 1; break;
264 case JoinStrictness::Anti: row = 2; break;
265 default: break;
266 }
267 size_t col = 0;
268 switch (join_kind)
269 {
270 case JoinKind::Inner: col = 0; break;
271 case JoinKind::Left: col = 1; break;
272 case JoinKind::Right: col = 2; break;
273 case JoinKind::Full: col = 3; break;
274 case JoinKind::Cross: col = 4; break;
275 case JoinKind::Comma: col = 5; break;
276 case JoinKind::Paste: col = 6; break;
277 }
278 return symbols[row][col];
279}
280
281static std::string_view joinTypePretty(const JoinOperator & join_operator)
282{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected