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


##########
be/src/exprs/vcondition_expr.cpp:
##########
@@ -683,6 +683,7 @@ Status 
VectorizedCoalesceExpr::execute_column_impl(VExprContext* context, const
     bool cannot_random_write = result_column->is_column_string() ||
                                result_type->get_primitive_type() == 
PrimitiveType::TYPE_MAP ||
                                result_type->get_primitive_type() == 
PrimitiveType::TYPE_STRUCT ||
+                               result_type->get_primitive_type() == 
PrimitiveType::TYPE_FILE ||

Review Comment:
   [P1] Add FILE to the VCase result dispatcher. The new TYPE_FILE conditional 
support reaches VCaseExpr for CASE expressions, but 
VCaseExpr::_execute_update_result in be/src/exprs/vcase_expr.h only dispatches 
ARRAY/MAP/STRUCT (and VARIANT); TYPE_FILE falls through to 
NOT_IMPLEMENTED_ERROR. The added regression query evaluates mixed FILE branches 
in CASE/IF, so a normal FILE conditional errors instead of returning a 
ColumnFile. Add a CASE_TYPE(TYPE_FILE, ColumnFile) arm with the matching 
nullable handling and cover mixed, NULL, and constant FILE branches.



##########
fe/fe-type/src/main/java/org/apache/doris/catalog/PrimitiveType.java:
##########
@@ -79,6 +79,7 @@ public enum PrimitiveType {
     // 8-byte pointer and 4-byte size and 1 bytes has_null (13 bytes total)
     // Aligning to 16 bytes total.
     STRUCT("STRUCT", 16, TPrimitiveType.STRUCT, false),
+    FILE("FILE", 16, TPrimitiveType.FILE, true),

Review Comment:
   [P2] Reject FILE Arrow Flight results during FE analysis. FILE's SerDe 
explicitly returns NotSupported for Arrow output, but adding FILE as a legal 
result type lets ResultSinkOperatorX call 
DorisArrowSchemaConvertor::convert_to_arrow_type, whose switch in 
be/src/format/arrow/arrow_row_batch.cpp has no TYPE_FILE arm and returns 
Unknown primitive type(FILE); the Arrow block writer calls the same converter 
for the batch. Thus SELECT TO_FILE(...) or CAST(NULL AS FILE) over Arrow Flight 
fails during result-sink preparation instead of returning rows. Either add a 
matching six-field nullable Arrow schema/batch representation, or reject FILE 
result expressions with an explicit supported-format error, and add a Flight 
FILE result test.



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