Skip to content

Commit 015ee47

Browse files
test(e2e/mst): DESCRIBE QUERY is now allowed in transactions (#836)
test(e2e/mst): DESCRIBE QUERY now allowed in transactions The server's MSTCheckRule allowlist has broadened to include DESCRIBE QUERY (DescribeQueryCommand), mirroring the earlier SHOW COLUMNS change. It no longer throws inside an active transaction, so the prior test_describe_query_blocked assertion (DID NOT RAISE) was stale. Flip it to test_describe_query_not_blocked using _assert_not_blocked (verifies it succeeds and returns >0 rows) and move DESCRIBE QUERY from the Blocked to the Allowed list in the class docstring. Verified against a live DBSQL warehouse: the full TestMstBlockedSql class (9 tests) passes. Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent a2fe99f commit 015ee47

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

tests/e2e/test_transactions.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -565,17 +565,19 @@ class TestMstBlockedSql:
565565
"Only SELECT / INSERT / MERGE / UPDATE / DELETE / DESCRIBE TABLE are supported."
566566
567567
The server has since broadened the allowlist to include SHOW COLUMNS
568-
(ShowDeltaTableColumnsCommand), observed on current DBSQL warehouses.
568+
(ShowDeltaTableColumnsCommand) and DESCRIBE QUERY (DescribeQueryCommand),
569+
observed on current DBSQL warehouses.
569570
570571
Blocked (throw + abort txn):
571572
- SHOW TABLES, SHOW SCHEMAS, SHOW CATALOGS, SHOW FUNCTIONS
572-
- DESCRIBE QUERY, DESCRIBE TABLE EXTENDED
573+
- DESCRIBE TABLE EXTENDED
573574
- SELECT FROM information_schema
574575
- Thrift Get{Catalogs,Schemas,Tables,Columns} RPCs (see TestMstMetadata)
575576
576577
Allowed:
577578
- DESCRIBE TABLE (basic form)
578579
- SHOW COLUMNS
580+
- DESCRIBE QUERY
579581
"""
580582

581583
def _assert_blocked_and_txn_aborted(self, mst_conn_params, fq_table, blocked_sql):
@@ -652,10 +654,14 @@ def test_show_columns_not_blocked(self, mst_conn_params, mst_table):
652654
mst_conn_params, fq_table, f"SHOW COLUMNS IN {fq_table}"
653655
)
654656

655-
def test_describe_query_blocked(self, mst_conn_params, mst_table):
656-
"""DESCRIBE QUERY is blocked in MST (DescribeQueryCommand)."""
657+
def test_describe_query_not_blocked(self, mst_conn_params, mst_table):
658+
"""DESCRIBE QUERY succeeds in MST — now allowed by the server's MSTCheckRule allowlist.
659+
660+
Previously blocked (DescribeQueryCommand), the server has since broadened
661+
the allowlist to include it, mirroring the earlier SHOW COLUMNS change.
662+
"""
657663
fq_table, _ = mst_table
658-
self._assert_blocked_and_txn_aborted(
664+
self._assert_not_blocked(
659665
mst_conn_params,
660666
fq_table,
661667
f"DESCRIBE QUERY SELECT * FROM {fq_table}",

0 commit comments

Comments
 (0)