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:
[email protected]



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

Reply via email to