github-actions[bot] commented on code in PR #68667:
URL: https://github.com/apache/doris/pull/68667#discussion_r4217608456


##########
be/src/format/arrow/arrow_row_batch.cpp:
##########
@@ -229,6 +245,25 @@ std::string 
DorisArrowSchemaConvertor::timestamp_timezone(PrimitiveType) const {
     return _timezone == "Z" ? "UTC" : _timezone;
 }
 
+Status ArrowFlightSchemaConvertor::convert_to_arrow_type(
+        const DataTypePtr& type, std::shared_ptr<arrow::DataType>* result) 
const {
+    // Flight always uses native Variant, including recursively converted 
children.
+    if (type->get_primitive_type() == TYPE_VARIANT) {

Review Comment:
   [P1] Preserve the external scanner's Variant Arrow mapping. 
`MemoryScratchSinkOperatorX::sink_impl` also uses 
`ArrowFlightArrowBlockConvertor(block, ...).init()` for `MEMORY_SCRATCH_SINK` 
scans created by `TableQueryPlanAction`. This new override rejects a legacy 
`DataTypeVariant` before `get_next` can return any rows, whereas that scanner 
previously sent UTF8. V2 scans also change from VARCHAR to an extension struct 
without a scanner protocol opt-in. Scope native mapping to Flight SQL or keep 
the memory scratch sink on its prior mapping, and cover an external scan 
selecting a legacy Variant column.



-- 
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]

Reply via email to