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

Method printReadStorageRowCountStep

src/QueryPlan/GraphvizPrinter.cpp:2084–2137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2082}
2083
2084String StepPrinter::printReadStorageRowCountStep(const ReadStorageRowCountStep & step)
2085{
2086 auto database_and_table = step.getDatabaseAndTableName();
2087 std::stringstream details;
2088 details << database_and_table.first << "." << database_and_table.second << "|";
2089
2090 auto ast = step.getQuery();
2091 auto * query = ast->as<ASTSelectQuery>();
2092 if (query && query->getWhere())
2093 {
2094 details << "Filter : \\n";
2095 details << printFilter(query->refWhere());
2096 details << "|";
2097 }
2098
2099 if (query && query->getPrewhere())
2100 {
2101 details << "Prewhere : \\n";
2102 details << printFilter(query->refPrewhere());
2103 details << "|";
2104 }
2105
2106 details << "Functions:\\n";
2107 auto desc = step.getAggregateDescription();
2108 auto type_name = String(typeid(desc.function.get()).name());
2109 String func_name = desc.function->getName();
2110 if (type_name.find("AggregateFunctionNull"))
2111 {
2112 func_name = String("AggNull(").append(std::move(func_name)).append(")");
2113 }
2114 details << desc.column_name << ":=" << func_name;
2115 details << "( ";
2116 details << "Argument:";
2117 for (const auto & argument : desc.argument_names)
2118 {
2119 details << argument << " ";
2120 }
2121 details << "Types:";
2122 for (const auto & type : desc.function->getArgumentTypes())
2123 {
2124 details << type->getName() << " ";
2125 }
2126 details << ")";
2127 details << "\\n";
2128 details << "|";
2129
2130 details << "Output \\n";
2131 for (auto & column : step.getOutputStream().header)
2132 {
2133 details << column.name << ":";
2134 details << column.type->getName() << "\\n";
2135 }
2136 return details.str();
2137}
2138
2139String StepPrinter::printValuesStep(const ValuesStep & step)
2140{

Callers

nothing calls this directly

Calls 13

getWhereMethod · 0.80
StringClass · 0.50
getQueryMethod · 0.45
getPrewhereMethod · 0.45
nameMethod · 0.45
getMethod · 0.45
getNameMethod · 0.45
findMethod · 0.45
appendMethod · 0.45
getOutputStreamMethod · 0.45

Tested by

no test coverage detected