Skip to content

Commit 55c15d0

Browse files
committed
fix nomenclature in cython
1 parent a651b35 commit 55c15d0

5 files changed

Lines changed: 11 additions & 10 deletions

File tree

opteryx/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__build__ = 1433
1+
__build__ = 1434
22

33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

opteryx/compiled/list_ops/list_cast_int64_to_string.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cdef inline char* int64_to_str_ptr(int64_t value, char* buf) nogil:
3636
return buf + i
3737

3838

39-
cpdef numpy.ndarray list_cast_int64_to_string(const int64_t[:] arr):
39+
cpdef numpy.ndarray list_cast_int64_to_bytes(const int64_t[:] arr):
4040
cdef Py_ssize_t i, n = arr.shape[0]
4141
cdef char buf[21]
4242
cdef char* ptr

opteryx/compiled/list_ops/list_cast_string_to_int.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ cpdef numpy.ndarray list_cast_bytes_to_int(numpy.ndarray[object, ndim=1] arr):
6161
sign = 1
6262

6363
j = 0
64-
if length > 0 and c_str[0] == 45: # -
64+
if length > 0 and c_str[0] == 45: # -
6565
sign = -1
6666
j = 1
6767

@@ -73,4 +73,4 @@ cpdef numpy.ndarray list_cast_bytes_to_int(numpy.ndarray[object, ndim=1] arr):
7373

7474
result_view[i] = sign * value
7575

76-
return result
76+
return result

opteryx/compiled/list_ops/list_cast_uint64_to_string.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cdef inline char* uint64_to_str_ptr(uint64_t value, char* buf) nogil:
3030

3131
return buf + i
3232

33-
cpdef numpy.ndarray list_cast_uint64_to_string(const uint64_t[:] arr):
33+
cpdef numpy.ndarray list_cast_uint64_to_bytes(const uint64_t[:] arr):
3434
cdef Py_ssize_t i, n = arr.shape[0]
3535
cdef char buf[21]
3636
cdef char* ptr

opteryx/functions/__init__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,11 @@ def cast_to_varchar(arr, *args):
243243
# If the array is a float64, we can use the fast format_double_array_strings
244244
return format_double_array_ascii(arr)
245245
if arr.dtype == numpy.int64:
246-
from opteryx.compiled.list_ops.list_cast_int64_to_bytes import list_cast_int64_to_ascii
246+
from opteryx.compiled.list_ops.list_cast_int64_to_string import list_cast_int64_to_ascii
247247

248248
return list_cast_int64_to_ascii(arr)
249249
if arr.dtype == numpy.uint64:
250-
from opteryx.compiled.list_ops.list_cast_uint64_to_bytes import list_cast_uint64_to_ascii
250+
from opteryx.compiled.list_ops.list_cast_uint64_to_string import list_cast_uint64_to_ascii
251251

252252
return list_cast_uint64_to_ascii(arr)
253253

@@ -269,11 +269,11 @@ def cast_to_blob(arr, *args):
269269

270270
return format_double_array_bytes(arr)
271271
if arr.dtype == numpy.int64:
272-
from opteryx.compiled.list_ops.list_cast_int64_to_bytes import list_cast_int64_to_bytes
272+
from opteryx.compiled.list_ops.list_cast_int64_to_string import list_cast_int64_to_bytes
273273

274274
return list_cast_int64_to_bytes(arr)
275275
if arr.dtype == numpy.uint64:
276-
from opteryx.compiled.list_ops.list_cast_uint64_to_bytes import list_cast_uint64_to_bytes
276+
from opteryx.compiled.list_ops.list_cast_uint64_to_string import list_cast_uint64_to_bytes
277277

278278
return list_cast_uint64_to_bytes(arr)
279279

@@ -313,8 +313,8 @@ def cast_to_double(arr, *args):
313313
caster = OrsoTypes.DOUBLE.parse
314314
return [caster(i) if i is not None else None for i in arr]
315315

316-
def cast_to_int(arr, *args):
317316

317+
def cast_to_int(arr, *args):
318318
from opteryx.compiled.list_ops.list_cast_string_to_int import list_cast_ascii_to_int
319319
from opteryx.compiled.list_ops.list_cast_string_to_int import list_cast_bytes_to_int
320320

@@ -331,6 +331,7 @@ def cast_to_int(arr, *args):
331331
caster = OrsoTypes.INTEGER.parse
332332
return [caster(i) if i is not None else None for i in arr]
333333

334+
334335
def _iterate_single_parameter(func):
335336
def _inner(array):
336337
return pyarrow.array(list(map(func, array)))

0 commit comments

Comments
 (0)