You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +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:
@ -80,7 +80,7 @@ class LogicOperator : public Operator
|
||||
*
|
||||
* deep copy of this pointer and return the copy
|
||||
*/
|
||||
inline virtual LogicOperator* clone() const
|
||||
inline virtual LogicOperator* clone() const override
|
||||
{
|
||||
return new LogicOperator(*this);
|
||||
}
|
||||
@ -88,15 +88,15 @@ class LogicOperator : public Operator
|
||||
/**
|
||||
* The serialization interface
|
||||
*/
|
||||
virtual void serialize(messageqcpp::ByteStream&) const;
|
||||
virtual void unserialize(messageqcpp::ByteStream&);
|
||||
virtual void serialize(messageqcpp::ByteStream&) const override;
|
||||
virtual void unserialize(messageqcpp::ByteStream&) override;
|
||||
|
||||
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
|
||||
*
|
||||
* Do a deep, strict (as opposed to semantic) equivalence test.
|
||||
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
|
||||
*/
|
||||
virtual bool operator==(const TreeNode* t) const;
|
||||
virtual bool operator==(const TreeNode* t) const override;
|
||||
|
||||
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
|
||||
*
|
||||
@ -110,7 +110,7 @@ class LogicOperator : public Operator
|
||||
* Do a deep, strict (as opposed to semantic) equivalence test.
|
||||
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
|
||||
*/
|
||||
virtual bool operator!=(const TreeNode* t) const;
|
||||
virtual bool operator!=(const TreeNode* t) const override;
|
||||
|
||||
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
|
||||
*
|
||||
@ -123,7 +123,7 @@ class LogicOperator : public Operator
|
||||
|
||||
// F&E framework
|
||||
using Operator::getBoolVal;
|
||||
inline virtual bool getBoolVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop)
|
||||
inline virtual bool getBoolVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
|
||||
{
|
||||
switch (fOp)
|
||||
{
|
||||
@ -165,11 +165,20 @@ class LogicOperator : public Operator
|
||||
}
|
||||
|
||||
using TreeNode::evaluate;
|
||||
inline virtual void evaluate(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop)
|
||||
inline virtual void evaluate(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop) override
|
||||
{
|
||||
fResult.boolVal = getBoolVal(row, isNull, lop, rop);
|
||||
}
|
||||
|
||||
inline virtual std::string toCppCode(IncludeSet& includes) const override
|
||||
{
|
||||
includes.insert("logicoperator.h");
|
||||
std::stringstream ss;
|
||||
ss << "LogicOperator(" << std::quoted(fData) << ")";
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
private:
|
||||
// default okay
|
||||
// Operator& operator=(const Operator& rhs);
|
||||
|
Reference in New Issue
Block a user