From d5dd15599f9df4332b56064e9b3c8534e8e450d8 Mon Sep 17 00:00:00 2001 From: dujunling Date: Tue, 31 May 2022 11:13:28 +0800 Subject: [PATCH 1/2] [bug][hudi] use lowerCase to get hudi fileFormatType --- .../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 756441f3964cc8..a75bf868c3489e 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 @@ protected void buildScanRange() throws UserException, IOException { 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 @@ protected void buildScanRange() throws UserException, IOException { 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); From afb67876827c743c181ec8fa474a01df576f0bdb Mon Sep 17 00:00:00 2001 From: dujunling Date: Thu, 2 Jun 2022 14:57:07 +0800 Subject: [PATCH 2/2] word --- .../src/main/java/org/apache/doris/planner/HudiScanNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a75bf868c3489e..909f5cbe6d58d1 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 @@ -305,7 +305,7 @@ protected void buildScanRange() throws UserException, IOException { } else if (this.inputFormatName.toLowerCase(Locale.ROOT).contains("orc")) { fileFormatType = TFileFormatType.FORMAT_ORC; } else { - throw new UserException("unsupported hudi table format [" + this.inputFormatName + "]."); + throw new UserException("Unsupported hudi table format [" + this.inputFormatName + "]."); } ParamCreateContext context = getParamCreateContexts().get(0);