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 2020/09/02 03:22:25 UTC

[GitHub] [incubator-doris] yangzhg opened a new pull request #4510: Add a session variable to show or hide hidden columns

yangzhg opened a new pull request #4510:
URL: https://github.com/apache/incubator-doris/pull/4510


   ## Proposed changes
   
   Sometimes we need to show hidden columns for debug.
   So we need to add a session variable to show or hide hidden columns
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [] Bugfix (non-breaking change which fixes an issue)
   - [x] New feature (non-breaking change which adds functionality)
   - [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [] Documentation Update (if none of the other choices apply)
   - [] Code refactor (Modify the code structure, format the code, etc...)
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x] I have create an issue on (Fix #4509), and have described the bug/feature there in detail
   - [x] Compiling and unit tests pass locally with my changes
   - [] I have added tests that prove my fix is effective or that my feature works
   - [x If this change need a document change, I have updated the document
   - [] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 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.

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 pull request #4510: Add a session variable to show or hide hidden columns

Posted by GitBox <gi...@apache.org>.
morningman commented on pull request #4510:
URL: https://github.com/apache/incubator-doris/pull/4510#issuecomment-687609258


   Hi @yangzhg , I think we need a document first to explain the logic of whether the hidden column is displayed or not.
   So that it can provide guidance for future development.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 change in pull request #4510: Add a session variable to show or hide hidden columns

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #4510:
URL: https://github.com/apache/incubator-doris/pull/4510#discussion_r485030627



##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/SchemaScanNode.java
##########
@@ -91,6 +91,7 @@ protected void toThrift(TPlanNode msg) {
                 msg.schema_scan_node.setDb("SESSION");
             }
         }
+        msg.schema_scan_node.show_hidden_cloumns = ConnectContext.get().getSessionVariable().showHiddenColumns();

Review comment:
       Use `Util. showHiddenColumns()` instead

##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/util/Util.java
##########
@@ -477,5 +478,14 @@ public static InputStream getInputStreamFromUrl(String urlStr, String encodedAut
         conn.setReadTimeout(readTimeoutMs);
         return conn.getInputStream();
     }
+
+    public static boolean showHiddenColumns() {
+        try {
+            return ConnectContext.get().getSessionVariable().showHiddenColumns();

Review comment:
       ConnectContext.get() may return null, better check it first, and if it is null, return a default value.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] yangzhg merged pull request #4510: Add a session variable to show or hide hidden columns

Posted by GitBox <gi...@apache.org>.
yangzhg merged pull request #4510:
URL: https://github.com/apache/incubator-doris/pull/4510


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] yangzhg edited a comment on pull request #4510: Add a session variable to show or hide hidden columns

Posted by GitBox <gi...@apache.org>.
yangzhg edited a comment on pull request #4510:
URL: https://github.com/apache/incubator-doris/pull/4510#issuecomment-688143324


   > Hi @yangzhg , I think we need a document first to explain the logic of whether the hidden column is displayed or not.
   > So that it can provide guidance for future development.
   
   @morningman  I have update the issue about the  session variable logic, and add batch delete documents in this pr


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] chaoyli commented on pull request #4510: Add a session variable to show or hide hidden columns

Posted by GitBox <gi...@apache.org>.
chaoyli commented on pull request #4510:
URL: https://github.com/apache/incubator-doris/pull/4510#issuecomment-685307842


   1. Sometimes is when and where to hidden the columns ?
   2. Can be hidden the columns transparent to users. Because that it's only meaningful to doris, not to 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.

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] yangzhg commented on pull request #4510: Add a session variable to show or hide hidden columns

Posted by GitBox <gi...@apache.org>.
yangzhg commented on pull request #4510:
URL: https://github.com/apache/incubator-doris/pull/4510#issuecomment-686311839


   > 1. Sometimes is when and where to hidden the columns ?
   > 2. Can be hidden the columns transparent to users. Because that it's only meaningful to doris, not to user.
   
   1 we  need to check the  hidden column value when some bug happend
   2 the default value is not show hidden column, so it is  transparent to users


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] yangzhg commented on pull request #4510: Add a session variable to show or hide hidden columns

Posted by GitBox <gi...@apache.org>.
yangzhg commented on pull request #4510:
URL: https://github.com/apache/incubator-doris/pull/4510#issuecomment-688143324


   > Hi @yangzhg , I think we need a document first to explain the logic of whether the hidden column is displayed or not.
   > So that it can provide guidance for future development.
   
   I have update the issue about the  session variable logic, and add batch delete documents in this pr


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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



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