[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17188438#comment-17188438 ] Aleksey Plekhanov commented on IGNITE-12809: [~nizhikov], cherry-picked to 2.9. > 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 >Assignee: Nikolay Izhikov >Priority: Major > Labels: python > Fix For: 2.9 > > Attachments: > IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch, reproducer.py > > Time Spent: 1h 20m > Remaining Estimate: 0h > > 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)
[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17188246#comment-17188246 ] Nikolay Izhikov commented on IGNITE-12809: -- https://ci.ignite.apache.org/viewLog.html?buildId=5576255=queuedBuildOverviewTab - Tests results. > 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 >Assignee: Nikolay Izhikov >Priority: Major > Labels: python > Attachments: > IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch, reproducer.py > > Time Spent: 10m > Remaining Estimate: 0h > > 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)
[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17188207#comment-17188207 ] Nikolay Izhikov commented on IGNITE-12809: -- Hello, [~isapego] I want to work on this ticket. Are you don't mind? > 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 >Assignee: Igor Sapego >Priority: Major > Labels: python > Attachments: > IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch, 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)
[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17102764#comment-17102764 ] Igor Sapego commented on IGNITE-12809: -- [~zstan], [~Melnichuk] looks OK, but we should at least add test, which selects fields in non-alphabetic order. > 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 >Assignee: Igor Sapego >Priority: Major > Labels: python > Attachments: > IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch, 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)
[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17102678#comment-17102678 ] Stanilovsky Evgeny commented on IGNITE-12809: - [~isapego] this code correct as for me, wdyt? > 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 >Assignee: Igor Sapego >Priority: Major > Labels: python > Attachments: > IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch, 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)
[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17097834#comment-17097834 ] Dmitry Melnichuk commented on IGNITE-12809: --- [~ezhuravl], you are totally correct in pinpointing the problematic code. However, you can't just remove the {{sorted()}} function. The {{result}} is of type {{dict}}, not {{OrderedDict}}. These types are essentially the same since Python 3.6, but the code must be compatible with Python 3.4. In 3.4 the {{dict}} object is not retaining the order of its elements, so no sorting will lead to more random ordering problems. Instead, the correct sorting should be applied. Here I attached a diff file, that contains a fix for this problem, alone with a [^IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch] corresponding test case. [~isapego] could you please look it up. > 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 >Assignee: Igor Sapego >Priority: Major > Labels: python > Attachments: > IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch, 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)
[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17077936#comment-17077936 ] Oleg Ostanin commented on IGNITE-12809: --- [~zstan] I'm sorry I can't help with python 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 >Assignee: Igor Sapego >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)
[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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,
[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10
[ https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17070795#comment-17070795 ] Stanilovsky Evgeny commented on IGNITE-12809: - [~oleg-ostanin] hello, may be you can check it ? I spend some time and looks like [~ezhuravl] approach correct. > 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)