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

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


The following commit(s) were added to refs/heads/master by this push:
     new 44e438f5851 [fix](load) fix execute copy task fail (#56551)
44e438f5851 is described below

commit 44e438f5851080e9db7b741e5c8a6b99ebbc7681
Author: hui lai <[email protected]>
AuthorDate: Sun Sep 28 21:45:34 2025 +0800

    [fix](load) fix execute copy task fail (#56551)
    
    ### What problem does this PR solve?
    
    introduce by https://github.com/apache/doris/pull/55498
    
    Fix execute copy task fail:
    ```
    Caused by: org.apache.doris.common.AnalysisException: errCode = 2, 
detailMessage = Cannot invoke "java.util.Optional.isPresent()" because the 
return value of "org.apache.doris.nereids.trees.plans.co
    mmands.info.CopyFromDesc.getFileFilterExpr()" is null
            ... 13 more
    Caused by: java.lang.NullPointerException: Cannot invoke 
"java.util.Optional.isPresent()" because the return value of 
"org.apache.doris.nereids.trees.plans.commands.info.CopyFromDesc.getFileFilterExpr()"
 is null
            at 
org.apache.doris.nereids.trees.plans.commands.info.CopyIntoInfo.doValidate(CopyIntoInfo.java:262)
 ~[doris-fe.jar:1.2-SNAPSHOT]
            at 
org.apache.doris.nereids.trees.plans.commands.info.CopyIntoInfo.validate(CopyIntoInfo.java:195)
 ~[doris-fe.jar:1.2-SNAPSHOT]
            at 
org.apache.doris.nereids.trees.plans.commands.CopyIntoCommand.run(CopyIntoCommand.java:57)
 ~[doris-fe.jar:1.2-SNAPSHOT]
            at 
org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:668) 
~[doris-fe.jar:1.2-SNAPSHOT]
            ... 12 more
    
    ```
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Test <!-- At least one of them must be included. -->
        - [ ] 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 <!-- Add your reason?  -->
    
    - Behavior changed:
        - [ ] No.
        - [ ] Yes. <!-- Explain the behavior change -->
    
    - Does this need documentation?
        - [ ] No.
    - [ ] Yes. <!-- Add document PR link here. eg:
    https://github.com/apache/doris-website/pull/1214 -->
    
    ### Check List (For Reviewer who merge this PR)
    
    - [ ] Confirm the release note
    - [ ] Confirm test cases
    - [ ] Confirm document
    - [ ] Add branch pick label <!-- Add branch pick label that this PR
    should merge into -->
---
 .../main/java/org/apache/doris/cloud/load/CopyLoadPendingTask.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/load/CopyLoadPendingTask.java 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/load/CopyLoadPendingTask.java
index 0ab6a9ce907..d67938a305c 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/load/CopyLoadPendingTask.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/load/CopyLoadPendingTask.java
@@ -114,6 +114,11 @@ public class CopyLoadPendingTask extends 
BrokerLoadPendingTask {
                                 copyJob.isForceCopy());
                     }
                 }
+                if (!fileStatuses.isEmpty()) {
+                    
fileGroup.initDeferredFileFormatPropertiesIfNecessary(fileStatuses.stream()
+                            .map(pair -> pair.first)
+                            .collect(Collectors.toList()));
+                }
                 boolean isBinaryFileFormat = fileGroup.isBinaryFileFormat();
                 List<Pair<TBrokerFileStatus, ObjectFilePB>> 
filteredFileStatuses = Lists.newArrayList();
                 for (Pair<TBrokerFileStatus, ObjectFilePB> pair : 
fileStatuses) {


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

Reply via email to