You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-1822 interim checkin
This commit is contained in:
@ -123,6 +123,11 @@ public:
|
||||
evaluate(row, isNull, lop, rop);
|
||||
return TreeNode::getDoubleVal();
|
||||
}
|
||||
virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop)
|
||||
{
|
||||
evaluate(row, isNull, lop, rop);
|
||||
return TreeNode::getLongDoubleVal();
|
||||
}
|
||||
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull, ParseTree* lop, ParseTree* rop)
|
||||
{
|
||||
evaluate(row, isNull, lop, rop);
|
||||
@ -194,9 +199,15 @@ inline void ArithmeticOperator::evaluate(rowgroup::Row& row, bool& isNull, Parse
|
||||
|
||||
case execplan::CalpontSystemCatalog::DOUBLE:
|
||||
case execplan::CalpontSystemCatalog::FLOAT:
|
||||
case execplan::CalpontSystemCatalog::UDOUBLE:
|
||||
case execplan::CalpontSystemCatalog::UFLOAT:
|
||||
fResult.doubleVal = execute(lop->getDoubleVal(row, isNull), rop->getDoubleVal(row, isNull), isNull);
|
||||
break;
|
||||
|
||||
case execplan::CalpontSystemCatalog::LONGDOUBLE:
|
||||
fResult.longDoubleVal = execute(lop->getLongDoubleVal(row, isNull), rop->getLongDoubleVal(row, isNull), isNull);
|
||||
break;
|
||||
|
||||
case execplan::CalpontSystemCatalog::DECIMAL:
|
||||
case execplan::CalpontSystemCatalog::UDECIMAL:
|
||||
execute (fResult.decimalVal, lop->getDecimalVal(row, isNull), rop->getDecimalVal(row, isNull), isNull);
|
||||
|
@ -300,6 +300,12 @@ public:
|
||||
return TreeNode::getDoubleVal();
|
||||
}
|
||||
|
||||
virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
evaluate(row, isNull);
|
||||
return TreeNode::getLongDoubleVal();
|
||||
}
|
||||
|
||||
virtual IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
evaluate(row, isNull);
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
virtual inline int64_t getIntVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline double getDoubleVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull);
|
||||
|
||||
/** The serialize interface */
|
||||
@ -180,6 +181,15 @@ inline double SimpleColumn_Decimal<len>::getDoubleVal(rowgroup::Row& row, bool&
|
||||
return (row.getIntField<len>(fInputIndex) / pow((double)10, fResultType.scale));
|
||||
}
|
||||
|
||||
template<int len>
|
||||
inline long double SimpleColumn_Decimal<len>::getLongDoubleVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
if (row.equals<len>(fNullVal, fInputIndex))
|
||||
isNull = true;
|
||||
|
||||
return (row.getIntField<len>(fInputIndex) / pow((double)10, fResultType.scale));
|
||||
}
|
||||
|
||||
template<int len>
|
||||
inline IDB_Decimal SimpleColumn_Decimal<len>::getDecimalVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
virtual inline uint64_t getUintVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline double getDoubleVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull);
|
||||
|
||||
/** The serialize interface */
|
||||
@ -198,6 +199,15 @@ inline double SimpleColumn_INT<len>::getDoubleVal(rowgroup::Row& row, bool& isNu
|
||||
return (double)row.getIntField<len>(fInputIndex);
|
||||
}
|
||||
|
||||
template<int len>
|
||||
inline long double SimpleColumn_INT<len>::getLongDoubleVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
if (row.equals<len>(fNullVal, fInputIndex))
|
||||
isNull = true;
|
||||
|
||||
return (long double)row.getIntField<len>(fInputIndex);
|
||||
}
|
||||
|
||||
template<int len>
|
||||
inline IDB_Decimal SimpleColumn_INT<len>::getDecimalVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
virtual inline uint64_t getUintVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline float getFloatVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline double getDoubleVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline long double getLongDoubleVal(rowgroup::Row& row, bool& isNull);
|
||||
virtual inline IDB_Decimal getDecimalVal(rowgroup::Row& row, bool& isNull);
|
||||
|
||||
/** The serialize interface */
|
||||
@ -198,6 +199,15 @@ inline double SimpleColumn_UINT<len>::getDoubleVal(rowgroup::Row& row, bool& isN
|
||||
return (double)row.getUintField<len>(fInputIndex);
|
||||
}
|
||||
|
||||
template<int len>
|
||||
inline long double SimpleColumn_UINT<len>::getLongDoubleVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
if (row.equals<len>(fNullVal, fInputIndex))
|
||||
isNull = true;
|
||||
|
||||
return (long double)row.getUintField<len>(fInputIndex);
|
||||
}
|
||||
|
||||
template<int len>
|
||||
inline IDB_Decimal SimpleColumn_UINT<len>::getDecimalVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
|
@ -212,6 +212,7 @@ public:
|
||||
inline virtual bool getBoolVal(rowgroup::Row& row, bool& isNull);
|
||||
inline virtual int64_t getIntVal(rowgroup::Row& row, bool& isNull);
|
||||
inline virtual double getDoubleVal(rowgroup::Row& row, bool& isNull);
|
||||
inline virtual long double getLongDoubleVal(rowgroup::Row& row, bool& isNull);
|
||||
|
||||
// get all simple columns involved in this column
|
||||
const std::vector<SimpleColumn*>& simpleColumnList();
|
||||
@ -253,6 +254,11 @@ inline double SimpleFilter::getDoubleVal(rowgroup::Row& row, bool& isNull)
|
||||
return getIntVal(row, isNull);
|
||||
}
|
||||
|
||||
inline long double SimpleFilter::getLongDoubleVal(rowgroup::Row& row, bool& isNull)
|
||||
{
|
||||
return getIntVal(row, isNull);
|
||||
}
|
||||
|
||||
typedef boost::shared_ptr<SimpleFilter> SSFP;
|
||||
|
||||
std::ostream& operator<<(std::ostream& output, const SimpleFilter& rhs);
|
||||
|
Reference in New Issue
Block a user