imay commented on a change in pull request #1454: Fix parquet load bug 
URL: https://github.com/apache/incubator-doris/pull/1454#discussion_r302099099
 
 

 ##########
 File path: be/src/exec/parquet_scanner.cpp
 ##########
 @@ -133,13 +127,21 @@ Status ParquetScanner::open_file_reader() {
             break;
         }
 #endif
-        default: {
-            std::stringstream ss;
-            ss << "Unknown file type, type=" << range.file_type;
-            return Status::InternalError(ss.str());
+            default: {
+                std::stringstream ss;
+                ss << "Unknown file type, type=" << range.file_type;
+                return Status::InternalError(ss.str());
+            }
+        }
+        RETURN_IF_ERROR(file_reader->open());
 
 Review comment:
   If reader open fail, file_reader will be a memory leak. you should use 
std::unique_ptr<>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to