weizhengte opened a new pull request, #9983:
URL: https://github.com/apache/incubator-doris/pull/9983

   # Proposed changes
   
   Query BE from FE using MySQL protocol. This function is currently mainly 
used for statistics module. FE obtains statistics by SQL query BE, such as 
column maximum value, minimum value, etc.
   
   The main implementation of a similar SQL client, through the MySQL protocol 
for data interaction. The basic process is as follows:
   1. Build a similar SQL client in FE to establish a connection;
   2. Authentication and data interaction based on MySQL protocol;
   3. Execute SQL and parse the resulting packets of SQL execution.
   
   The usage process is as follows(the following code does no exception 
handling):
   ```
   SqlClient sqlClient = new SqlClient("db");
   sqlClient.init();
   QueryResultSet query = sqlClient.query("SELECT * FROM table1");
   List<String> columns = query.getColumns();
   while (query.next()) {
       for (String column : columns) {
           System.out.println(query.getColumnValue(column));
       }
   }
   sqlClient.close();
   ```
   
   Note: this is a tool module as statistics, it will not affect the original 
code, also will not affect the use of users. It can even be removed if 
necessary in the future.
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to