Skip to content

feat(csharp): native C# Snowflake ADBC driver (REST-based) - #171

Open
ndglover wants to merge 7 commits into
adbc-drivers:mainfrom
ndglover:initial
Open

feat(csharp): native C# Snowflake ADBC driver (REST-based)#171
ndglover wants to merge 7 commits into
adbc-drivers:mainfrom
ndglover:initial

Conversation

@ndglover

Copy link
Copy Markdown

Adds a from-scratch, fully-managed C# implementation of the Snowflake ADBC driver (net8.0), independent of the Go/cgo Interop driver. It speaks Snowflake's internal REST protocol directly and returns Arrow natively.

As discussed in our slack chat here is a first cut of the driver.

Tagging @lidavidm @ianmcook @davidhcoe @CurtHagenlocher

@ndglover
ndglover force-pushed the initial branch 2 times, most recently from 6a7ba51 to aaba4ec Compare July 21, 2026 14:21
Comment thread .gitattributes

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought certain IDE files used CRLF?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that by not fixing it to one or the other you end up with certain IDEs automatically modifying the files. This means you need to manually handle this in git by reverting these changes or you end up in ding dong between different conventions people have. I believe fixing to one works better but open to other suggestions

@CurtHagenlocher

Copy link
Copy Markdown
Collaborator

Thanks @lidavidm for leaving a comment which reminded me of this PR. I'll set some time aside tomorrow evening to look at it. There are a bunch of linter issues around whitespace and at least one file missing a copyright notice. I also wonder whether the copyright year should be 2026 ;). And this is probably just a "me" thing, but I find I keep getting confused by the use of "Native" to refer to the managed implementation (being "native C#").

ArgumentNullException.ThrowIfNull(batch);
ArgumentNullException.ThrowIfNull(schema);

_boundParameters = batch;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If _boundParameters is already set, should we dispose it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I've fixed this now

Comment on lines +103 to +107
if (parameters.TryGetValue("adbc.snowflake.sql.client_option.request_timeout", out string? requestTimeoutStr) &&
int.TryParse(requestTimeoutStr, out int requestTimeoutSeconds))
{
config.QueryTimeout = TimeSpan.FromSeconds(requestTimeoutSeconds);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the value is present but does not parse, presumably we should error?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is a better pattern, thanks. I've applied a fix

ndglover added 6 commits July 31, 2026 16:35
Adds a from-scratch, fully-managed C# implementation of the Snowflake ADBC
driver (net8.0), independent of the Go/cgo Interop driver. It speaks
Snowflake's internal REST protocol directly and returns Arrow natively.

Add QueryTag to connection and statement
@ndglover

Copy link
Copy Markdown
Author

@CurtHagenlocher - I think I've fixed up the linting issues and missing license headers now.
@lidavidm - that's for your comments, these are all fixed as well now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants