[MCOL-1973] A `time` datatype is interpreted in Python as datetime.timedelta Created: 2018-11-28 Updated: 2018-11-28 Resolved: 2018-11-28 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MariaDB Server |
| Affects Version/s: | None |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Critical |
| Reporter: | Martin Adamec | Assignee: | Andrew Hutchings (Inactive) |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Server version: 10.3.10-MariaDB-log Columnstore 1.2.1-1 Python 3.6.6 (default, Aug 13 2018, 18:24:23) PyMySQL 0.9.2 (imported into python script as: `import pymysql`) |
||
| Description |
|
Following is ColumnStore table structure containing time field of type datatype:
---------
--------- When running following query from Python the resultset returned is rendeting time field for each record returned as datetime.timedelta. query = "SELECT sio.`id` AS option_id, o.`date` AS market_date, o.`time`, o.`size`, o.`price`, o.`spot`, "\ I am not sure where is the problem but I would say that Python driver does not recognize time datatype and wrongly interprets it. |
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2018-11-28 ] |
|
This appears to be an issue inside PyMySQL and is likely by design. The TIME datatype range is '-838:59:59' to '838:59:59' whereas Python's datetime.time can only hold '00:00:00' to '23:59:59'. Either way this unfortunately is not a bug in MariaDB or ColumnStore. |