[ 
https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071696#comment-17071696
 ] 

Petr Vanek commented on IGNITE-12809:
-------------------------------------

I can confirm this issue found independently (after few hard hours of debugging)

page size = 1
{code:java}
['rowid', 'Job_Level', 'Country', 'Hired_This_Period', 'Termination_Category', 
'Next_Supervisory_Organization', 'Years_Since_Last_Promotion', 'Is_URM', 
'Is_New_Hire', 'Active_Status', 'Supervisory_Organization', 'Is_Manager', 
'Length_Of_Service_In_Partial_Years', 'Company', 'Ethnicity', 
'Promoted_This_Period', 'Terminated_This_Period', 'Location', 'Org_Level_3', 
'Direct_Reports', 'Previous_Supervisory_Organization', 'Job_Profile', 
'Org_Level_4', 'Org_Level_2', 'Manager_With_Direct_Reports', 'Total', 
'Employee_ID', 'Termination_Reason', 'Gender', 'Generation', 
'Management_Level', 'Last_Promotion_Date_Not_Null', 'Is_High_Potential', 
'High_Performer', 'Cost_Center', 'Super_Org_Changed_This_Period', 'Region', 
'Default']

[0, '', '29247e57dbaf46fb855b224e03170bc7', 'False', '', 'foo bar', 0.0, 
'False', 'False', 'True', 'e7cec85c883510141fe9675b17071655', 'False', 4.67, 
'1fdc602538c0103b356a57fb88e300cd', '', 'False', 'False', 
'f5799b99ca2246d9bcf405fbc0a96b1d', '', 0.0, 'foo bar', 
'9ffb8c8210d4468ca8dc94190eba3b7d', '', '', 'False', 'Benchmark', '25095', '', 
'd3afbf8074e549ffb070962128e1105a', '5f3a7924cc4110001e208ee6e17b0127', 
'7a379eea3b0c4a10a2b50663b2bd15e4', 'False', 'False', 'False', 
'5acc0ad52f7843b0a4905aa6d30380de', 'False', 
'e8a0e6689604438bbd4e47e46ff15025', (datetime.datetime(2019, 6, 1, 2, 0), 0)]

[1, '', 'e7cec85c883510141fe9675b17071655', 'False', 4.67, 
'1fdc602538c0103b356a57fb88e300cd', '', 'False', 'False', 
'f5799b99ca2246d9bcf405fbc0a96b1d', '', 0.0, 
'29247e57dbaf46fb855b224e03170bc7', 'foo bar', 
'9ffb8c8210d4468ca8dc94190eba3b7d', '', '', 'False', 'Benchmark', '25094', '', 
'9cce3bec2d0d420283f76f51b928d885', '5f3a7924cc4110001e208ee6e17b0127', 
'False', '7a379eea3b0c4a10a2b50663b2bd15e4', 'False', 'False', 'False', 
'5acc0ad52f7843b0a4905aa6d30380de', 'False', 
'e8a0e6689604438bbd4e47e46ff15025', (datetime.datetime(2019, 6, 1, 2, 0), 0), 
'', 'foo bar', 0.0, 'False', 'False', 'True']
{code}
correct structure (page size > 2)
{code:java}
['rowid', 'Job_Level', 'Country', 'Hired_This_Period', 'Termination_Category', 
'Next_Supervisory_Organization', 'Years_Since_Last_Promotion', 'Is_URM', 
'Is_New_Hire', 'Active_Status', 'Supervisory_Organization', 'Is_Manager', 
'Length_Of_Service_In_Partial_Years', 'Company', 'Ethnicity', 
'Promoted_This_Period', 'Terminated_This_Period', 'Location', 'Org_Level_3', 
'Direct_Reports', 'Previous_Supervisory_Organization', 'Job_Profile', 
'Org_Level_4', 'Org_Level_2', 'Manager_With_Direct_Reports', 'Total', 
'Employee_ID', 'Termination_Reason', 'Gender', 'Generation', 
'Management_Level', 'Last_Promotion_Date_Not_Null', 'Is_High_Potential', 
'High_Performer', 'Cost_Center', 'Super_Org_Changed_This_Period', 'Region', 
'Default']

