Esempio n. 1
0
 inline TypedValue applyToDataPtrInl(const void *argument) const {
   if (argument_nullable && (argument == nullptr)) {
     return TypedValue(ResultType::kStaticTypeID);
   }
   return TypedValue(-*static_cast<const typename ResultType::cpptype*>(argument));
 }
 inline TypedValue finalizeHashTableEntry(const AggregationState &state) const {
   return TypedValue(static_cast<const AggregationStateCount&>(state).count_.load(std::memory_order_relaxed));
 }
Esempio n. 3
0
 inline TypedValue applyToTypedValueInl(const TypedValue &argument) const {
   if (argument_nullable && argument.isNull()) {
     return argument;
   }
   return TypedValue(-argument.getLiteral<typename ResultType::cpptype>());
 }
 TypedValue finalize(const AggregationState &state) const override {
   return TypedValue(static_cast<const AggregationStateCount&>(state).count_.load(std::memory_order_relaxed));
 }