1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-4530: toCppCode() method for ParseTree and TreeNode (#2777)

* toCppCode for ParseTree and TreeNode

* generated tree is compiling

* Put tree constructors into tests

* Minor fixes

* Fixed parse + some constructors

* Fixed includes, removed debug and old data

* Hopefully fix clang errors

* Forgot an override

* More overrides
This commit is contained in:
Andrey Piskunov
2023-03-22 22:25:06 +02:00
committed by GitHub
parent 75da821839
commit 256691652d
60 changed files with 2280 additions and 5130 deletions

View File

@ -151,6 +151,17 @@ const string AggregateColumn::toString() const
return output.str();
}
string AggregateColumn::toCppCode(IncludeSet& includes) const
{
includes.insert("aggregatecolumn.h");
stringstream ss;
auto fContent = fData.substr(fFunctionName.size() + 1, fData.size() - fFunctionName.size() - 2);
ss << "AggregateColumn(" << std::quoted(fFunctionName) << ", " << std::quoted(fContent) << ", " << sessionID() << ")";
return ss.str();
}
ostream& operator<<(ostream& output, const AggregateColumn& rhs)
{
output << rhs.toString();