You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Isaac Zhu (Jira)" <ji...@apache.org> on 2020/05/01 14:04:00 UTC
[jira] [Created] (IGNITE-12974) pyignite client sql query result
has wrong columns order in continuous pages
Isaac Zhu created IGNITE-12974:
----------------------------------
Summary: pyignite client sql query result has wrong columns order in continuous pages
Key: IGNITE-12974
URL: https://issues.apache.org/jira/browse/IGNITE-12974
Project: Ignite
Issue Type: Bug
Components: python
Affects Versions: 2.7.6
Reporter: Isaac Zhu
Fix For: None
When the table has more than 10 columns and the query has more than 1 row to return, like:
{color:#0747a6}_result = client.sql(query_str="select * from table_foo LIMIT 5", include_field_names=True)_{color}
{color:#0747a6}_for row in result:_{color}
{color:#0747a6} _print(row)_{color}
Only the first row(returned within the first page) will have the correct columns order. The rest rows will have wrong order.
This is because this line:
[https://github.com/apache/ignite/blob/5ad8944992e49788828e915a8d068f3706616f9a/modules/platforms/python/pyignite/api/sql.py#L445]
It does an alphabet sorting to the field names which field10 will be right after field1 instead of field9. I don't think this is needed, the "row_dict" is already an OrderedDictionary type.
I tried remove the "sorted" function call in my local version, and the order becomes correct for all pages.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)