diff --git a/csharp/src/Client/AdbcCommand.cs b/csharp/src/Client/AdbcCommand.cs index 4e7d908d35..55dd7fbf36 100644 --- a/csharp/src/Client/AdbcCommand.cs +++ b/csharp/src/Client/AdbcCommand.cs @@ -31,7 +31,7 @@ public sealed class AdbcCommand : DbCommand { private AdbcStatement _adbcStatement; private int _timeout = 30; - public QueryConfiguration _queryConfiguration = new QueryConfiguration(); + public QueryConfiguration _queryConfiguration; /// /// Overloaded. Initializes . diff --git a/csharp/test/Apache.Arrow.Adbc.Tests/ClientTests.cs b/csharp/test/Apache.Arrow.Adbc.Tests/ClientTests.cs index 6783d77ae8..db4b581f83 100644 --- a/csharp/test/Apache.Arrow.Adbc.Tests/ClientTests.cs +++ b/csharp/test/Apache.Arrow.Adbc.Tests/ClientTests.cs @@ -109,6 +109,8 @@ public static void CanClientExecuteQuery(Adbc.Client.AdbcConnection adbcConnecti if(additionalKeywords != null) { + adbcCommand.QueryConfiguration = new QueryConfiguration(); + foreach(KeywordDefinition definition in additionalKeywords) { adbcCommand.QueryConfiguration.Keywords.Add(definition.Keyword, definition.ReturnType); @@ -180,6 +182,7 @@ public static void CanClientExecuteMultipleQueries(Adbc.Client.AdbcConnection ad adbcConnection.Open(); using AdbcCommand adbcCommand = new AdbcCommand(testConfiguration.Query, adbcConnection); + adbcCommand.QueryConfiguration = new QueryConfiguration(); using AdbcDataReader reader = adbcCommand.ExecuteReader(); try