You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "TangSiyang2001 (via GitHub)" <gi...@apache.org> on 2023/04/27 05:00:32 UTC

[GitHub] [doris] TangSiyang2001 opened a new pull request, #19142: [feature-wip](load-refactor) InsertStmt as facade layer

TangSiyang2001 opened a new pull request, #19142:
URL: https://github.com/apache/doris/pull/19142

   # Proposed changes
   
   Issue Number: close #18476
   
   ## Problem summary
   
   Try to do:
   1. make InsertStmt as facade layer
   2. implement LoadStmt related content in proxies' way.
   3. collect public properties for all loads
   
   Make InsertStmt as a facade layer, and all corresponding load behavior will be proxy to the related stmt proxy, which implements the real analyze behavior and holds the implemented data structures.
   
   A key principle is that, all load behavior, including the native insert, can be described well as data_desc, which describe the loading data, and resource desc, which clarify the load source. (Here we omit properties and other public parts, just discuss about the distinctive content).
   
   There are only two purposes that we call insertStmt in code.
   1. analyze it and keep the result in it
   4. get the analyze results when we make exec plan.
   Therefore, we can try to store most of these info in data_desc and resource_desc according to its attribute, and use it like
   ```java
   MyInfo info = insertStmt.getDataDesc<MyDataDesc>().getinfo();
   ```
   rather than
   ```java
   MyInfo info = insertStmt.getInfo();
   ```
   We can easily to hide diversity of different load and make some unified interfaces in the facade layer.
   
   The long-term goal is to unify the data desc and resouce desc, currently in early term of refactor, just keep the different desc and use a marked interface to unify them in facade layer (or use generics for InsertStmt class if no heavy job in need).
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [x] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] lvshaokang commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "lvshaokang (via GitHub)" <gi...@apache.org>.
lvshaokang commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185786640


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java:
##########
@@ -871,4 +873,43 @@ public void readFields(DataInput in) throws IOException {
             }
         }
     }
