@@ -308,12 +308,26 @@ def test_write_dataframe_push_fast(qdbpd_write_fn, qdbd_connection, df_with_tabl
308308def test_write_dataframe_push_truncate (qdbpd_write_fn , qdbd_connection , df_with_table ):
309309 (_ , _ , df1 , table ) = df_with_table
310310
311+ # For Arrow Push we need to have the truncate range
312+ step = df1 .index [1 ] - df1 .index [0 ]
313+ start = np .datetime64 (df1 .index [0 ].to_datetime64 (), "ns" )
314+ end = np .datetime64 ((df1 .index [- 1 ] + step ).to_datetime64 (), "ns" )
315+ ranges = (start , end )
316+
311317 # Ensures that we can do a full-circle write and read of a dataframe
312318 qdbpd_write_fn (
313- df1 , qdbd_connection , table , push_mode = quasardb .WriterPushMode .Truncate
319+ df1 ,
320+ qdbd_connection ,
321+ table ,
322+ push_mode = quasardb .WriterPushMode .Truncate ,
323+ range = ranges ,
314324 )
315325 qdbpd_write_fn (
316- df1 , qdbd_connection , table , push_mode = quasardb .WriterPushMode .Truncate
326+ df1 ,
327+ qdbd_connection ,
328+ table ,
329+ push_mode = quasardb .WriterPushMode .Truncate ,
330+ range = ranges ,
317331 )
318332
319333 df2 = qdbpd .read_dataframe (qdbd_connection , table )
@@ -577,7 +591,11 @@ def test_push_mode(qdbpd_write_fn, df_with_table, push_mode, qdbd_connection, ca
577591 kwargs ["_async" ] = True
578592
579593 caplog .clear ()
580- caplog .set_level (logging .DEBUG , logger = "quasardb.writer" )
594+ logger_name = "quasardb.writer"
595+ if qdbpd_write_fn is conftest ._write_dataframe_arrow :
596+ logger_name = "quasardb.batch_push_arrow"
597+
598+ caplog .set_level (logging .DEBUG , logger = logger_name )
581599 qdbpd_write_fn (df , qdbd_connection , table , ** kwargs )
582600
583601 assert any (expected in x .message for x in caplog .records )
0 commit comments