msrathore-db commented on code in PR #3617:
URL: https://github.com/apache/arrow-adbc/pull/3617#discussion_r2492381794
##########
csharp/src/Drivers/Databricks/DatabricksStatement.cs:
##########
@@ -88,22 +89,34 @@ public DatabricksStatement(DatabricksConnection connection)
/// <returns>The Arrow schema</returns>
protected override Schema
GetSchemaFromMetadata(TGetResultSetMetadataResp metadata)
{
+ // Log schema parsing decision
+ Activity.Current?.SetTag("statement.schema.has_arrow_schema",
metadata.__isset.arrowSchema);
+
// For Protocol V5+, prefer Arrow schema if available
if (metadata.__isset.arrowSchema)
{
Schema? arrowSchema =
((DatabricksSchemaParser)Connection.SchemaParser).ParseArrowSchema(metadata.ArrowSchema);
if (arrowSchema != null)
{
+ Activity.Current?.SetTag("statement.schema.source",
"arrow");
+ Activity.Current?.SetTag("statement.schema.column_count",
arrowSchema.FieldsList.Count);
+
Activity.Current?.AddEvent("statement.schema.using_arrow_schema");
return arrowSchema;
}
}
// Fallback to traditional Thrift schema
- return Connection.SchemaParser.GetArrowSchema(metadata.Schema,
Connection.DataTypeConversion);
+ Activity.Current?.SetTag("statement.schema.source", "thrift");
+ Activity.Current?.AddEvent("statement.schema.fallback_to_thrift");
Review Comment:
Updated. Thanks
--
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]