You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ilya Kasnacheev (Jira)" <ji...@apache.org> on 2020/05/01 14:50:00 UTC

[jira] [Resolved] (IGNITE-12974) pyignite client sql query result has wrong columns order in continuous pages

     [ https://issues.apache.org/jira/browse/IGNITE-12974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Kasnacheev resolved IGNITE-12974.
--------------------------------------
    Fix Version/s:     (was: None)
       Resolution: Duplicate

> 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
>            Priority: Major
>
> 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/master/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)