-
Notifications
You must be signed in to change notification settings - Fork 95
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
Conversation
davidhcoe
commented
Dec 15, 2023
•
edited
Loading
edited
- Improves support for ARRAY column types
- updates XDBC types
- partially addresses csharp/adbc/ado.net: better mapping for structured types #1353
- fix for constraints in the constraints schema
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. |
There was a problem hiding this 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/test/Apache.Arrow.Adbc.Tests/Metadata/GetObjectsParser.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("---------"); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.)