You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/05/10 10:38:22 UTC

[GitHub] [incubator-doris] SaintBacchus opened a new pull request, #9485: [Tiny-fix] Add show user stmt impl.

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

   ## Problem Summary:
   `Show User` stmt always result empty because `ShowExecutor.java` miss the impl of `handleShowUser`
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (No)
   2. Has unit tests been added: (Yes)
   3. Has document been added or modified: (Yes)
   4. Does it need to update dependencies: (No)
   5. Are there any changes that cannot be rolled back: (No)
   
   ## 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] [incubator-doris] SaintBacchus commented on pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#issuecomment-1133521458

   @jackwener UT has been resolved.


-- 
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] [incubator-doris] github-actions[bot] commented on pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#issuecomment-1133796821

   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] [incubator-doris] xy720 commented on a diff in pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
xy720 commented on code in PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#discussion_r869923843


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ShowUserStmt.java:
##########
@@ -28,9 +28,8 @@ public class ShowUserStmt extends ShowStmt {
 
     static {
         ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
-        for (String title : AuthProcDir.TITLE_NAMES) {
-            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
-        }
+        builder.addColumn(new Column("User", ScalarType.createVarchar(30)));

Review Comment:
   builder.addColumn(new Column(col, ScalarType.createVarchar(100)));



-- 
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] [incubator-doris] SaintBacchus commented on a diff in pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on code in PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#discussion_r869913196


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ShowUserStmt.java:
##########
@@ -28,9 +28,8 @@ public class ShowUserStmt extends ShowStmt {
 
     static {
         ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
-        for (String title : AuthProcDir.TITLE_NAMES) {
-            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
-        }
+        builder.addColumn(new Column("User", ScalarType.createVarchar(30)));

Review Comment:
   OK, it will may be the same as `select user()` stmt.



-- 
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] [incubator-doris] SaintBacchus commented on pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#issuecomment-1132537634

   @jackwener OK, I will rebase it and fix regression 


-- 
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] [incubator-doris] xy720 commented on pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
xy720 commented on PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#issuecomment-1123158142

   My mistake. This stmt is used to show current login user


-- 
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] [incubator-doris] SaintBacchus closed pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
SaintBacchus closed pull request #9485: [Tiny-fix] Add show user stmt impl.
URL: https://github.com/apache/incubator-doris/pull/9485


-- 
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] [incubator-doris] SaintBacchus commented on a diff in pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on code in PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#discussion_r870091283


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ShowUserStmt.java:
##########
@@ -28,9 +28,8 @@ public class ShowUserStmt extends ShowStmt {
 
     static {
         ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
-        for (String title : AuthProcDir.TITLE_NAMES) {
-            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
-        }
+        builder.addColumn(new Column("User", ScalarType.createVarchar(30)));

Review Comment:
   Got



-- 
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] [incubator-doris] morningman commented on a diff in pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#discussion_r878861603


##########
docs/zh-CN/sql-manual/sql-reference/Show-Statements/SHOW-USER.md:
##########
@@ -31,9 +31,19 @@ under the License.
 SHOW USER
 
 ### Description
+该语句用于展示当前登录用户的用户名
 
-### Example
+语法:

Review Comment:
   Add an example result and explain each column in result set.



-- 
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] [incubator-doris] SaintBacchus commented on a diff in pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
SaintBacchus commented on code in PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#discussion_r879301924


##########
docs/zh-CN/sql-manual/sql-reference/Show-Statements/SHOW-USER.md:
##########
@@ -31,9 +31,19 @@ under the License.
 SHOW USER
 
 ### Description
+该语句用于展示当前登录用户的用户名
 
-### Example
+语法:

Review Comment:
   @morningman updated code



##########
docs/zh-CN/sql-manual/sql-reference/Show-Statements/SHOW-USER.md:
##########
@@ -31,9 +31,19 @@ under the License.
 SHOW USER
 
 ### Description
+该语句用于展示当前登录用户的用户名
 
-### Example
+语法:

Review Comment:
   @morningman updated doc



-- 
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] [incubator-doris] github-actions[bot] commented on pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#issuecomment-1133645012

   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] [incubator-doris] jackwener commented on pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
jackwener commented on PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#issuecomment-1132530244

   There are `UT` failed. You can click `details` and see the detail by click `as guest`


-- 
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] [incubator-doris] xy720 commented on a diff in pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
xy720 commented on code in PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#discussion_r869889077


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ShowUserStmt.java:
##########
@@ -28,9 +28,8 @@ public class ShowUserStmt extends ShowStmt {
 
     static {
         ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
-        for (String title : AuthProcDir.TITLE_NAMES) {
-            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
-        }
+        builder.addColumn(new Column("User", ScalarType.createVarchar(30)));

Review Comment:
   We should show UserIdentity to user, just like Mysql.
   For example, `'root'@'localhost'.`



-- 
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] [incubator-doris] xy720 commented on a diff in pull request #9485: [Tiny-fix] Add show user stmt impl.

Posted by GitBox <gi...@apache.org>.
xy720 commented on code in PR #9485:
URL: https://github.com/apache/incubator-doris/pull/9485#discussion_r869923843


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ShowUserStmt.java:
##########
@@ -28,9 +28,8 @@ public class ShowUserStmt extends ShowStmt {
 
     static {
         ShowResultSetMetaData.Builder builder = ShowResultSetMetaData.builder();
-        for (String title : AuthProcDir.TITLE_NAMES) {
-            builder.addColumn(new Column(title, ScalarType.createVarchar(30)));
-        }
+        builder.addColumn(new Column("User", ScalarType.createVarchar(30)));

Review Comment:
   builder.addColumn(new Column("UserIdentity", ScalarType.createVarchar(100)));



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