Closed LLukas22 closed 2 years ago
The type is indeed not supported (by design).
The way to do this is to cast it to the appropriate Python type: In this case int
.
From a ctypes.c_uint64
, call .value
:
>>> import ctypes
>>> c_num = ctypes.c_uint64(42)
>>> type(c_num)
<class 'ctypes.c_ulong'>
>>> num = c_num.value
>>> type(num)
<class 'int'>
From a np.int64
, pass it as arg to the int(..)
builtin:
>>> import numpy as np
>>> np_num = np.int64(42)
>>> type(np_num)
<class 'numpy.int64'>
>>> num = int(np_num)
>>> type(num)
<class 'int'>
QuestDB itself does not support unsigned integers. All integers are signed.
Can't find a way to insert unsigned integers as described here into my database.
When i try to provide the column value as an np.int64 or a ctypes.c_uint64 i get an unsupported type error. e.g.
throws
When i provide the value as a python integer its always commited as a line protocol integer which leads to problems when dealing with huge numbers.
Is there a workaround for this behaviour or is this the intended behaviour?