This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 050cbba6e5 [fix][hudi] use lowerCase to get hudi fileFormatType (#9873)
050cbba6e5 is described below

commit 050cbba6e5a6569a86a48a2bcac455815241ff64
Author: dujl <[email protected]>
AuthorDate: Thu Jun 9 12:13:02 2022 +0800

    [fix][hudi] use lowerCase to get hudi fileFormatType (#9873)
    
    use lowerCase of inputFormatName to get hudi fileFormatType
---
 .../main/java/org/apache/doris/planner/HudiScanNode.java   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/planner/HudiScanNode.java 
b/fe/fe-core/src/main/java/org/apache/doris/planner/HudiScanNode.java
index 756441f396..909f5cbe6d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/HudiScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/HudiScanNode.java
@@ -299,13 +299,13 @@ public class HudiScanNode extends BrokerScanNode {
         hdfsParams.setFsName(fsName);
         Log.debug("Hudi path's host is " + fsName);
 
-        TFileFormatType formatType = null;
-        if (this.inputFormatName.toUpperCase(Locale.ROOT).contains("parquet")) 
{
-            formatType = TFileFormatType.FORMAT_PARQUET;
-        } else if 
(this.inputFormatName.toUpperCase(Locale.ROOT).contains("orc")) {
-            formatType = TFileFormatType.FORMAT_ORC;
+        TFileFormatType fileFormatType = null;
+        if (this.inputFormatName.toLowerCase().contains("parquet")) {
+            fileFormatType = TFileFormatType.FORMAT_PARQUET;
+        } else if 
(this.inputFormatName.toLowerCase(Locale.ROOT).contains("orc")) {
+            fileFormatType = TFileFormatType.FORMAT_ORC;
         } else {
-            throw new UserException("unsupported hudi table type [" + 
this.inputFormatName + "].");
+            throw new UserException("Unsupported hudi table format [" + 
this.inputFormatName + "].");
         }
 
         ParamCreateContext context = getParamCreateContexts().get(0);
@@ -317,7 +317,7 @@ public class HudiScanNode extends BrokerScanNode {
                     getPartitionKeys());
             int numberOfColumnsFromFile = context.slotDescByName.size() - 
partitionValuesFromPath.size();
 
-            TBrokerRangeDesc rangeDesc = createBrokerRangeDesc(fileSplit, 
formatType,
+            TBrokerRangeDesc rangeDesc = createBrokerRangeDesc(fileSplit, 
fileFormatType,
                     partitionValuesFromPath, numberOfColumnsFromFile, 
brokerDesc);
             rangeDesc.setHdfsParams(hdfsParams);
             rangeDesc.setReadByColumnDef(true);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to