Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add full_match_handler.go to convert the query. #299

Merged
merged 27 commits into from
Dec 31, 2024

Conversation

TianyuZhang1214
Copy link
Contributor

@TianyuZhang1214 TianyuZhang1214 commented Dec 19, 2024

This PR resolves issues #297 and #316, addressing compatibility challenges with Npgsql in C#.

Issue 1: Real Data for PostgreSQL System Tables

In PostgresDatabaseInfo.cs, 4 hard-coded queries are executed, with the results accessed via ReadNonNullableString. To ensure compatibility and non-null results, real PostgreSQL system table data are mirrored in MyDuck Server. Additionally, all PostgreSQL system table queries are redirected to their corresponding __sys__.pg_xxx tables in DuckDB.

Issue 2: Discontinuous Data in Batches

As discussed in #316, query results are split into multiple batches and returned discontinuously due to each batch containing a separate RowDescription. This PR introduces a mechanism to ensure that only a single RowDescription is returned per statement execution, providing a continuous result stream for better compatibility with Npgsql.

@TianyuZhang1214 TianyuZhang1214 linked an issue Dec 19, 2024 that may be closed by this pull request
@fanyang01
Copy link
Collaborator

@NoyException Is this issue the final obstacle to making the C# client functional? If so, we should consider enabling the test in this PR.

@TianyuZhang1214
Copy link
Contributor Author

@NoyException Is this issue the final obstacle to making the C# client functional? If so, we should consider enabling the test in this PR.

I'll enable it.

@NoyException
Copy link
Contributor

@NoyException Is this issue the final obstacle to making the C# client functional? If so, we should consider enabling the test in this PR.

This is only the current obstacle, not the last one...

catalog/initial_data.go Outdated Show resolved Hide resolved
catalog/provider.go Outdated Show resolved Hide resolved
docker/Dockerfile Outdated Show resolved Hide resolved
catalog/provider.go Show resolved Hide resolved
initialdata/pg_class.csv Show resolved Hide resolved
pgserver/full_match_handler.go Show resolved Hide resolved
@TianyuZhang1214
Copy link
Contributor Author

@fanyang01
Maybe this PR is ready to merge?

Copy link
Collaborator

@fanyang01 fanyang01 left a comment

Choose a reason for hiding this comment

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

LGTM!

@TianyuZhang1214 TianyuZhang1214 merged commit 1749dfe into main Dec 31, 2024
14 checks passed
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.

Support seemingly ambiguous reference
3 participants