File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,7 @@ mod tests {
304304
305305 #[ test]
306306 fn test_write_detection ( ) {
307+ // Write operations - routed to DuckDB
307308 assert ! ( HybridDuckLakeDB :: is_write_statement(
308309 "CREATE TABLE foo (id INT)"
309310 ) ) ;
@@ -318,11 +319,20 @@ mod tests {
318319 assert ! ( HybridDuckLakeDB :: is_write_statement(
319320 "ALTER TABLE foo ADD COLUMN bar INT"
320321 ) ) ;
322+
323+ // Transaction control - routed to DuckDB
321324 assert ! ( HybridDuckLakeDB :: is_write_statement( "BEGIN" ) ) ;
322325 assert ! ( HybridDuckLakeDB :: is_write_statement( "COMMIT" ) ) ;
326+ assert ! ( HybridDuckLakeDB :: is_write_statement( "ROLLBACK" ) ) ;
327+
328+ // Catalog management - routed to DuckDB
329+ assert ! ( HybridDuckLakeDB :: is_write_statement( "USE ducklake" ) ) ;
330+ assert ! ( HybridDuckLakeDB :: is_write_statement( "SHOW TABLES" ) ) ;
331+ assert ! ( HybridDuckLakeDB :: is_write_statement( "CALL some_procedure()" ) ) ;
323332
333+ // Read operations - routed to DataFusion
324334 assert ! ( !HybridDuckLakeDB :: is_write_statement( "SELECT * FROM foo" ) ) ;
325- assert ! ( !HybridDuckLakeDB :: is_write_statement( "SHOW TABLES " ) ) ;
335+ assert ! ( !HybridDuckLakeDB :: is_write_statement( "WITH cte AS (...) SELECT ... " ) ) ;
326336 }
327337
328338 #[ test]
You can’t perform that action at this time.
0 commit comments