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 0ec537edef4 [fix](column-id) fix null conn ctx  in column id flusher 
and parser for `database` field in  corresponding show stmt (#25393)
0ec537edef4 is described below

commit 0ec537edef42ab486ab1c2c0afa82904de61f941
Author: Siyang Tang <82279870+tangsiyang2...@users.noreply.github.com>
AuthorDate: Wed Oct 18 14:11:31 2023 +0800

    [fix](column-id) fix null conn ctx  in column id flusher and parser for 
`database` field in  corresponding show stmt (#25393)
---
 .../SHOW-CONVERT-LIGHR-SCHEMA-CHANGE-PROCESS.md              |  4 ++--
 .../SHOW-CONVERT-LIGHT-SCHEMA-CHANGE-PROCESS.md              |  4 ++--
 fe/fe-core/src/main/cup/sql_parser.cup                       |  2 +-
 .../org/apache/doris/alter/AlterLightSchChangeHelper.java    | 12 +++++++++++-
 4 files changed, 16 insertions(+), 6 deletions(-)

diff --git 
a/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-CONVERT-LIGHR-SCHEMA-CHANGE-PROCESS.md
 
b/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-CONVERT-LIGHR-SCHEMA-CHANGE-PROCESS.md
index 91918c4452e..d341bc81dda 100644
--- 
a/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-CONVERT-LIGHR-SCHEMA-CHANGE-PROCESS.md
+++ 
b/docs/en/docs/sql-manual/sql-reference/Show-Statements/SHOW-CONVERT-LIGHR-SCHEMA-CHANGE-PROCESS.md
@@ -37,7 +37,7 @@ This statement is used to show the process of converting 
light schema change pro
 grammar:
 
 ```sql
-SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS [FROM DATABASE db]
+SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS [FROM db]
 ```
 
 ### Example
@@ -45,7 +45,7 @@ SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS [FROM DATABASE db]
 1. View the converting process in db named test 
 
     ```sql
-     SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS FROM DATABASE test;
+     SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS FROM test;
     ````
 
 2. View the converting process globally
diff --git 
a/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-CONVERT-LIGHT-SCHEMA-CHANGE-PROCESS.md
 
b/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-CONVERT-LIGHT-SCHEMA-CHANGE-PROCESS.md
index 7d084a55159..d807a0e7268 100644
--- 
a/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-CONVERT-LIGHT-SCHEMA-CHANGE-PROCESS.md
+++ 
b/docs/zh-CN/docs/sql-manual/sql-reference/Show-Statements/SHOW-CONVERT-LIGHT-SCHEMA-CHANGE-PROCESS.md
@@ -37,7 +37,7 @@ SHOW CONVERT LIGHT SCHEMA CHANGE PROCESS
 语法:
 
 ```sql
-SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS [FROM DATABASE db]
+SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS [FROM db]
 ```
 
 ### Example
@@ -45,7 +45,7 @@ SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS [FROM DATABASE db]
 1. 查看在database test上的转换情况
 
     ```sql
-     SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS FROM DATABASE test;
+     SHOW CONVERT_LIGHT_SCHEMA_CHANGE_PROCESS FROM test;
     ````
 
 2. 查看全局的转换情况
diff --git a/fe/fe-core/src/main/cup/sql_parser.cup 
b/fe/fe-core/src/main/cup/sql_parser.cup
index 4b6c74fbe95..e0b4ab9bfe4 100644
--- a/fe/fe-core/src/main/cup/sql_parser.cup
+++ b/fe/fe-core/src/main/cup/sql_parser.cup
@@ -4312,7 +4312,7 @@ show_param ::=
     {:
         RESULT = new ShowBuildIndexStmt(db, parser.where, orderByClause, 
limitClause);
     :}
-    | KW_CONVERT_LSC KW_FROM opt_db:db
+    | KW_CONVERT_LSC opt_db:db
     {:
         RESULT = new ShowConvertLSCStmt(db);
     :}
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/alter/AlterLightSchChangeHelper.java
 
b/fe/fe-core/src/main/java/org/apache/doris/alter/AlterLightSchChangeHelper.java
index 1e77b0a5ae5..70a322a8c5f 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/alter/AlterLightSchChangeHelper.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/alter/AlterLightSchChangeHelper.java
@@ -65,13 +65,23 @@ public class AlterLightSchChangeHelper {
 
     private static final Logger LOG = 
LogManager.getLogger(AlterLightSchChangeHelper.class);
 
+    private  static final long DEFAULT_RPC_TIMEOUT = 900L;
+
     private final Database db;
 
     private final OlapTable olapTable;
 
+    private final long rpcTimoutMs;
+
     public AlterLightSchChangeHelper(Database db, OlapTable olapTable) {
         this.db = db;
         this.olapTable = olapTable;
+        ConnectContext connectContext = ConnectContext.get();
+        if (connectContext == null) {
+            rpcTimoutMs = DEFAULT_RPC_TIMEOUT * 1000L;
+        } else {
+            rpcTimoutMs = connectContext.getExecTimeout() * 1000L;
+        }
     }
 
     /**
@@ -158,7 +168,7 @@ public class AlterLightSchChangeHelper {
         }
         // wait for and get results
         final long start = System.currentTimeMillis();
-        long timeoutMs = ConnectContext.get().getExecTimeout() * 1000L;
+        long timeoutMs = rpcTimoutMs;
         final List<PFetchColIdsResponse> resultList = new ArrayList<>();
         try {
             for (Map.Entry<Long, Future<PFetchColIdsResponse>> entry : 
beIdToRespFuture.entrySet()) {


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

Reply via email to