github-actions[bot] commented on code in PR #67627:
URL: https://github.com/apache/doris/pull/67627#discussion_r4081021725
##########
fe/fe-core/src/test/java/org/apache/doris/arrowflight/FlightSqlSchemaHelperSerializedSchemaTest.java:
##########
@@ -99,4 +101,28 @@ public void
serializedSchemaDescribesScalarAndNestedTimestampNs() throws IOExcep
Assertions.assertEquals(timestampNs,
schema.getFields().get(3).getChildren().get(0).getType());
}
+
+ @Test
+ public void serializedSchemaPreservesUuidAndStringTypes() throws
IOException {
+ byte[] serialized =
FlightSqlSchemaHelper.getSerializedSchema(Arrays.asList(
+ buildField(desc("u", TPrimitiveType.UUID)),
+ buildField(desc("items", TPrimitiveType.ARRAY, desc("item",
TPrimitiveType.UUID))),
+ buildField(desc("mapping", TPrimitiveType.MAP,
+ desc("key", TPrimitiveType.UUID), desc("value",
TPrimitiveType.UUID))),
+ buildField(desc("record", TPrimitiveType.STRUCT, desc("u",
TPrimitiveType.UUID))),
+ buildField(desc("text", TPrimitiveType.STRING))));
+ Schema schema = MessageSerializer.deserializeSchema(
Review Comment:
[P1] Add UUID to the central Flight Arrow type mapping. `buildField(...)`
reaches `DorisArrowTypeMapping.toArrowType`, whose switch currently has no
`PrimitiveType.UUID` case and therefore returns `ArrowType.Null`. That means
`GetTables` and nested serialized schemas advertise Null while BE emits
`arrow.uuid`, and this assertion (plus the existing exhaustive
`everyPrimitiveTypeHasARow` test) cannot pass. Please return
`UuidType.INSTANCE` from the mapper and add UUID to its mapping table/tests.
--
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]