1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-18 21:44:02 +03:00

Better toString()

This commit is contained in:
Serguey Zefirov 2025-04-11 10:44:15 +03:00
parent f93f9b2604
commit 85ac730dcb
2 changed files with 28 additions and 7 deletions

View File

@ -202,6 +202,16 @@ string CalpontSelectExecutionPlan::toString() const
if (distinct())
output << "DISTINCT ";
output << "(subselect " << fSubType;
if (fSubType != MAIN_SELECT)
{
output << ", derived table alias '" << fDerivedTbAlias << ", view '" << fDerivedTbView << "'";
}
output << ") ";
output << (fLocalQuery == GLOBAL_QUERY ? "GLOBAL " : "LOCAL ");
output << (fWithRollup ? "ROLLUP " : "");
output << "limit: " << limitStart() << " - " << limitNum() << endl;
switch (location())
@ -258,6 +268,15 @@ string CalpontSelectExecutionPlan::toString() const
}
}
if (!fSubSelectList.empty())
{
output << "subselects:\n";
for(uint32_t i = 0; i < fSubSelectList.size(); i++)
{
output << "{" << *(fSubSelectList[i].get()) << "}\n";
}
}
// Filters
output << ">>Filters" << endl;
@ -287,6 +306,8 @@ string CalpontSelectExecutionPlan::toString() const
// Order by columns
const CalpontSelectExecutionPlan::OrderByColumnList& obc = orderByCols();
output << (fHasOrderBy ? "has order by\n" : "");
if (obc.size() > 0)
{
output << ">>Order By Columns" << endl;

View File

@ -856,8 +856,8 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
* parse tree is deleted. So this list should not be deleted
* again in destructor.
*/
FilterTokenList fFilterTokenList;
FilterTokenList fHavingTokenList;
FilterTokenList fFilterTokenList; // not in toString()
FilterTokenList fHavingTokenList; // not in toString()
/**
* A tree of Filter objects
@ -939,20 +939,20 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan
SelectList fSelectSubList;
// @bug3321, for string scan blocks
uint64_t fStringScanThreshold = ULONG_MAX;
uint64_t fStringScanThreshold = ULONG_MAX; // not in toString()
// query type
uint32_t fQueryType = SELECT;
uint32_t fPriority;
uint32_t fPriority; // not in toString()
uint32_t fStringTableThreshold = 20;
// for specific handlers processing, e.g. GROUP BY
bool fSpecHandlerProcessed = false;
uint32_t fOrderByThreads = 1;
bool fSpecHandlerProcessed = false; // not in toString()
uint32_t fOrderByThreads = 1; // not in toString()
// Derived table involved in the query. For derived table optimization
std::vector<SCSEP> fSubSelectList;
std::vector<SCSEP> fSubSelectList; // not in toString()
boost::uuids::uuid fUuid{};