You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Igor Sapego (Jira)" <ji...@apache.org> on 2021/08/06 10:05:00 UTC
[jira] [Assigned] (IGNITE-15214) [python] When inserting datetime
via query_args, only the date is inserted.
[ https://issues.apache.org/jira/browse/IGNITE-15214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Sapego reassigned IGNITE-15214:
------------------------------------
Assignee: Igor Sapego
> [python] When inserting datetime via query_args, only the date is inserted.
> ---------------------------------------------------------------------------
>
> Key: IGNITE-15214
> URL: https://issues.apache.org/jira/browse/IGNITE-15214
> Project: Ignite
> Issue Type: Bug
> Components: python, thin client
> Affects Versions: python-0.3.4, python-0.4.0, python-0.5.0, python-0.5.1
> Reporter: Fedor Malchikov
> Assignee: Igor Sapego
> Priority: Major
> Labels: python
> Attachments: image-2021-07-30-14-05-48-220.png
>
>
> reproducer:
> {code:python}
> from pyignite import Client
> from datetime import datetime
> c = Client(username='', password='', use_ssl=False)
> c.connect('localhost', 10800)
> current_time = datetime.now()
> c.sql('create table test(key int primary key, date datetime)')
> c.sql(f"insert into test VALUES (1, ?)", query_args=[current_time])
> c.sql(f"insert into test VALUES (2, '{current_time}')")
> for row in c.sql('SELECT key, date FROM test'):
> date = row
> print(date[0], date[1][0])
> c.close()
> {code}
> output:
> {code:python}
> 1 2021-07-30 00:00:00
> 2 2021-07-30 13:51:22.618000
> {code}
> in dbeaver:
> !image-2021-07-30-14-05-48-220.png!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)