fix build with embedded compiler

This commit is contained in:
chertus 2018-09-05 19:24:46 +03:00
parent 6096c6998d
commit a0309b57ab
3 changed files with 3 additions and 3 deletions

View File

@ -442,7 +442,7 @@ inline bool isNotDecimalButComparableToDecimal(const IDataType * data_type)
return data_type->isInteger();
}
inline bool isCompilable(const IDataType * data_type)
inline bool isCompilableType(const IDataType * data_type)
{
return data_type->isValueRepresentedByNumber() && !isDecimal(data_type);
}

View File

@ -1237,7 +1237,7 @@ public:
auto isFloatingPoint = &typeIsEither<DataTypeFloat32, DataTypeFloat64>;
if ((isBigInteger(*types[0]) && isFloatingPoint(*types[1])) || (isBigInteger(*types[1]) && isFloatingPoint(*types[0])))
return false; /// TODO: implement (double, int_N where N > double's mantissa width)
return isCompilable(types[0]) && isCompilable(types[1]);
return isCompilableType(types[0].get()) && isCompilableType(types[1].get());
}
llvm::Value * compileImpl(llvm::IRBuilderBase & builder, const DataTypes & types, ValuePlaceholders values) const override

View File

@ -122,7 +122,7 @@ public:
bool isCompilableImpl(const DataTypes & types) const override
{
for (const auto & type : types)
if (!isCompilable(removeNullable(type)))
if (!isCompilableType(removeNullable(type).get()))
return false;
return true;
}