CurtHagenlocher commented on code in PR #1356:
URL: https://github.com/apache/arrow-adbc/pull/1356#discussion_r1451838716
##########
csharp/src/Drivers/BigQuery/BigQueryConnection.cs:
##########
@@ -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("---------");
+
columnNameBuilder.Append(row["column_name"].ToString());
ordinalPositionBuilder.Append((int)(long)row["ordinal_position"]);
remarksBuilder.Append("");
- xdbcDataTypeBuilder.AppendNull();
+
string dataType = ToTypeName(row["data_type"].ToString());
+
+ if (dataType.StartsWith("NUMERIC") ||
dataType.StartsWith("DECIMAL") || dataType.StartsWith("BIGNUMERIC") ||
dataType.StartsWith("BIGDECIMAL"))
+ {
+ ParsedDecimalValues values =
ParsePrecisionAndScale(dataType);
+ xdbcColumnSizeBuilder.Append(values.Precision);
+
xdbcDecimalDigitsBuilder.Append(Convert.ToInt16(values.Scale));
+
+ if (dataType.StartsWith("NUMERIC") ||
dataType.StartsWith("DECIMAL"))
+
xdbcDataTypeBuilder.Append((int)ArrowTypeId.Decimal128);
Review Comment:
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.)
##########
csharp/src/Drivers/BigQuery/BigQueryConnection.cs:
##########
@@ -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("---------");
Review Comment:
Remove these two lines?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]