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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSink.java:
##########
@@ -658,6 +659,15 @@ private Plan 
bindHiveTableSink(MatchingContext<UnboundHiveTableSink<Plan>> ctx)
             throw new AnalysisException("Not support insert with partition 
spec in hive catalog.");
         }
 
+        // LZO-based InputFormats are read-only in Doris. The Hive sink writes 
plain-text files
+        // without a .lzo suffix; the read path then filters out non-*.lzo 
files, making every
+        // Doris-written row permanently invisible. Reject at bind time to 
avoid silent data loss.

Review Comment:
   Blocking: this only checks 
`table.getRemoteTable().getSd().getInputFormat()`, but Doris later builds 
`THivePartition.file_format` from each existing partition's own 
`sd.getInputFormat()` in `HiveTableSink.setPartitionValues()`. Hive allows 
partition SDs to override the table SD, so an `INSERT INTO` can still reach an 
existing partition whose partition-level input format is LZO while the 
table-level SD is plain `TextInputFormat`.
   
   In that case the BE writer still produces a normal text file without a 
`.lzo` suffix (`VHivePartitionWriter::_get_file_extension()` never emits 
`.lzo`), while the read path for LZO partitions now filters to `*.lzo` only. 
The write succeeds, but the newly written rows become invisible on subsequent 
reads.
   
   Please validate the concrete target partitions' input formats as well, or 
move the rejection to a stage where Doris already knows whether any touched 
existing partition uses an LZO InputFormat.



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