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

Function trimColumnIdentifier

src/Processors/QueryPlan/QueryPlanFormat.cpp:56–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 }
55
56 String trimColumnIdentifier(std::string_view name)
57 {
58 if (name.find(TABLE_PREFIX) == std::string_view::npos)
59 return String(name);
60
61 String result;
62 result.reserve(name.size());
63 size_t seg_start = 0;
64 for (size_t i = 0; i < name.size();)
65 {
66 if (size_t after = matchTablePrefix(name, i))
67 {
68 result.append(name, seg_start, i - seg_start);
69 i = after;
70 seg_start = after;
71 }
72 else
73 {
74 ++i;
75 }
76 }
77 result.append(name, seg_start, name.size() - seg_start);
78 return result;
79 }
80
81 void formatJoinOutputColumns(WriteBuffer & out, const IQueryPlanStep & step, const String & prefix)
82 {

Callers 9

formatJoinOutputColumnsFunction · 0.85
formatOutputColumnsFunction · 0.85
formatFilterPrettyFunction · 0.85
formatSetPrettyFunction · 0.85
formatNodePrettyFunction · 0.85
formatColumnPrettyFunction · 0.85
addAggregatesPrettyNamesFunction · 0.85
buildPrettyNamesForNodeFunction · 0.85
explainStepFunction · 0.85

Calls 6

matchTablePrefixFunction · 0.85
StringClass · 0.50
findMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected