This is an automated email from the ASF dual-hosted git repository.

curth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new 5a3bfcd65 feat(csharp/src/Drivers/Databricks): Fix 
StatementTimeoutTest (#3133)
5a3bfcd65 is described below

commit 5a3bfcd652a0cfd0e1b40ba746fd80c890b9906a
Author: Todd Meng <[email protected]>
AuthorDate: Fri Jul 11 06:24:57 2025 -0700

    feat(csharp/src/Drivers/Databricks): Fix StatementTimeoutTest (#3133)
    
    Databricks runtime does not accept null sql queries, causing
    ExecuteStatement to fail. This PR fixes the test data so that it passes.
---
 csharp/test/Drivers/Apache/Common/StatementTests.cs  | 12 ++++++------
 csharp/test/Drivers/Databricks/E2E/StatementTests.cs |  3 ++-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/csharp/test/Drivers/Apache/Common/StatementTests.cs 
b/csharp/test/Drivers/Apache/Common/StatementTests.cs
index f262f6ef7..24fb017f5 100644
--- a/csharp/test/Drivers/Apache/Common/StatementTests.cs
+++ b/csharp/test/Drivers/Apache/Common/StatementTests.cs
@@ -561,13 +561,13 @@ namespace Apache.Arrow.Adbc.Tests.Drivers.Apache.Common
     /// </summary>
     internal class ShortRunningStatementTimeoutTestData : 
TheoryData<StatementWithExceptions>
     {
-        public ShortRunningStatementTimeoutTestData()
+        public ShortRunningStatementTimeoutTestData(string? defaultQuery = 
null)
         {
-            Add(new(0, null, null));
-            Add(new(null, null, null));
-            Add(new(1, null, typeof(TimeoutException)));
-            Add(new(5, null, null));
-            Add(new(30, null, null));
+            Add(new(0, defaultQuery, null));
+            Add(new(null, defaultQuery, null));
+            Add(new(1, defaultQuery, typeof(TimeoutException)));
+            Add(new(5, defaultQuery, null));
+            Add(new(30, defaultQuery, null));
         }
     }
 }
diff --git a/csharp/test/Drivers/Databricks/E2E/StatementTests.cs 
b/csharp/test/Drivers/Databricks/E2E/StatementTests.cs
index e27e145f6..3b67050d6 100644
--- a/csharp/test/Drivers/Databricks/E2E/StatementTests.cs
+++ b/csharp/test/Drivers/Databricks/E2E/StatementTests.cs
@@ -92,10 +92,11 @@ namespace Apache.Arrow.Adbc.Tests.Drivers.Databricks
 
         internal class LongRunningStatementTimeoutTestData : 
ShortRunningStatementTimeoutTestData
         {
-            public LongRunningStatementTimeoutTestData()
+            public LongRunningStatementTimeoutTestData() : base("SELECT 1")
             {
                 string longRunningQuery = "SELECT COUNT(*) AS 
total_count\nFROM (\n  SELECT t1.id AS id1, t2.id AS id2\n  FROM RANGE(1000000) 
t1\n  CROSS JOIN RANGE(100000) t2\n) subquery\nWHERE MOD(id1 + id2, 2) = 0";
 
+                // Add Databricks-specific long-running query tests
                 Add(new(5, longRunningQuery, typeof(TimeoutException)));
                 Add(new(null, longRunningQuery, typeof(TimeoutException)));
                 Add(new(0, longRunningQuery, null));

Reply via email to