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(csharp/src/Drivers/BigQuery): improved support for ARRAY columns #1356

Merged
merged 20 commits into from
Jan 16, 2024

Conversation

davidhcoe
Copy link
Contributor

@davidhcoe davidhcoe commented Dec 15, 2023

@github-actions github-actions bot added this to the ADBC Libraries 0.9.0 milestone Dec 15, 2023
@davidhcoe davidhcoe marked this pull request as draft December 15, 2023 20:01
@davidhcoe davidhcoe marked this pull request as ready for review December 18, 2023 14:38
@lidavidm lidavidm removed this from the ADBC Libraries 0.9.0 milestone Dec 19, 2023
@github-actions github-actions bot added this to the ADBC Libraries 0.9.0 milestone Dec 21, 2023
@davidhcoe davidhcoe marked this pull request as draft December 31, 2023 04:37
@davidhcoe davidhcoe marked this pull request as ready for review January 8, 2024 20:22
@davidhcoe
Copy link
Contributor Author

I pulled this back a few different times to (1) add constraint support and (2) most of us were out over the holidays and it was getting stale, so I wanted to ensure things were working with the latest once we were all back. This is ready to push now.

Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

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

Well, apparently I can't remember anything from December :/.

csharp/src/Drivers/BigQuery/BigQueryConnection.cs Outdated Show resolved Hide resolved
csharp/src/Drivers/BigQuery/BigQueryConnection.cs Outdated Show resolved Hide resolved
csharp/src/Drivers/BigQuery/BigQueryStatement.cs Outdated Show resolved Hide resolved
@@ -455,14 +456,35 @@ public override IArrowArrayStream GetInfo(List<AdbcInfoCode> codes)

foreach (BigQueryRow row in result)
{

row.Schema.Fields.Select(x => x.Name).ToList().ForEach(x => Debug.WriteLine($"{x} = {row[x]}"));
Debug.WriteLine("---------");
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove these two lines?

xdbcDecimalDigitsBuilder.Append(Convert.ToInt16(values.Scale));

if (dataType.StartsWith("NUMERIC") || dataType.StartsWith("DECIMAL"))
xdbcDataTypeBuilder.Append((int)ArrowTypeId.Decimal128);
Copy link
Contributor

Choose a reason for hiding this comment

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

Judging by James' comment "application types (ie C types in ODBC) aren’t really modelled in metadata since data always comes back as Arrow" I don't think it makes sense to put the C# Arrow type ids in this field; it seems like it should be specific to the source data type and not specific to the local representation.

(I don't know how common it is for database servers to assign numeric values to types, but in SQL Server terms this would either be sys.types.system_type_id or sys.types.user_type_id.)

@CurtHagenlocher CurtHagenlocher merged commit 046f8b6 into apache:main Jan 16, 2024
5 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.

3 participants