@@ -778,3 +778,26 @@ async def test_9427(value, async_conn, test_env):
778778 await async_conn .fetch_df_all (
779779 "select :1 from dual" , [value ], requested_schema = requested_schema
780780 )
781+
782+
783+ @pytest .mark .parametrize ("num_elements" , [1 , 3 ])
784+ async def test_9428 (num_elements , async_conn , test_env ):
785+ "9428 - fetch_df_all() with wrong requested_schema size"
786+ elements = [(f"COL_{ i } " , pyarrow .string ()) for i in range (num_elements )]
787+ requested_schema = pyarrow .schema (elements )
788+ with test_env .assert_raises_full_code ("DPY-2069" ):
789+ await async_conn .fetch_df_all (
790+ "select user, user from dual" , requested_schema = requested_schema
791+ )
792+
793+
794+ @pytest .mark .parametrize ("num_elements" , [1 , 3 ])
795+ async def test_9429 (num_elements , async_conn , test_env ):
796+ "9429 - fetch_df_batches() with wrong requested_schema size"
797+ elements = [(f"COL_{ i } " , pyarrow .string ()) for i in range (num_elements )]
798+ requested_schema = pyarrow .schema (elements )
799+ with test_env .assert_raises_full_code ("DPY-2069" ):
800+ async for df in async_conn .fetch_df_batches (
801+ "select user, user from dual" , requested_schema = requested_schema
802+ ):
803+ pass
0 commit comments