From c314123369b7bd6038979c597bde99a07237f746 Mon Sep 17 00:00:00 2001 From: laihui Date: Mon, 1 Dec 2025 11:43:44 +0800 Subject: [PATCH] [fix](nereids) fix copy into load orc/parquet format fail (#57362) introduced by https://github.com/apache/doris/issues/50471 Fix copy into load orc/parquet format fail: ``` mysql> copy into orc_test from (select p_partkey, p_name, p_mfgr, p_brand, p_type, p_size from @regression_test_customer('copy_into/orc/part.orc') ) properties ('file.type' = 'orc', 'copy.async' = 'false'); ERROR 1105 (HY000): errCode = 2, detailMessage = Cannot invoke "String.toLowerCase()" because the return value of "java.util.Map.get(Object)" is null ``` None - Test - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason - Behavior changed: - [ ] No. - [ ] Yes. - Does this need documentation? - [ ] No. - [ ] Yes. - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label --- .../nereids/trees/plans/commands/info/CopyIntoInfo.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CopyIntoInfo.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CopyIntoInfo.java index a97149569b6c83..f0fc2630500b07 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CopyIntoInfo.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CopyIntoInfo.java @@ -266,7 +266,10 @@ public void doValidate(String user, String db, boolean checkAuth) throws Analysi analyzer, context, cascadesContext); } - dataDescProperties.put(FileFormatProperties.PROP_COMPRESS_TYPE, copyIntoProperties.getCompression()); + String compression = copyIntoProperties.getCompression(); + if (compression != null) { + dataDescProperties.put(FileFormatProperties.PROP_COMPRESS_TYPE, compression); + } dataDescription = new DataDescription(tableName.getTbl(), null, Lists.newArrayList(filePath), copyFromDesc.getFileColumns(), separator, fileFormatStr, null, false, legacyColumnMappingList, legacyFileFilterExpr, null, LoadTask.MergeType.APPEND, null,