This is an automated email from the ASF dual-hosted git repository.
curth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new ff222e20 fix(csharp/drivers/bigquery): add back support for Struct and
List arrays (#1282)
ff222e20 is described below
commit ff222e2004e281d26395964d982320bf5c506160
Author: davidhcoe <[email protected]>
AuthorDate: Fri Nov 10 11:24:51 2023 -0500
fix(csharp/drivers/bigquery): add back support for Struct and List arrays
(#1282)
got a little too crazy with the refactoring and missed the List and
Struct types for BigQuery
---------
Co-authored-by: David Coe <[email protected]>
---
csharp/src/Drivers/BigQuery/BigQueryStatement.cs | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/csharp/src/Drivers/BigQuery/BigQueryStatement.cs
b/csharp/src/Drivers/BigQuery/BigQueryStatement.cs
index bcb0c974..c82d6d31 100644
--- a/csharp/src/Drivers/BigQuery/BigQueryStatement.cs
+++ b/csharp/src/Drivers/BigQuery/BigQueryStatement.cs
@@ -87,6 +87,19 @@ namespace Apache.Arrow.Adbc.Drivers.BigQuery
return new Field(field.Name, TranslateType(field), field.Mode ==
"NULLABLE");
}
+ public override object GetValue(IArrowArray arrowArray, Field field,
int index)
+ {
+ switch(arrowArray)
+ {
+ case StructArray structArray:
+ return SerializeToJson(structArray, index);
+ case ListArray listArray:
+ return listArray.GetSlicedValues(index);
+ default:
+ return base.GetValue(arrowArray, field, index);
+ }
+ }
+
private IArrowType TranslateType(TableFieldSchema field)
{
// per
https://developers.google.com/resources/api-libraries/documentation/bigquery/v2/java/latest/com/google/api/services/bigquery/model/TableFieldSchema.html#getType--