MCPcopy Create free account
hub / github.com/apache/arrow / GetHashInit

Function GetHashInit

cpp/src/arrow/compute/kernels/vector_hash.cc:540–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538
539template <typename Action>
540KernelInit GetHashInit(Type::type type_id) {
541 // ARROW-8933: Generate only a single hash kernel per physical data
542 // representation
543 switch (type_id) {
544 case Type::NA:
545 return HashInit<NullHashKernel<Action>>;
546 case Type::BOOL:
547 return HashInit<RegularHashKernel<BooleanType, Action>>;
548 case Type::INT8:
549 case Type::UINT8:
550 return HashInit<RegularHashKernel<UInt8Type, Action>>;
551 case Type::INT16:
552 case Type::UINT16:
553 case Type::HALF_FLOAT:
554 return HashInit<RegularHashKernel<UInt16Type, Action>>;
555 case Type::INT32:
556 case Type::UINT32:
557 case Type::FLOAT:
558 case Type::DATE32:
559 case Type::TIME32:
560 case Type::INTERVAL_MONTHS:
561 return HashInit<RegularHashKernel<UInt32Type, Action>>;
562 case Type::INT64:
563 case Type::UINT64:
564 case Type::DOUBLE:
565 case Type::DATE64:
566 case Type::TIME64:
567 case Type::TIMESTAMP:
568 case Type::DURATION:
569 case Type::INTERVAL_DAY_TIME:
570 return HashInit<RegularHashKernel<UInt64Type, Action>>;
571 case Type::BINARY:
572 case Type::STRING:
573 return HashInit<RegularHashKernel<BinaryType, Action, std::string_view>>;
574 case Type::LARGE_BINARY:
575 case Type::LARGE_STRING:
576 return HashInit<RegularHashKernel<LargeBinaryType, Action, std::string_view>>;
577 case Type::BINARY_VIEW:
578 case Type::STRING_VIEW:
579 return HashInit<RegularHashKernel<BinaryViewType, Action, std::string_view>>;
580 case Type::FIXED_SIZE_BINARY:
581 case Type::DECIMAL128:
582 case Type::DECIMAL256:
583 return HashInit<RegularHashKernel<FixedSizeBinaryType, Action, std::string_view>>;
584 case Type::INTERVAL_MONTH_DAY_NANO:
585 return HashInit<RegularHashKernel<MonthDayNanoIntervalType, Action>>;
586 default:
587 Unreachable("non hashable type");
588 }
589}
590
591using DictionaryEncodeState = OptionsWrapper<DictionaryEncodeOptions>;
592

Callers

nothing calls this directly

Calls 1

UnreachableFunction · 0.85

Tested by

no test coverage detected