ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dren Butković <dren.butko...@gmail.com>
Subject Python thin client - messed up values
Date Thu, 19 Mar 2020 08:51:39 GMT
Hi,
When the number of columns in table is bigger than 10, only first row have
colums values in correct order.
Second row and all other rows have messed up values.
Select via sqlline or jdbc is ok, I noticed this only when working with
python.
Same result is with pyignite and pygridgain module.

CREATE TABLE TEST1
(
id integer,
col1 varchar(10),
col2 varchar(10),
col3 varchar(10),
col4 varchar(10),
col5 varchar(10),
col6 varchar(10),
col7 varchar(10),
col8 varchar(10),
col9 varchar(10),
col10 varchar(10),
col11 varchar(10),
col12 varchar(10),
PRIMARY KEY (id)
) WITH "CACHE_NAME=TEST1, DATA_REGION=PersistDataRegion,
TEMPLATE=REPLICATED";


INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(1,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(2,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(3,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(4,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(5,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(6,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(7,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(8,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(9,  'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(10, 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(11, 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(12, 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(13, 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(14, 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');
INSERT INTO PUBLIC.TEST1 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8, COL9, COL10, COL11, COL12) VALUES(15, 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l');


CREATE TABLE TEST2
(
id integer,
col1 varchar(10),
col2 varchar(10),
col3 varchar(10),
col4 varchar(10),
col5 varchar(10),
col6 varchar(10),
col7 varchar(10),
col8 varchar(10),
PRIMARY KEY (id)
) WITH "CACHE_NAME=TEST2, DATA_REGION=PersistDataRegion,
TEMPLATE=REPLICATED";


INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(1,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(2,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(3,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(4,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(5,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(6,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(7,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(8,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(9,  'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(10, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(11, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(12, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(13, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(14, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');
INSERT INTO PUBLIC.TEST2 (ID, COL1, COL2, COL3, COL4, COL5, COL6, COL7,
COL8) VALUES(15, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h');






from pyignite import Client

nodes = [('192.168.50.106', 10800)]

client = Client(username='ignite', password='ignite', use_ssl=False)
client.connect(nodes)

print('Connected to {}'.format(client))

# FETCH ALL FROM TEST1
results = client.sql("select * from TEST1", include_field_names=True)

for result in results:
        print (result)

# FETCH ALL FROM TEST2
results = client.sql("select * from TEST2", include_field_names=True)

for result in results:
        print (result)


client.close()




[root@incumbosstest06 test]# python3.6 test.py
Connected to 192.168.50.106:10800
['ID', 'COL1', 'COL2', 'COL3', 'COL4', 'COL5', 'COL6', 'COL7', 'COL8',
'COL9', 'COL10', 'COL11', 'COL12']
[1, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l']
[2, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[3, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[4, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[5, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[6, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[7, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[8, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[9, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[10, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[11, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[12, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[13, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[14, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
[15, 'a', 'j', 'k', 'l', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']

['ID', 'COL1', 'COL2', 'COL3', 'COL4', 'COL5', 'COL6', 'COL7', 'COL8']
[1, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[2, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[3, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[4, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[5, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[6, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[7, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[8, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[9, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[10, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[11, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[12, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[13, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[14, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
[15, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']


Best regards

Dren

Mime
View raw message