@@ -306,7 +306,7 @@ def assert_data_persistence(self,
306
306
cursor .execute (f'insert into versioned."{ table } " (id, col_int) values (?, ?)' , [str (uuid4 ()), 1 ])
307
307
308
308
# to trigger `alter` stmt bug(https://github.com/crate/crate/pull/17178) that falsely updated the table's
309
- # version created setting that resulted in oids replacing column names in resultsets
309
+ # version created setting that resulted in oids instead of column names in resultsets
310
310
cursor .execute ('ALTER TABLE doc.parted SET ("refresh_interval" = 900)' )
311
311
312
312
# older versions had a bug that caused this to fail
@@ -315,14 +315,18 @@ def assert_data_persistence(self,
315
315
obj = {key : True }
316
316
args = (str (uuid4 ()), version , obj )
317
317
cursor .execute (
318
- 'INSERT INTO doc.parted (id, version, cols) values (?, ?, ?)' ,
318
+ 'INSERT INTO doc.parted (id, version, cols) VALUES (?, ?, ?)' ,
319
319
args
320
320
)
321
+ cursor .execute ('REFRESH TABLE doc.parted' )
321
322
accumulated_dynamic_column_names .append (key )
322
- cursor .execute ('SELECT cols from doc.parted' )
323
+ cursor .execute ('SELECT cols FROM doc.parted' )
323
324
result = cursor .fetchall ()
324
325
for row in result :
325
- if row [0 ] is not None :
326
+ if row [0 ] is None :
327
+ cursor .execute ('SELECT * FROM doc.parted where col is null' )
328
+ assert False , cursor .fetchall ()
329
+ else :
326
330
for name in row [0 ].keys ():
327
331
self .assertIn (name , accumulated_dynamic_column_names )
328
332
self ._process_on_stop ()
0 commit comments