hello-stephen commented on code in PR #69710:
URL: https://github.com/apache/doris/pull/69710#discussion_r4703133685


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/RequestPropertyDeriver.java:
##########
@@ -184,14 +184,24 @@ public Void visitPhysicalPaimonTableSink(
     @Override
     public Void visitPhysicalMaxComputeTableSink(
             PhysicalMaxComputeTableSink<? extends Plan> mcTableSink, 
PlanContext context) {
-        if (connectContext != null && 
!connectContext.getSessionVariable().isEnableStrictConsistencyDml()) {
-            addRequestPropertyToChildren(PhysicalProperties.ANY);
-        } else {
-            
addRequestPropertyToChildren(mcTableSink.getRequirePhysicalProperties());
-        }
+        addRequestPropertyToChildren(getMaxComputeRequestProperties(

Review Comment:
   [P2] Preserve an execution-version-compatible dynamic write path
   
   With `be_exec_version=12` and `enable_strict_consistency_dml=false`, a 
one-row insert into a MaxCompute table partitioned by `part` now changes from a 
direct writer plan to this reduced plan:
   
   ```text
   MaxComputeSink
     LocalSort(part)
       ExternalHashExchange(part)
         OneRowRelation(1, 'p')
   ```
   
   `PhysicalPlanTranslator.toDataPartition()` emits 
`EXTERNAL_TABLE_SINK_HASH_PARTITIONED`, and `ExchangeSinkLocalState::init()` 
rejects it for execution versions below 13. Version 12 is still accepted by 
FE/BE, and the base relaxed-mode branch requested `ANY`, so this insert could 
reach the writer without that exchange. Please preserve partition ordering 
through a version-compatible fallback when the external hash exchange is 
unavailable; otherwise previously valid inserts fail before writing any rows.



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