diff --git a/e2e_test/subscription/main.py b/e2e_test/subscription/main.py index 5ed2b30eaedf7..fa89c9697d40c 100644 --- a/e2e_test/subscription/main.py +++ b/e2e_test/subscription/main.py @@ -328,6 +328,7 @@ def test_rebuild_table(): check_rows_data([1,1],row[0],1) check_rows_data([1,1],row[1],4) check_rows_data([1,100],row[2],3) + drop_table_subscription() if __name__ == "__main__": test_cursor_snapshot() diff --git a/src/frontend/src/handler/util.rs b/src/frontend/src/handler/util.rs index fd6631382685c..0531ce5a65284 100644 --- a/src/frontend/src/handler/util.rs +++ b/src/frontend/src/handler/util.rs @@ -83,10 +83,6 @@ where session_data, } } - - pub fn set_formats(&mut self, formats: Vec) { - self.formats = formats; - } } impl Stream for DataChunkToRowSetAdapter diff --git a/src/frontend/src/session/cursor_manager.rs b/src/frontend/src/session/cursor_manager.rs index f017e9f225659..390428f09bea3 100644 --- a/src/frontend/src/session/cursor_manager.rs +++ b/src/frontend/src/session/cursor_manager.rs @@ -638,11 +638,14 @@ impl SubscriptionCursor { session: Arc, ) { let mut formats = formats.clone(); + let mut fields = fields.clone(); formats.pop(); + fields.pop(); if *from_snapshot { formats.pop(); + fields.pop(); } - chunk_stream.init_row_stream(fields, &formats, session); + chunk_stream.init_row_stream(&fields, &formats, session); } }