diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 9d8d9a4039..1dd38f0869 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -27,7 +27,7 @@ adbc.h @lidavidm
## Implementations
/c/ @lidavidm
-/csharp/ @lidavidm
+/csharp/ @lidavidm @CurtHagenlocher
/glib/ @kou
/java/ @lidavidm
/go/ @zeroshade
diff --git a/csharp/.gitignore b/csharp/.gitignore
index e2b09a58d0..fbd47dd0ea 100644
--- a/csharp/.gitignore
+++ b/csharp/.gitignore
@@ -29,3 +29,4 @@ x64
artifacts/
TestResults/
+packages/
diff --git a/csharp/Apache.Arrow.Adbc.sln b/csharp/Apache.Arrow.Adbc.sln
index 5dee7405ae..75719a275b 100644
--- a/csharp/Apache.Arrow.Adbc.sln
+++ b/csharp/Apache.Arrow.Adbc.sln
@@ -1,4 +1,3 @@
-
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33403.182
@@ -25,12 +24,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{B61116
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Arrow.Adbc.Client", "src\Client\Apache.Arrow.Adbc.Client.csproj", "{A405F4A0-5938-4139-B2DF-ED9A05EC3D7C}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake", "test\Drivers\Snowflake\Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj", "{DEE943D1-A2D0-40CD-ABE0-2CB38E7CA156}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Arrow.Adbc.Drivers.BigQuery", "src\Drivers\BigQuery\Apache.Arrow.Adbc.Drivers.BigQuery.csproj", "{A748041C-EF9A-4E88-B6FB-9F2D6CB79170}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Arrow.Adbc.Tests.Drivers.BigQuery", "test\Drivers\BigQuery\Apache.Arrow.Adbc.Tests.Drivers.BigQuery.csproj", "{EA43BB7C-BC00-4701-BDF4-367880C2495C}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Arrow.Adbc.Drivers.Interop.Snowflake", "src\Drivers\Interop\Snowflake\Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj", "{30024B6F-7BC1-4574-BE5A-924FBD6EAF83}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake", "test\Drivers\Interop\Snowflake\Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj", "{8BE1EECC-3ACF-41B2-AF7D-1A67196FF6C7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Apache.Arrow.Flight", "src\arrow\csharp\src\Apache.Arrow.Flight\Apache.Arrow.Flight.csproj", "{0F41F702-A691-4E51-96A9-DF9813E47D8F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -61,10 +64,6 @@ Global
{A405F4A0-5938-4139-B2DF-ED9A05EC3D7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A405F4A0-5938-4139-B2DF-ED9A05EC3D7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A405F4A0-5938-4139-B2DF-ED9A05EC3D7C}.Release|Any CPU.Build.0 = Release|Any CPU
- {DEE943D1-A2D0-40CD-ABE0-2CB38E7CA156}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DEE943D1-A2D0-40CD-ABE0-2CB38E7CA156}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DEE943D1-A2D0-40CD-ABE0-2CB38E7CA156}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DEE943D1-A2D0-40CD-ABE0-2CB38E7CA156}.Release|Any CPU.Build.0 = Release|Any CPU
{A748041C-EF9A-4E88-B6FB-9F2D6CB79170}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A748041C-EF9A-4E88-B6FB-9F2D6CB79170}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A748041C-EF9A-4E88-B6FB-9F2D6CB79170}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -73,6 +72,18 @@ Global
{EA43BB7C-BC00-4701-BDF4-367880C2495C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA43BB7C-BC00-4701-BDF4-367880C2495C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA43BB7C-BC00-4701-BDF4-367880C2495C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {30024B6F-7BC1-4574-BE5A-924FBD6EAF83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {30024B6F-7BC1-4574-BE5A-924FBD6EAF83}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {30024B6F-7BC1-4574-BE5A-924FBD6EAF83}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {30024B6F-7BC1-4574-BE5A-924FBD6EAF83}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8BE1EECC-3ACF-41B2-AF7D-1A67196FF6C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8BE1EECC-3ACF-41B2-AF7D-1A67196FF6C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8BE1EECC-3ACF-41B2-AF7D-1A67196FF6C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8BE1EECC-3ACF-41B2-AF7D-1A67196FF6C7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0F41F702-A691-4E51-96A9-DF9813E47D8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0F41F702-A691-4E51-96A9-DF9813E47D8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0F41F702-A691-4E51-96A9-DF9813E47D8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0F41F702-A691-4E51-96A9-DF9813E47D8F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -84,9 +95,11 @@ Global
{C7290227-E925-47E7-8B6B-A8B171645D58} = {5BD04C26-CE52-4893-8C1A-479705195CEF}
{5C15E79C-19C4-4FF4-BB82-28754FE3966B} = {C7290227-E925-47E7-8B6B-A8B171645D58}
{A405F4A0-5938-4139-B2DF-ED9A05EC3D7C} = {B6111602-2DC4-4B2F-9598-E3EE1972D3E4}
- {DEE943D1-A2D0-40CD-ABE0-2CB38E7CA156} = {C7290227-E925-47E7-8B6B-A8B171645D58}
{A748041C-EF9A-4E88-B6FB-9F2D6CB79170} = {FEB257A0-4FD3-495E-9A47-9E1649755445}
{EA43BB7C-BC00-4701-BDF4-367880C2495C} = {C7290227-E925-47E7-8B6B-A8B171645D58}
+ {30024B6F-7BC1-4574-BE5A-924FBD6EAF83} = {FEB257A0-4FD3-495E-9A47-9E1649755445}
+ {8BE1EECC-3ACF-41B2-AF7D-1A67196FF6C7} = {C7290227-E925-47E7-8B6B-A8B171645D58}
+ {0F41F702-A691-4E51-96A9-DF9813E47D8F} = {9ADA26E0-F328-4466-908A-2FA506DBDF7D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4795CF16-0FDB-4BE0-9768-5CF31564DC03}
diff --git a/csharp/Directory.Build.targets b/csharp/Directory.Build.targets
new file mode 100644
index 0000000000..bc66bcd405
--- /dev/null
+++ b/csharp/Directory.Build.targets
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ $([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))
+
+
+
+
+
+
+
diff --git a/csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj b/csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj
index c49113e729..b64b32d778 100644
--- a/csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj
+++ b/csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj
@@ -3,14 +3,19 @@
netstandard2.0;net6.0
true
+ readme.md
-
-
-
+
+
+ true
+ \
+ PreserveNewest
+
+
diff --git a/csharp/src/Apache.Arrow.Adbc/readme.md b/csharp/src/Apache.Arrow.Adbc/readme.md
new file mode 100644
index 0000000000..afd97fe652
--- /dev/null
+++ b/csharp/src/Apache.Arrow.Adbc/readme.md
@@ -0,0 +1,21 @@
+
+# Apache Arrow ADBC
+
+An implementation of Arrow ADBC targeting .NET Standard 2.0 and .NET 6 or later.
diff --git a/csharp/src/Client/Apache.Arrow.Adbc.Client.csproj b/csharp/src/Client/Apache.Arrow.Adbc.Client.csproj
index 013c4a53d5..f44be6f229 100644
--- a/csharp/src/Client/Apache.Arrow.Adbc.Client.csproj
+++ b/csharp/src/Client/Apache.Arrow.Adbc.Client.csproj
@@ -1,8 +1,16 @@
netstandard2.0;net6.0
+ readme.md
+
+
+ true
+ \
+ PreserveNewest
+
+
diff --git a/csharp/src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj b/csharp/src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj
index 368ff8181e..a7451c7bd1 100644
--- a/csharp/src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj
+++ b/csharp/src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj
@@ -1,6 +1,7 @@
netstandard2.0;net6.0
+ readme.md
@@ -11,4 +12,11 @@
+
+
+ true
+ \
+ PreserveNewest
+
+
diff --git a/csharp/src/Drivers/BigQuery/BigQueryConnection.cs b/csharp/src/Drivers/BigQuery/BigQueryConnection.cs
index dea7c9caaa..8e33596671 100644
--- a/csharp/src/Drivers/BigQuery/BigQueryConnection.cs
+++ b/csharp/src/Drivers/BigQuery/BigQueryConnection.cs
@@ -868,11 +868,16 @@ private ListArray CreateNestedListArray(List arrayList, IArrowType
public override AdbcStatement CreateStatement()
{
- if (this.client == null || this.credential == null)
+ if (this.credential == null)
{
throw new InvalidOperationException();
}
+ if(this.client == null)
+ {
+ Open();
+ }
+
BigQueryStatement statement = new BigQueryStatement(this.client, this.credential);
statement.Options = ParseOptions();
return statement;
diff --git a/csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj b/csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj
index 836932bb6f..b6a7fb4c68 100644
--- a/csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj
+++ b/csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj
@@ -3,10 +3,10 @@
netstandard2.0;net6.0
-
+
diff --git a/csharp/src/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj b/csharp/src/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj
new file mode 100644
index 0000000000..ece287a7c9
--- /dev/null
+++ b/csharp/src/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj
@@ -0,0 +1,39 @@
+
+
+ netstandard2.0;net472;net6.0
+ readme.md
+
+
+
+
+
+
+
+
+
+ true
+ lib\netstandard2.0
+ PreserveNewest
+
+
+ true
+ lib\net472
+ PreserveNewest
+
+
+ true
+ lib\net6.0
+ PreserveNewest
+
+
+
+
+ true
+ \
+ PreserveNewest
+
+
+
+
+
+
diff --git a/csharp/src/Drivers/Interop/Snowflake/Build-SnowflakeDriver.ps1 b/csharp/src/Drivers/Interop/Snowflake/Build-SnowflakeDriver.ps1
new file mode 100644
index 0000000000..cbb69e343a
--- /dev/null
+++ b/csharp/src/Drivers/Interop/Snowflake/Build-SnowflakeDriver.ps1
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Write-Host "Building the Snowflake ADBC Go driver"
+
+$location = Get-Location
+
+$file = "libadbc_driver_snowflake.dll"
+
+cd ..\..\..\..\..\go\adbc\pkg
+
+if(Test-Path $file)
+{
+ #because each framework build will run the script, avoid building it each time
+ $diff=((ls $file).LastWriteTime - (Get-Date)).TotalSeconds
+ if ($diff -gt -30)
+ {
+ Write-Output "Skipping build of $file because it is too recent"
+ exit
+ }
+}
+make $file
+COPY $file $location
diff --git a/csharp/src/Drivers/Interop/Snowflake/SnowflakeDriverLoader.cs b/csharp/src/Drivers/Interop/Snowflake/SnowflakeDriverLoader.cs
new file mode 100644
index 0000000000..c2d247d7d3
--- /dev/null
+++ b/csharp/src/Drivers/Interop/Snowflake/SnowflakeDriverLoader.cs
@@ -0,0 +1,63 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using System.IO;
+using Apache.Arrow.Adbc.C;
+
+namespace Apache.Arrow.Adbc.Drivers.Interop.Snowflake
+{
+ ///
+ /// Lightweight class for loading the Snowflake Go driver to .NET.
+ ///
+ public class SnowflakeDriverLoader
+ {
+ ///
+ /// Loads the Snowflake Go driver from the current directory using the default name and entry point.
+ ///
+ /// An based on the Snowflake Go driver.
+ ///
+ public static AdbcDriver LoadDriver()
+ {
+ string file = "libadbc_driver_snowflake.dll";
+
+ if(File.Exists(file))
+ {
+ // get the full path because some .NET versions need it
+ file = Path.GetFullPath(file);
+ }
+ else
+ {
+ throw new FileNotFoundException($"Cound not find {file}");
+ }
+
+ return LoadDriver(file, "SnowflakeDriverInit");
+ }
+
+ ///
+ /// Loads the Snowflake Go driver from the current directory using the default name and entry point.
+ ///
+ /// The file to load.
+ /// The entry point of the file.
+ /// An based on the Snowflake Go driver.
+ public static AdbcDriver LoadDriver(string file, string entryPoint)
+ {
+ AdbcDriver snowflakeDriver = CAdbcDriverImporter.Load(file, entryPoint);
+
+ return snowflakeDriver;
+ }
+ }
+}
diff --git a/csharp/src/Drivers/Interop/Snowflake/readme.md b/csharp/src/Drivers/Interop/Snowflake/readme.md
new file mode 100644
index 0000000000..53a01bd773
--- /dev/null
+++ b/csharp/src/Drivers/Interop/Snowflake/readme.md
@@ -0,0 +1,30 @@
+
+
+# About
+This project generates a NuGet package containing the Snowflake ADBC Go Driver for use in other .NET projects. It contains a lightweight loader for loading the driver.
+
+For details, see:
+
+[Snowflake Driver](https://arrow.apache.org/adbc/main/driver/snowflake.html) for docs
+
+[GitHub](https://github.com/apache/arrow-adbc/tree/main/go/adbc/driver/snowflake) for source code
+
+## Build the Snowflake Driver
+Run the `Build-SnowflakeDriver.ps1` script to build the Snowflake driver.
diff --git a/csharp/test/Apache.Arrow.Adbc.Tests/DriverTests.cs b/csharp/test/Apache.Arrow.Adbc.Tests/DriverTests.cs
index 70c0acac58..c9a5bea2ca 100644
--- a/csharp/test/Apache.Arrow.Adbc.Tests/DriverTests.cs
+++ b/csharp/test/Apache.Arrow.Adbc.Tests/DriverTests.cs
@@ -45,7 +45,7 @@ public static void CanExecuteQuery(QueryResult queryResult, long expectedNumberO
count += nextBatch.Length;
}
- Assert.True(expectedNumberOfResults == count, "The parsed records differ from the specified amount");
+ Assert.True(expectedNumberOfResults == count, $"The parsed records ({count}) differ from the expected amount ({expectedNumberOfResults})");
// if the values were set, make sure they are correct
if (queryResult.RowCount != -1)
diff --git a/csharp/test/Drivers/BigQuery/ClientTests.cs b/csharp/test/Drivers/BigQuery/ClientTests.cs
index 3e9e761d9c..089951d382 100644
--- a/csharp/test/Drivers/BigQuery/ClientTests.cs
+++ b/csharp/test/Drivers/BigQuery/ClientTests.cs
@@ -17,8 +17,6 @@
using System;
using System.Collections.Generic;
-using System.Data;
-using Apache.Arrow.Adbc.Client;
using Apache.Arrow.Adbc.Drivers.BigQuery;
using Apache.Arrow.Adbc.Tests.Xunit;
using Xunit;
@@ -54,7 +52,7 @@ public void CanClientExecuteUpdate()
string[] queries = BigQueryTestingUtils.GetQueries(testConfiguration);
- List expectedResults = new List() { -1, 1, 1, 1 };
+ List expectedResults = new List() { -1, 1, 1 };
Tests.ClientTests.CanClientExecuteUpdate(adbcConnection, testConfiguration, queries, expectedResults);
}
diff --git a/csharp/test/Drivers/BigQuery/DriverTests.cs b/csharp/test/Drivers/BigQuery/DriverTests.cs
index 9d470475b6..c94c737e23 100644
--- a/csharp/test/Drivers/BigQuery/DriverTests.cs
+++ b/csharp/test/Drivers/BigQuery/DriverTests.cs
@@ -53,7 +53,7 @@ public void CanExecuteUpdate()
string[] queries = BigQueryTestingUtils.GetQueries(testConfiguration);
- List expectedResults = new List() { -1, 1, 1, 1 };
+ List expectedResults = new List() { -1, 1, 1 };
for (int i = 0; i < queries.Length; i++)
{
diff --git a/csharp/test/Drivers/BigQuery/Resources/BigQueryData.sql b/csharp/test/Drivers/BigQuery/Resources/BigQueryData.sql
index 242a2f92f4..96e37dcdff 100644
--- a/csharp/test/Drivers/BigQuery/Resources/BigQueryData.sql
+++ b/csharp/test/Drivers/BigQuery/Resources/BigQueryData.sql
@@ -77,24 +77,3 @@ VALUES (
ARRAY[4, 5, 6],
STRUCT('Jane Doe', 40)
);
-
-INSERT INTO {ADBC_CATALOG}.{ADBC_DATASET}.{ADBC_TABLE} (
- id, number, decimal,
- big_decimal,
- is_active,
- name, data,
- date, time, datetime, timestamp,
- point, numbers,
- person
-)
-VALUES (
- null, null, null,
- null,
- null,
- null,
- null,
- null, null, null, null,
- null,
- null,
- null
-);
diff --git a/csharp/test/Drivers/FlightSql/ClientTests.cs b/csharp/test/Drivers/FlightSql/ClientTests.cs
index 4b413c9be0..b87c8b7cea 100644
--- a/csharp/test/Drivers/FlightSql/ClientTests.cs
+++ b/csharp/test/Drivers/FlightSql/ClientTests.cs
@@ -15,9 +15,7 @@
* limitations under the License.
*/
-using System;
using System.Collections.Generic;
-using Apache.Arrow.Adbc.Client;
using Apache.Arrow.Adbc.Drivers.FlightSql;
using Xunit;
diff --git a/csharp/test/Drivers/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj b/csharp/test/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
similarity index 68%
rename from csharp/test/Drivers/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
rename to csharp/test/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
index 6fa40d80b0..a7dba73d0e 100644
--- a/csharp/test/Drivers/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
+++ b/csharp/test/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
@@ -12,11 +12,10 @@
-
-
-
-
-
+
+
+
+
PreserveNewest
diff --git a/csharp/test/Drivers/Snowflake/ClientTests.cs b/csharp/test/Drivers/Interop/Snowflake/ClientTests.cs
similarity index 100%
rename from csharp/test/Drivers/Snowflake/ClientTests.cs
rename to csharp/test/Drivers/Interop/Snowflake/ClientTests.cs
diff --git a/csharp/test/Drivers/Snowflake/DriverTests.cs b/csharp/test/Drivers/Interop/Snowflake/DriverTests.cs
similarity index 100%
rename from csharp/test/Drivers/Snowflake/DriverTests.cs
rename to csharp/test/Drivers/Interop/Snowflake/DriverTests.cs
diff --git a/csharp/test/Drivers/Snowflake/Resources/SnowflakeData.sql b/csharp/test/Drivers/Interop/Snowflake/Resources/SnowflakeData.sql
similarity index 100%
rename from csharp/test/Drivers/Snowflake/Resources/SnowflakeData.sql
rename to csharp/test/Drivers/Interop/Snowflake/Resources/SnowflakeData.sql
diff --git a/csharp/test/Drivers/Snowflake/Resources/snowflakeconfig.json b/csharp/test/Drivers/Interop/Snowflake/Resources/snowflakeconfig.json
similarity index 100%
rename from csharp/test/Drivers/Snowflake/Resources/snowflakeconfig.json
rename to csharp/test/Drivers/Interop/Snowflake/Resources/snowflakeconfig.json
diff --git a/csharp/test/Drivers/Snowflake/SnowflakeData.cs b/csharp/test/Drivers/Interop/Snowflake/SnowflakeData.cs
similarity index 100%
rename from csharp/test/Drivers/Snowflake/SnowflakeData.cs
rename to csharp/test/Drivers/Interop/Snowflake/SnowflakeData.cs
diff --git a/csharp/test/Drivers/Snowflake/SnowflakeTestConfiguration.cs b/csharp/test/Drivers/Interop/Snowflake/SnowflakeTestConfiguration.cs
similarity index 100%
rename from csharp/test/Drivers/Snowflake/SnowflakeTestConfiguration.cs
rename to csharp/test/Drivers/Interop/Snowflake/SnowflakeTestConfiguration.cs
diff --git a/csharp/test/Drivers/Snowflake/SnowflakeTestingUtils.cs b/csharp/test/Drivers/Interop/Snowflake/SnowflakeTestingUtils.cs
similarity index 91%
rename from csharp/test/Drivers/Snowflake/SnowflakeTestingUtils.cs
rename to csharp/test/Drivers/Interop/Snowflake/SnowflakeTestingUtils.cs
index a6c63868b9..d1e7b9dc74 100644
--- a/csharp/test/Drivers/Snowflake/SnowflakeTestingUtils.cs
+++ b/csharp/test/Drivers/Interop/Snowflake/SnowflakeTestingUtils.cs
@@ -20,8 +20,7 @@
using System.IO;
using System.Linq;
using System.Text;
-using Apache.Arrow.Adbc.C;
-using Xunit;
+using Apache.Arrow.Adbc.Drivers.Interop.Snowflake;
namespace Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake
{
@@ -100,7 +99,7 @@ out Dictionary parameters
}
Dictionary options = new Dictionary() { };
- AdbcDriver snowflakeDriver = CAdbcDriverImporter.Load(testConfiguration.DriverPath, testConfiguration.DriverEntryPoint);
+ AdbcDriver snowflakeDriver = GetSnowflakeAdbcDriver(testConfiguration);
return snowflakeDriver;
}
@@ -116,7 +115,16 @@ internal static AdbcDriver GetSnowflakeAdbcDriver(
SnowflakeTestConfiguration testConfiguration
)
{
- AdbcDriver snowflakeDriver = CAdbcDriverImporter.Load(testConfiguration.DriverPath, testConfiguration.DriverEntryPoint);
+ AdbcDriver snowflakeDriver;
+
+ if (testConfiguration == null || string.IsNullOrEmpty(testConfiguration.DriverPath) || string.IsNullOrEmpty(testConfiguration.DriverEntryPoint))
+ {
+ snowflakeDriver = SnowflakeDriverLoader.LoadDriver();
+ }
+ else
+ {
+ snowflakeDriver = SnowflakeDriverLoader.LoadDriver(testConfiguration.DriverPath, testConfiguration.DriverEntryPoint);
+ }
return snowflakeDriver;
}
diff --git a/csharp/test/Drivers/Snowflake/ValueTests.cs b/csharp/test/Drivers/Interop/Snowflake/ValueTests.cs
similarity index 100%
rename from csharp/test/Drivers/Snowflake/ValueTests.cs
rename to csharp/test/Drivers/Interop/Snowflake/ValueTests.cs
diff --git a/csharp/test/Drivers/Snowflake/readme.md b/csharp/test/Drivers/Interop/Snowflake/readme.md
similarity index 100%
rename from csharp/test/Drivers/Snowflake/readme.md
rename to csharp/test/Drivers/Interop/Snowflake/readme.md
diff --git a/csharp/test/SmokeTests/Apache.Arrow.Adbc.SmokeTests/Apache.Arrow.Adbc.SmokeTests.csproj b/csharp/test/SmokeTests/Apache.Arrow.Adbc.SmokeTests/Apache.Arrow.Adbc.SmokeTests.csproj
new file mode 100644
index 0000000000..08ad0ea09d
--- /dev/null
+++ b/csharp/test/SmokeTests/Apache.Arrow.Adbc.SmokeTests/Apache.Arrow.Adbc.SmokeTests.csproj
@@ -0,0 +1,44 @@
+
+
+
+
+ net472;net6.0
+ disable
+ false
+ true
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/csharp/test/SmokeTests/BigQuery/Apache.Arrow.Adbc.SmokeTests.Drivers.BigQuery.csproj b/csharp/test/SmokeTests/BigQuery/Apache.Arrow.Adbc.SmokeTests.Drivers.BigQuery.csproj
new file mode 100644
index 0000000000..d032501e43
--- /dev/null
+++ b/csharp/test/SmokeTests/BigQuery/Apache.Arrow.Adbc.SmokeTests.Drivers.BigQuery.csproj
@@ -0,0 +1,33 @@
+
+
+
+ net472;net6.0
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
+
+
diff --git a/csharp/test/SmokeTests/FlightSql/Apache.Arrow.Adbc.SmokeTests.Drivers.FlightSql.csproj b/csharp/test/SmokeTests/FlightSql/Apache.Arrow.Adbc.SmokeTests.Drivers.FlightSql.csproj
new file mode 100644
index 0000000000..7647af2d76
--- /dev/null
+++ b/csharp/test/SmokeTests/FlightSql/Apache.Arrow.Adbc.SmokeTests.Drivers.FlightSql.csproj
@@ -0,0 +1,28 @@
+
+
+ net472;net6.0
+ disable
+ False
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+ Never
+
+
+
diff --git a/csharp/test/SmokeTests/Interop/Snowflake/Apache.Arrow.Adbc.SmokeTests.Drivers.Interop.Snowflake.csproj b/csharp/test/SmokeTests/Interop/Snowflake/Apache.Arrow.Adbc.SmokeTests.Drivers.Interop.Snowflake.csproj
new file mode 100644
index 0000000000..fa722ea644
--- /dev/null
+++ b/csharp/test/SmokeTests/Interop/Snowflake/Apache.Arrow.Adbc.SmokeTests.Drivers.Interop.Snowflake.csproj
@@ -0,0 +1,33 @@
+
+
+
+ net472;net6.0
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
+
+
diff --git a/csharp/test/SmokeTests/build.props b/csharp/test/SmokeTests/build.props
new file mode 100644
index 0000000000..2b3620f03f
--- /dev/null
+++ b/csharp/test/SmokeTests/build.props
@@ -0,0 +1,8 @@
+
+
+
+ $(Version)
+ $(Version)
+ $(Version)
+
+
diff --git a/csharp/test/SmokeTests/readme.md b/csharp/test/SmokeTests/readme.md
new file mode 100644
index 0000000000..66f51791e0
--- /dev/null
+++ b/csharp/test/SmokeTests/readme.md
@@ -0,0 +1,28 @@
+
+
+# Smoke Tests
+The smoke tests are designed to work with the NuGet packages that are generated from the `dotnet pack` command. These are run automatically as part of the `Build-All.ps1` script.
+
+## Smoke Test Structure
+Smoke tests are similar to the unit tests, and actually leverage the code from unit tests, but instead target using the NuGet packages (instead of the project references) to validate they function correctly.
+
+Since these are smoke tests, they run a scaled down version of what the unit tests run. To do this, each `*.Tests` project has an equivalent `*.SmokeTests` project. For example, there is both `Apache.Arrow.Adbc.Tests` and `Apache.Arrow.Adbc.SmokeTests`. The smoke tests use linking to add items from the `*.Test` project and make them appear to be included, but they are actually located in the original project.
+
+The smoke tests only run the ClientTests because those exercise multiple NuGet packages and the underlying driver.
diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt
index 9e95dcfcff..4bfa977102 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -10,6 +10,7 @@ ci/linux-packages/changelog
ci/linux-packages/*.install
csharp/*.sln
csharp/*.csproj
+csharp/*.props
dev/release/rat_exclude_files.txt
docs/source/format/*.drawio
docs/source/format/*.svg