| 651 | } |
| 652 | |
| 653 | std::unique_ptr<common::Filter> VectorHasher::getFilter( |
| 654 | bool nullAllowed) const { |
| 655 | switch (typeKind_) { |
| 656 | case TypeKind::TINYINT: |
| 657 | [[fallthrough]]; |
| 658 | case TypeKind::SMALLINT: |
| 659 | [[fallthrough]]; |
| 660 | case TypeKind::INTEGER: |
| 661 | [[fallthrough]]; |
| 662 | case TypeKind::BIGINT: |
| 663 | if (!distinctOverflow_) { |
| 664 | std::vector<int64_t> values; |
| 665 | values.reserve(uniqueValues_.size()); |
| 666 | for (const auto& value : uniqueValues_) { |
| 667 | values.emplace_back(value.data()); |
| 668 | } |
| 669 | |
| 670 | return common::createBigintValues(values, nullAllowed); |
| 671 | } |
| 672 | [[fallthrough]]; |
| 673 | default: |
| 674 | // TODO Add support for strings. |
| 675 | return nullptr; |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | namespace { |
| 680 | template <typename T> |