Stéphane,

Can you sharer a code line, how do you try to store timestamp value?

Best Regards,
Igor


On Tue, May 14, 2019 at 7:23 PM Denis Mekhanikov <dmekhani...@gmail.com>
wrote:

> Stéphane,
>
> Could you provide the code, that results in this exception?
> Do you try to insert the tuple as a single field via SQL? There is no such
> primitive as a tuple in SQL, so you should probably split timestamp into
> datetime and nanoseconds columns and store them separately as two different
> columns.
>
> Denis
>
> сб, 4 мая 2019 г. в 10:39, Stéphane Thibaud <snthib...@gmail.com>:
>
>> Hello Apache users,
>>
>> I am running into the following issue: when I try to store a timestamp
>> with nanosecond precision with the Python Thin client, I get the stack
>> trace below. I have specified the timestamp as a tuple of (datetime,
>> nanoseconds) as that is the format in which I also get timestamps back from
>> the apache ignite client. Strangely, I can set just a datetime, but then
>> the nanoseconds become zero. Am I doing it in the wrong way? Any
>> suggestions?
>>
>>
>>
>>     db.sql(query, query_args=[converted_row[c] for c in
>> table.column_names])
>>   File
>> "/home/snthibaud/PycharmProjects/tabee/venv/lib/python3.7/site-packages/pyignite/client.py",
>> line 401, in sql
>>     max_rows, timeout,
>>   File
>> "/home/snthibaud/PycharmProjects/tabee/venv/lib/python3.7/site-packages/pyignite/api/sql.py",
>> line 370, in sql_fields
>>     'include_field_names': include_field_names,
>>   File
>> "/home/snthibaud/PycharmProjects/tabee/venv/lib/python3.7/site-packages/pyignite/queries/__init__.py",
>> line 260, in from_python
>>     buffer += c_type.from_python(values[name])
>>   File
>> "/home/snthibaud/PycharmProjects/tabee/venv/lib/python3.7/site-packages/pyignite/datatypes/internal.py",
>> line 471, in from_python
>>     buffer += infer_from_python(x)
>>   File
>> "/home/snthibaud/PycharmProjects/tabee/venv/lib/python3.7/site-packages/pyignite/datatypes/internal.py",
>> line 399, in infer_from_python
>>     if is_hinted(value):
>>   File
>> "/home/snthibaud/PycharmProjects/tabee/venv/lib/python3.7/site-packages/pyignite/utils.py",
>> line 51, in is_hinted
>>     and issubclass(value[1], IgniteDataType)
>>   File "/usr/lib/python3.7/abc.py", line 143, in __subclasscheck__
>>     return _abc_subclasscheck(cls, subclass)
>> TypeError: issubclass() arg 1 must be a class
>>
>> Kind regards,
>>
>> Stéphane Thibaud
>>
>>
>>

Reply via email to