+
+    // ------------------------ for load refactor ------------------------
+    public long createLoadJobFromStmt(InsertStmt insertStmt) throws DdlException {

Review Comment:
   Is this method only used the BulkLoad type? If right, use `createBulkLoadJobFromStmt` may be more clearly.



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/UnifiedLoadStmt.java:
##########
@@ -0,0 +1,61 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.analysis;
+
+import org.apache.doris.qe.ConnectContext;
+
+import com.google.common.base.Preconditions;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Used for load refactor, as an adapter for original load stmt, will proxy to insert stmt or original load stmt, chosen
+ * by configuration
+ */
+public class UnifiedLoadStmt extends DdlStmt {
+
+    private final StatementBase proxyStmt;
+
+    public UnifiedLoadStmt(LabelName label, List<DataDescription> dataDescriptions,
+            BrokerDesc brokerDesc, String cluster, Map<String, String> properties, String comment, LoadType loadType) {
+        final ConnectContext connectContext = ConnectContext.get();
+        if (connectContext != null && connectContext.getSessionVariable().isEnableUnifiedLoad()) {
+            switch (loadType) {
+                case BROKER_LOAD:
+                    proxyStmt = new BrokerLoadStmt(label, dataDescriptions, brokerDesc, properties, comment);
+                    break;
+                case MYSQL_LOAD:

Review Comment:
   Is it redundant here? As I understand it, mysql load does not have properties such as label, broker desc, etc. Now, loadType use the hard code to defined. Whether it is better to create the new constructor method to handle LoadStmt?



##########
fe/fe-core/src/main/cup/sql_parser.cup:
##########
@@ -2321,7 +2322,7 @@ load_stmt ::=
     opt_properties:properties
     opt_comment:comment
     {:
-        RESULT = new LoadStmt(label, dataDescList, broker, system, properties, comment);
+        RESULT = new UnifiedLoadStmt(label, dataDescList, broker, system, properties, comment, LoadType.BROKER_LOAD);

Review Comment:
   I can see, the UnifiedLoadStmt is unified as a entry point for the broker load, which defines the load type using hard coding. For the `mysql load `, I same need create  the UnifiedLoadStmt contruct method to unified at the line[1], right?
   
   [1] https://github.com/apache/doris/blob/master/fe/fe-core/src/main/cup/sql_parser.cup#L2340



##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -629,7 +644,7 @@ public void executeByLegacy(TUniqueId queryId) throws Exception {
             if (!context.isTxnModel()) {
                 Span queryAnalysisSpan =
                         context.getTracer().spanBuilder("query analysis").setParent(Context.current()).startSpan();
-                try (Scope scope = queryAnalysisSpan.makeCurrent()) {
+                try (Scope ignored = queryAnalysisSpan.makeCurrent()) {

Review Comment:
   if not used, suggest `try (queryAnalysisSpan.makeCurrent()) { ` 



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1539317595

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1539633435

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1541052095

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature-wip](load-refactor) InsertStmt as facade layer and and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528661013

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185821848


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/DataDescription.java:
##########
@@ -809,7 +810,8 @@ private void analyzeMultiLoadColumns() throws AnalysisException {
             return;
         }
         String columnsSQL = "COLUMNS (" + columnDef + ")";
-        SqlParser parser = new SqlParser(new SqlScanner(new StringReader(columnsSQL)));
+        org.apache.doris.analysis.SqlParser parser = new org.apache.doris.analysis.SqlParser(

Review Comment:
   Yes, this change maybe caused by auto-formatter, I'll revert this change.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1536948127

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1539314073

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1541284983

   run p0


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528788401

   run p0


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature-wip](load-refactor) InsertStmt as facade layer

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528535175

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185813523


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/BulkLoadJob.java:
##########
@@ -376,4 +377,37 @@ private String getBrokerUserName() {
         }
         return null;
     }
+
+    // ---------------- for lod stmt ----------------

Review Comment:
   Yes it is a spelling mistake, haha.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185849492


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -629,7 +644,7 @@ public void executeByLegacy(TUniqueId queryId) throws Exception {
             if (!context.isTxnModel()) {
                 Span queryAnalysisSpan =
                         context.getTracer().spanBuilder("query analysis").setParent(Context.current()).startSpan();
-                try (Scope scope = queryAnalysisSpan.makeCurrent()) {
+                try (Scope ignored = queryAnalysisSpan.makeCurrent()) {

Review Comment:
   `try (queryAnalysisSpan.makeCurrent()) {` maybe not reasonable in Java8, a compile error will raise.



##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -629,7 +644,7 @@ public void executeByLegacy(TUniqueId queryId) throws Exception {
             if (!context.isTxnModel()) {
                 Span queryAnalysisSpan =
                         context.getTracer().spanBuilder("query analysis").setParent(Context.current()).startSpan();
-                try (Scope scope = queryAnalysisSpan.makeCurrent()) {
+                try (Scope ignored = queryAnalysisSpan.makeCurrent()) {

Review Comment:
   `try (queryAnalysisSpan.makeCurrent()) {` maybe not reasonable in Java8, a compile error will be raised.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] HHoflittlefish777 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "HHoflittlefish777 (via GitHub)" <gi...@apache.org>.
HHoflittlefish777 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1539599102

   @TangSiyang2001 you can rebase master and try again, some case have error.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1541076884

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] dataroaring merged pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load

Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring merged PR #19142:
URL: https://github.com/apache/doris/pull/19142


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature-wip](load-refactor) InsertStmt as facade layer

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528649514

   run p1


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528909119

   run p1


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] HHoflittlefish777 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "HHoflittlefish777 (via GitHub)" <gi...@apache.org>.
HHoflittlefish777 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185741122


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/BulkLoadJob.java:
##########
@@ -376,4 +377,37 @@ private String getBrokerUserName() {
         }
         return null;
     }
+
+    // ---------------- for lod stmt ----------------

Review Comment:
   Is it load,rather than lod?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1537175120

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1537259292

   run p0


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1537269250

   run p0


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185829857


##########
fe/fe-core/src/main/cup/sql_parser.cup:
##########
@@ -2321,7 +2322,7 @@ load_stmt ::=
     opt_properties:properties
     opt_comment:comment
     {:
-        RESULT = new LoadStmt(label, dataDescList, broker, system, properties, comment);
+        RESULT = new UnifiedLoadStmt(label, dataDescList, broker, system, properties, comment, LoadType.BROKER_LOAD);

Review Comment:
   Correctly, or reuse the ctor of UnifiedLoadStmt, it depends on u.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature-wip](load-refactor) InsertStmt as facade layer

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528649388

   run p0


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1534248375

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] HHoflittlefish777 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "HHoflittlefish777 (via GitHub)" <gi...@apache.org>.
HHoflittlefish777 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185743784


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/BulkLoadJob.java:
##########
@@ -376,4 +377,37 @@ private String getBrokerUserName() {
         }
         return null;
     }
+
+    // ---------------- for lod stmt ----------------
+    public static BulkLoadJob fromInsertStmt(InsertStmt insertStmt) throws DdlException {
+        // get db id
+        String dbName = insertStmt.getLoadLabel().getDbName();
+        Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
+
+        // create job
+        BulkLoadJob bulkLoadJob;
+        try {
+            switch (insertStmt.getLoadType()) {
+                case BROKER_LOAD:
+                    bulkLoadJob = new BrokerLoadJob(db.getId(), insertStmt.getLoadLabel().getLabelName(),
+                            (BrokerDesc) insertStmt.getResourceDesc(),
+                            insertStmt.getOrigStmt(), insertStmt.getUserInfo());
+                    break;
+                case SPARK_LOAD:
+                    bulkLoadJob = new SparkLoadJob(db.getId(), insertStmt.getLoadLabel().getLabelName(),
+                            insertStmt.getResourceDesc(),
+                            insertStmt.getOrigStmt(), insertStmt.getUserInfo());
+                    break;
+                default:
+                    throw new DdlException("Unknown load job type.");
+            }
+            bulkLoadJob.setComment(insertStmt.getComments());
+            bulkLoadJob.setJobProperties(insertStmt.getProperties());
+            // TODO(tsy): use generic and change the param in checkAndSetDataSourceInfo
+            bulkLoadJob.checkAndSetDataSourceInfo(db, (List<DataDescription>) insertStmt.getDataDescList());
+            return bulkLoadJob;
+        } catch (MetaNotFoundException e) {
+            throw new DdlException(e.getMessage());

Review Comment:
   I think provide more detailed error information maybe better.Just like throw new DdlException("Unknown load job type.") as you do above.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] HHoflittlefish777 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "HHoflittlefish777 (via GitHub)" <gi...@apache.org>.
HHoflittlefish777 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185768167


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/DataDescription.java:
##########
@@ -809,7 +810,8 @@ private void analyzeMultiLoadColumns() throws AnalysisException {
             return;
         }
         String columnsSQL = "COLUMNS (" + columnDef + ")";
-        SqlParser parser = new SqlParser(new SqlScanner(new StringReader(columnsSQL)));
+        org.apache.doris.analysis.SqlParser parser = new org.apache.doris.analysis.SqlParser(

Review Comment:
   SqlParser parser = new SqlParser(new SqlScanner(new StringReader(columnsSQL))) maybe better



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185829857


##########
fe/fe-core/src/main/cup/sql_parser.cup:
##########
@@ -2321,7 +2322,7 @@ load_stmt ::=
     opt_properties:properties
     opt_comment:comment
     {:
-        RESULT = new LoadStmt(label, dataDescList, broker, system, properties, comment);
+        RESULT = new UnifiedLoadStmt(label, dataDescList, broker, system, properties, comment, LoadType.BROKER_LOAD);

Review Comment:
   Correctly, or reuse the ctor of current UnifiedLoadStmt, it depends on u.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] HHoflittlefish777 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "HHoflittlefish777 (via GitHub)" <gi...@apache.org>.
HHoflittlefish777 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185774097


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java:
##########
@@ -109,7 +111,7 @@ public LoadManager(LoadJobScheduler loadJobScheduler) {
     public long createLoadJobFromStmt(LoadStmt stmt) throws DdlException {
         Database database = checkDb(stmt.getLabel().getDbName());
         long dbId = database.getId();
-        LoadJob loadJob = null;
+        LoadJob loadJob;

Review Comment:
   Suggest use LoadJob loadjob = null,This approach is more in line with regulation.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185844813


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -629,7 +644,7 @@ public void executeByLegacy(TUniqueId queryId) throws Exception {
             if (!context.isTxnModel()) {
                 Span queryAnalysisSpan =
                         context.getTracer().spanBuilder("query analysis").setParent(Context.current()).startSpan();
-                try (Scope scope = queryAnalysisSpan.makeCurrent()) {
+                try (Scope ignored = queryAnalysisSpan.makeCurrent()) {

Review Comment:
   Scope is not instance of `AutoClosable`, just use `try (queryAnalysisSpan.makeCurrent()) {` maybe not reasonable here.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature-wip](load-refactor) InsertStmt as facade layer

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528481697

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1537269266

   run arm


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1541021293

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1541064767

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1532977811

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185859492


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java:
##########
@@ -871,4 +873,43 @@ public void readFields(DataInput in) throws IOException {
             }
         }
     }
+
+    // ------------------------ for load refactor ------------------------
+    public long createLoadJobFromStmt(InsertStmt insertStmt) throws DdlException {

Review Comment:
   It is a preparation for the next part of refactor, I plan to use the unified entrance to create Job from stmt. This method will also create other kinds of load job in the later refactor.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1537112017

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185833861


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/UnifiedLoadStmt.java:
##########
@@ -0,0 +1,61 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.analysis;
+
+import org.apache.doris.qe.ConnectContext;
+
+import com.google.common.base.Preconditions;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Used for load refactor, as an adapter for original load stmt, will proxy to insert stmt or original load stmt, chosen
+ * by configuration
+ */
+public class UnifiedLoadStmt extends DdlStmt {
+
+    private final StatementBase proxyStmt;
+
+    public UnifiedLoadStmt(LabelName label, List<DataDescription> dataDescriptions,
+            BrokerDesc brokerDesc, String cluster, Map<String, String> properties, String comment, LoadType loadType) {
+        final ConnectContext connectContext = ConnectContext.get();
+        if (connectContext != null && connectContext.getSessionVariable().isEnableUnifiedLoad()) {
+            switch (loadType) {
+                case BROKER_LOAD:
+                    proxyStmt = new BrokerLoadStmt(label, dataDescriptions, brokerDesc, properties, comment);
+                    break;
+                case MYSQL_LOAD:

Review Comment:
   It is just a demonstration, indicates that we can reuse the UnifiedLoadStmt, but it is not necessary to reuse the ctor. It depends on u, and rm the branch if it is redundant to your implementation.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1537112709

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature-wip](load-refactor) InsertStmt as facade layer

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528018583

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528772577

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature-wip](load-refactor) InsertStmt as facade layer and and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1528770357

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1541818431

   PR approved by anyone and no changes requested.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1534618058

   run p0


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1533235599

   run p0


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] HHoflittlefish777 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "HHoflittlefish777 (via GitHub)" <gi...@apache.org>.
HHoflittlefish777 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185743784


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/BulkLoadJob.java:
##########
@@ -376,4 +377,37 @@ private String getBrokerUserName() {
         }
         return null;
     }
+
+    // ---------------- for lod stmt ----------------
+    public static BulkLoadJob fromInsertStmt(InsertStmt insertStmt) throws DdlException {
+        // get db id
+        String dbName = insertStmt.getLoadLabel().getDbName();
+        Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
+
+        // create job
+        BulkLoadJob bulkLoadJob;
+        try {
+            switch (insertStmt.getLoadType()) {
+                case BROKER_LOAD:
+                    bulkLoadJob = new BrokerLoadJob(db.getId(), insertStmt.getLoadLabel().getLabelName(),
+                            (BrokerDesc) insertStmt.getResourceDesc(),
+                            insertStmt.getOrigStmt(), insertStmt.getUserInfo());
+                    break;
+                case SPARK_LOAD:
+                    bulkLoadJob = new SparkLoadJob(db.getId(), insertStmt.getLoadLabel().getLabelName(),
+                            insertStmt.getResourceDesc(),
+                            insertStmt.getOrigStmt(), insertStmt.getUserInfo());
+                    break;
+                default:
+                    throw new DdlException("Unknown load job type.");
+            }
+            bulkLoadJob.setComment(insertStmt.getComments());
+            bulkLoadJob.setJobProperties(insertStmt.getProperties());
+            // TODO(tsy): use generic and change the param in checkAndSetDataSourceInfo
+            bulkLoadJob.checkAndSetDataSourceInfo(db, (List<DataDescription>) insertStmt.getDataDescList());
+            return bulkLoadJob;
+        } catch (MetaNotFoundException e) {
+            throw new DdlException(e.getMessage());

Review Comment:
   I think provide more detailed error information maybe better.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185818466


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/BulkLoadJob.java:
##########
@@ -376,4 +377,37 @@ private String getBrokerUserName() {
         }
         return null;
     }
+
+    // ---------------- for lod stmt ----------------
+    public static BulkLoadJob fromInsertStmt(InsertStmt insertStmt) throws DdlException {
+        // get db id
+        String dbName = insertStmt.getLoadLabel().getDbName();
+        Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
+
+        // create job
+        BulkLoadJob bulkLoadJob;
+        try {
+            switch (insertStmt.getLoadType()) {
+                case BROKER_LOAD:
+                    bulkLoadJob = new BrokerLoadJob(db.getId(), insertStmt.getLoadLabel().getLabelName(),
+                            (BrokerDesc) insertStmt.getResourceDesc(),
+                            insertStmt.getOrigStmt(), insertStmt.getUserInfo());
+                    break;
+                case SPARK_LOAD:
+                    bulkLoadJob = new SparkLoadJob(db.getId(), insertStmt.getLoadLabel().getLabelName(),
+                            insertStmt.getResourceDesc(),
+                            insertStmt.getOrigStmt(), insertStmt.getUserInfo());
+                    break;
+                default:
+                    throw new DdlException("Unknown load job type.");
+            }
+            bulkLoadJob.setComment(insertStmt.getComments());
+            bulkLoadJob.setJobProperties(insertStmt.getProperties());
+            // TODO(tsy): use generic and change the param in checkAndSetDataSourceInfo
+            bulkLoadJob.checkAndSetDataSourceInfo(db, (List<DataDescription>) insertStmt.getDataDescList());
+            return bulkLoadJob;
+        } catch (MetaNotFoundException e) {
+            throw new DdlException(e.getMessage());

Review Comment:
   Detailed msg has been set In CatalogIf. I think there's no need to set here. 
   
   ```java
   default T getDbOrMetaException(long dbId) throws MetaNotFoundException {
           return getDbOrException(dbId,
                   s -> new MetaNotFoundException("unknown databases, dbId=" + s, ErrorCode.ERR_BAD_DB_ERROR));
   }
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185820641


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/LabelName.java:
##########
@@ -32,6 +32,7 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
+// TODO(tsy): maybe better to rename as `LoadLabel`

Review Comment:
   Maybe we should make another PR, that rename may affaect lots of unrelated files.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1541050080

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1541818327

   PR approved by at least one committer and no changes requested.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1536955106

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1532636384

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on PR #19142:
URL: https://github.com/apache/doris/pull/19142#issuecomment-1534243864

   run buildall


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185826295


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java:
##########
@@ -109,7 +111,7 @@ public LoadManager(LoadJobScheduler loadJobScheduler) {
     public long createLoadJobFromStmt(LoadStmt stmt) throws DdlException {
         Database database = checkDb(stmt.getLabel().getDbName());
         long dbId = database.getId();
-        LoadJob loadJob = null;
+        LoadJob loadJob;

Review Comment:
   However, in Java8 and later version, there is no no need to do so, since the feature of Local Variable Type Inference.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185859492


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java:
##########
@@ -871,4 +873,43 @@ public void readFields(DataInput in) throws IOException {
             }
         }
     }
+
+    // ------------------------ for load refactor ------------------------
+    public long createLoadJobFromStmt(InsertStmt insertStmt) throws DdlException {

Review Comment:
   It is a preparation for the next part of refactor, I plan to use the unified entrance to create Job from stmt. This method will also create other kinds of load job in the later refactor. And a heavy refactor will happend to LoadManager. 
   
   Currently, implementation for other kinds of load may just reuse the temporary class LoadManagerAdapter to make integration to the corresponding load.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] lvshaokang commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "lvshaokang (via GitHub)" <gi...@apache.org>.
lvshaokang commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185860897


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -629,7 +644,7 @@ public void executeByLegacy(TUniqueId queryId) throws Exception {
             if (!context.isTxnModel()) {
                 Span queryAnalysisSpan =
                         context.getTracer().spanBuilder("query analysis").setParent(Context.current()).startSpan();
-                try (Scope scope = queryAnalysisSpan.makeCurrent()) {
+                try (Scope ignored = queryAnalysisSpan.makeCurrent()) {

Review Comment:
   > `try (queryAnalysisSpan.makeCurrent()) {` maybe not reasonable in Java8, a compile error will be raised.
   
   sry, I ignored this. Is there still support for jdk8 compilation? On my side, i used jdk11.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] HHoflittlefish777 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "HHoflittlefish777 (via GitHub)" <gi...@apache.org>.
HHoflittlefish777 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185751958


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/LabelName.java:
##########
@@ -32,6 +32,7 @@
 import java.io.DataOutput;
 import java.io.IOException;
 
+// TODO(tsy): maybe better to rename as `LoadLabel`

Review Comment:
   Aggress with it.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185833861


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/UnifiedLoadStmt.java:
##########
@@ -0,0 +1,61 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.analysis;
+
+import org.apache.doris.qe.ConnectContext;
+
+import com.google.common.base.Preconditions;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Used for load refactor, as an adapter for original load stmt, will proxy to insert stmt or original load stmt, chosen
+ * by configuration
+ */
+public class UnifiedLoadStmt extends DdlStmt {
+
+    private final StatementBase proxyStmt;
+
+    public UnifiedLoadStmt(LabelName label, List<DataDescription> dataDescriptions,
+            BrokerDesc brokerDesc, String cluster, Map<String, String> properties, String comment, LoadType loadType) {
+        final ConnectContext connectContext = ConnectContext.get();
+        if (connectContext != null && connectContext.getSessionVariable().isEnableUnifiedLoad()) {
+            switch (loadType) {
+                case BROKER_LOAD:
+                    proxyStmt = new BrokerLoadStmt(label, dataDescriptions, brokerDesc, properties, comment);
+                    break;
+                case MYSQL_LOAD:

Review Comment:
   It is just a demonstration, indicates that we can reuse the UnifiedLoadStmt, but it is not necessary to reuse the ctor. It depends on u, and rm the case branch if it is redundant to your implementation.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185826295


##########
fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java:
##########
@@ -109,7 +111,7 @@ public LoadManager(LoadJobScheduler loadJobScheduler) {
     public long createLoadJobFromStmt(LoadStmt stmt) throws DdlException {
         Database database = checkDb(stmt.getLabel().getDbName());
         long dbId = database.getId();
-        LoadJob loadJob = null;
+        LoadJob loadJob;

Review Comment:
   However, in Java8 and later versions, there is no no need to do so, since the feature of Local Variable Type Inference.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] TangSiyang2001 commented on a diff in pull request #19142: [feature](load-refactor) Step1: InsertStmt as facade layer and run S3/Broker Load as POC

Posted by "TangSiyang2001 (via GitHub)" <gi...@apache.org>.
TangSiyang2001 commented on code in PR #19142:
URL: https://github.com/apache/doris/pull/19142#discussion_r1185867995


##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -629,7 +644,7 @@ public void executeByLegacy(TUniqueId queryId) throws Exception {
             if (!context.isTxnModel()) {
                 Span queryAnalysisSpan =
                         context.getTracer().spanBuilder("query analysis").setParent(Context.current()).startSpan();
-                try (Scope scope = queryAnalysisSpan.makeCurrent()) {
+                try (Scope ignored = queryAnalysisSpan.makeCurrent()) {

Review Comment:
   Maybe we should make it compatible with Java8? haha~ I have no idea.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org