| 236 | } |
| 237 | |
| 238 | void AddCountDistinctKernels(ScalarAggregateFunction* func) { |
| 239 | // Boolean |
| 240 | AddCountDistinctKernel<BooleanType>(boolean(), func); |
| 241 | // Number |
| 242 | AddCountDistinctKernel<Int8Type>(int8(), func); |
| 243 | AddCountDistinctKernel<Int16Type>(int16(), func); |
| 244 | AddCountDistinctKernel<Int32Type>(int32(), func); |
| 245 | AddCountDistinctKernel<Int64Type>(int64(), func); |
| 246 | AddCountDistinctKernel<UInt8Type>(uint8(), func); |
| 247 | AddCountDistinctKernel<UInt16Type>(uint16(), func); |
| 248 | AddCountDistinctKernel<UInt32Type>(uint32(), func); |
| 249 | AddCountDistinctKernel<UInt64Type>(uint64(), func); |
| 250 | AddCountDistinctKernel<HalfFloatType>(float16(), func); |
| 251 | AddCountDistinctKernel<FloatType>(float32(), func); |
| 252 | AddCountDistinctKernel<DoubleType>(float64(), func); |
| 253 | // Date |
| 254 | AddCountDistinctKernel<Date32Type>(date32(), func); |
| 255 | AddCountDistinctKernel<Date64Type>(date64(), func); |
| 256 | // Time |
| 257 | AddCountDistinctKernel<Time32Type>(match::SameTypeId(Type::TIME32), func); |
| 258 | AddCountDistinctKernel<Time64Type>(match::SameTypeId(Type::TIME64), func); |
| 259 | // Timestamp & Duration |
| 260 | AddCountDistinctKernel<TimestampType>(match::SameTypeId(Type::TIMESTAMP), func); |
| 261 | AddCountDistinctKernel<DurationType>(match::SameTypeId(Type::DURATION), func); |
| 262 | // Interval |
| 263 | AddCountDistinctKernel<MonthIntervalType>(month_interval(), func); |
| 264 | AddCountDistinctKernel<DayTimeIntervalType>(day_time_interval(), func); |
| 265 | AddCountDistinctKernel<MonthDayNanoIntervalType>(month_day_nano_interval(), func); |
| 266 | // Binary & String |
| 267 | AddCountDistinctKernel<BinaryType, std::string_view>(match::BinaryLike(), func); |
| 268 | AddCountDistinctKernel<LargeBinaryType, std::string_view>(match::LargeBinaryLike(), |
| 269 | func); |
| 270 | // Fixed binary & Decimal |
| 271 | AddCountDistinctKernel<FixedSizeBinaryType, std::string_view>( |
| 272 | match::FixedSizeBinaryLike(), func); |
| 273 | } |
| 274 | |
| 275 | // ---------------------------------------------------------------------- |
| 276 | // Sum implementation |
no test coverage detected