whutpencil commented on code in PR #59060:
URL: https://github.com/apache/doris/pull/59060#discussion_r2625815039


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/hive/source/HiveScanNode.java:
##########
@@ -439,6 +442,16 @@ protected void setScanParams(TFileRangeDesc rangeDesc, 
Split split) {
                 tableFormatFileDesc.setTableLevelRowCount(-1);
                 rangeDesc.setTableFormatParams(tableFormatFileDesc);
             }
+            try {
+                TFileFormatType formatType = 
HMSExternalTable.getTFileFormatType(
+                        hiveSplit.getInputFormat(), hiveSplit.getSerde(), 
sessionVariable,
+                        hmsTable.firstColumnIsString(), hmsTable.getName());
+                if (formatType != null) {
+                    rangeDesc.setFormatType(formatType);
+                }
+            } catch (UserException e) {
+                LOG.warn("Failed to get file format type for split: {}", 
split, e);

Review Comment:
   > What if this exception happen?Just ignore?
   
   If getTFileFormatType throws an exception (usually due to unsupported 
SerDe), it means we cannot determine the specific format of the partition. In 
this case, the code skips setting the partition-level format and falls back to 
using the table-level format (which was the default behavior before the fix).



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