File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,6 @@ cdef class IndexEngine:
266266 if not self .is_mapping_populated:
267267
268268 values = self ._get_index_values()
269- if values.dtype in {' int8' , ' int16' , ' int32' }:
270- values = algos.ensure_int64(values)
271269 self .mapping = self ._make_hash_table(len (values))
272270 self ._call_map_locations(values)
273271
Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ cdef class {{name}}Engine(IndexEngine):
4646 return _hash.{{name}}HashTable(n)
4747 {{endif}}
4848
49+ {{if name in {'Int8', 'Int16', 'Int32'} }}
50+ cpdef _call_map_locations(self, values):
51+ # we don't have Int8/16/32HashTable, so use Int64HashTable
52+ # and need to pass int64 values to it
53+ self.mapping.map_locations(algos.ensure_int64(values))
54+ {{endif}}
55+
4956 {{if name != 'Float64' and name != 'Object'}}
5057 cdef _check_type(self, object val):
5158 hash(val)
You can’t perform that action at this time.
0 commit comments