You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ivan Daschinsky (Jira)" <ji...@apache.org> on 2021/08/02 09:50:00 UTC

[jira] [Updated] (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 ]

Ivan Daschinsky updated IGNITE-15214:
-------------------------------------
    Priority: Major  (was: Critical)

> [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: thin client
>    Affects Versions: python-0.5.1
>            Reporter: Fedor Malchikov 
>            Priority: Major
>         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)