[0, '', '29247e57dbaf46fb855b224e03170bc7', 'False', '', 'foo bar', 0.0, 
'False', 'False', 'True', 'e7cec85c883510141fe9675b17071655', 'False', 4.67, 
'1fdc602538c0103b356a57fb88e300cd', '', 'False', 'False', 
'f5799b99ca2246d9bcf405fbc0a96b1d', '', 0.0, 'foo bar', 
'9ffb8c8210d4468ca8dc94190eba3b7d', '', '', 'False', 'Benchmark', '25095', '', 
'd3afbf8074e549ffb070962128e1105a', '5f3a7924cc4110001e208ee6e17b0127', 
'7a379eea3b0c4a10a2b50663b2bd15e4', 'False', 'False', 'False', 
'5acc0ad52f7843b0a4905aa6d30380de', 'False', 
'e8a0e6689604438bbd4e47e46ff15025', (datetime.datetime(2019, 6, 1, 2, 0), 0)]

[1, '', '29247e57dbaf46fb855b224e03170bc7', 'False', '', 'foo bar', 0.0, 
'False', 'False', 'True', 'e7cec85c883510141fe9675b17071655', 'False', 4.67, 
'1fdc602538c0103b356a57fb88e300cd', '', 'False', 'False', 
'f5799b99ca2246d9bcf405fbc0a96b1d', '', 0.0, 'foo bar', 
'9ffb8c8210d4468ca8dc94190eba3b7d', '', '', 'False', 'Benchmark', '25094', '', 
'9cce3bec2d0d420283f76f51b928d885', '5f3a7924cc4110001e208ee6e17b0127', 
'7a379eea3b0c4a10a2b50663b2bd15e4', 'False', 'False', 'False', 
'5acc0ad52f7843b0a4905aa6d30380de', 'False', 
'e8a0e6689604438bbd4e47e46ff15025', (datetime.datetime(2019, 6, 1, 2, 0), 
0)]{code}

> Python client returns fields in wrong order since the 2 row when 
> fields_count>10
> --------------------------------------------------------------------------------
>
>                 Key: IGNITE-12809
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12809
>             Project: Ignite
>          Issue Type: Bug
>          Components: platforms
>    Affects Versions: 2.8
>            Reporter: Evgenii Zhuravlev
>            Priority: Major
>              Labels: python
>         Attachments: reproducer.py
>
>
> Reproducer attached. 
> If result set is bigger than a page size(1 by default) and there are more 
> than 10 fields in an object, then, for all rows after the first query column 
> order will be wrong. Looks like column order is being sorted as a string 
> instead of number.
> The reason for that is a sorting in api/sql.py: 
> https://github.com/apache/ignite/blob/master/modules/platforms/python/pyignite/api/sql.py#L445
> If you remove it, everything will work fine. We need to make sure that this 
> is the right solution for this issue.
> Output from reproducer:
> {code:java}
> ['CODE', 'NAME', 'CONTINENT', 'REGION', 'SURFACEAREA', 'INDEPYEAR', 
> 'POPULATION', 'LIFEEXPECTANCY', 'GNP', 'GNPOLD', 'LOCALNAME', 
> 'GOVERNMENTFORM', 'HEADOFSTATE', 'CAPITAL', 'CODE2']
> ['CHN', 'China', 'Asia', 'Eastern Asia', Decimal('9.5729E+6'), -1523, 
> 1277558000, Decimal('71.4'), Decimal('982268'), Decimal('917719'), 
> 'Zhongquo', 'PeoplesRepublic', 'Jiang Zemin', 1891, 'CN']
> ['IND', 'India', 'Bharat/India', 'Federal Republic', 'Kocheril Raman 
> Narayanan', 1109, 'IN', 'Asia', 'Southern and Central Asia', 
> Decimal('3287263'), 1947, 1013662000, Decimal('62.5'), Decimal('447114'), 
> Decimal('430572')]
> ['USA', 'United States', 'United States', 'Federal Republic', 'George W. 
> Bush', 3813, 'US', 'North America', 'North America', Decimal('9.36352E+6'), 
> 1776, 278357000, Decimal('77.1'), Decimal('8.5107E+6'), Decimal('8.1109E+6')]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to