From e7d8037b19a28bf834befb923b607802017a70ec Mon Sep 17 00:00:00 2001 From: Vikrant Puppala Date: Thu, 23 Apr 2026 09:12:32 +0000 Subject: [PATCH] [PECOBLR-2461] Fix test_show_columns_blocked: SHOW COLUMNS now allowed in MST The server's MSTCheckRule allowlist has been broadened to include SHOW COLUMNS (ShowDeltaTableColumnsCommand). Flip the test to assert SHOW COLUMNS succeeds inside an MST transaction, matching the pattern already used by test_describe_table_not_blocked. Other SHOW variants (SHOW SCHEMAS/TABLES/CATALOGS/FUNCTIONS), DESCRIBE QUERY, DESCRIBE TABLE EXTENDED, and information_schema remain blocked as expected. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala --- tests/e2e/test_transactions.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/e2e/test_transactions.py b/tests/e2e/test_transactions.py index 9bf74baad..4fb7918b9 100644 --- a/tests/e2e/test_transactions.py +++ b/tests/e2e/test_transactions.py @@ -624,17 +624,21 @@ def test_cursor_tables_non_transactional_after_concurrent_create( class TestMstBlockedSql: """SQL introspection statements inside active transactions. - The server restricts MST to a specific allowlist of commands. The error - message from TRANSACTION_NOT_SUPPORTED.COMMAND is explicit: + The server restricts MST to an allowlist enforced by MSTCheckRule. The + TRANSACTION_NOT_SUPPORTED.COMMAND error originally advertised only: "Only SELECT / INSERT / MERGE / UPDATE / DELETE / DESCRIBE TABLE are supported." + The server has since broadened the allowlist to include SHOW COLUMNS + (ShowDeltaTableColumnsCommand), observed on current DBSQL warehouses. + Blocked (throw + abort txn): - - SHOW COLUMNS, SHOW TABLES, SHOW SCHEMAS, SHOW CATALOGS, SHOW FUNCTIONS + - SHOW TABLES, SHOW SCHEMAS, SHOW CATALOGS, SHOW FUNCTIONS - DESCRIBE QUERY, DESCRIBE TABLE EXTENDED - SELECT FROM information_schema Allowed: - - DESCRIBE TABLE (basic form — explicitly listed in server's allowlist) + - DESCRIBE TABLE (basic form) + - SHOW COLUMNS """ def _assert_blocked_and_txn_aborted(self, mst_conn_params, fq_table, blocked_sql): @@ -704,10 +708,10 @@ def test_information_schema_blocked(self, mst_conn_params, mst_table, mst_catalo f"SELECT * FROM {mst_catalog}.information_schema.columns LIMIT 1", ) - def test_show_columns_blocked(self, mst_conn_params, mst_table): - """SHOW COLUMNS is blocked in MST (ShowDeltaTableColumnsCommand).""" + def test_show_columns_not_blocked(self, mst_conn_params, mst_table): + """SHOW COLUMNS succeeds in MST — allowed by the server's MSTCheckRule allowlist.""" fq_table, _ = mst_table - self._assert_blocked_and_txn_aborted( + self._assert_not_blocked( mst_conn_params, fq_table, f"SHOW COLUMNS IN {fq_table}" )