github-actions[bot] commented on code in PR #68667:
URL: https://github.com/apache/doris/pull/68667#discussion_r4216257534
##########
fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/FlightSqlSchemaHelper.java:
##########
@@ -341,13 +352,28 @@ private Map<String, List<Field>>
buildTableToFields(String dbName, TDescribeTabl
/** One column, with its nested types described down to the leaves. */
private static Field buildField(String dbName, String tableName,
TColumnDesc desc) {
+ if (desc.getColumnType() == TPrimitiveType.VARIANT) {
+ return nativeVariantField(desc.getColumnName(),
desc.isIsAllowNull(),
+ createFlightSqlColumnMetadata(dbName, tableName, desc));
+ }
ArrowType arrowType = columnDescToArrowType(desc);
return new Field(desc.getColumnName(),
new FieldType(desc.isIsAllowNull(), arrowType, null,
createFlightSqlColumnMetadata(dbName, tableName,
desc)),
arrowChildren(dbName, tableName, desc, arrowType));
}
+ static Field nativeVariantField(String name, boolean nullable, Map<String,
String> columnMetadata) {
+ FlightSqlNativeVariant.requireSupported();
Review Comment:
[P3] Check native Variant capability once per schema response.
`GetTables(include_schema=true)` visits every column and nested Variant leaf,
and this call rescans every registered BE for each leaf. A response with 10,000
Variant leaves on a 1,000-BE cluster performs about ten million repeated
checks. Evaluate the capability once before traversing the response and reuse
that decision for nested fields.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]