You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "Aggarwal-Raghav (via GitHub)" <gi...@apache.org> on 2025/12/08 19:07:03 UTC

[PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Aggarwal-Raghav opened a new pull request, #6228:
URL: https://github.com/apache/hive/pull/6228

   ### What changes were proposed in this pull request?
   Please check the discussion in [HIVE-29259](https://issues.apache.org/jira/browse/HIVE-29259)
   
   ### Why are the changes needed?
   To have to correct output format for `desc catalog` as its there for `desc database`
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, User will observe different table output format 
   **Older:**
   ```
   0: jdbc:hive2://127.0.0.1:10000/default> desc catalog hive;
   +------------------+---------------------------------------------------------+------------+
   |   cat_name     |                      comment              | location  |
   +------------------+-------------------------------------------------------- +-------------+
   | Catalog Name    | hive                                    | NULL    |
   | Comment       | Default catalog for Hive                       | NULL    |
   | Location      | hdfs://127.0.0.1:8028/user/hive/warehouse/hiveicetest   | NULL     |
   +------------------+---------------------------------------------------------+------------+
   ```
   **New:**
   ```
   0: jdbc:hive2://127.0.0.1:10000/default> desc catalog hive;
   +------------------+-------------------------------------------------------+-------------------------------------------------------------+
   |   cat_name     |                 comment                   |              location                                      |
   +------------------+-------------------------------------------------------+-------------------------------------------------------------+
   |      hive       |       Default catalog for Hive              | hdfs://127.0.0.1:8028/user/hive/warehouse/hiveicetest      |
   +------------------+-------------------------------------------------------+-------------------------------------------------------------+
   ```
   
   
   ### How was this patch tested?
   On local Setup and ran `catalog.q`
   


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "Aggarwal-Raghav (via GitHub)" <gi...@apache.org>.
Aggarwal-Raghav commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2607096318


##########
ql/src/test/results/clientpositive/llap/catalog.q.out:
##########
@@ -16,8 +16,6 @@ PREHOOK: Input: catalog:test_cat
 POSTHOOK: query: DESC CATALOG test_cat
 POSTHOOK: type: DESCCATALOG
 POSTHOOK: Input: catalog:test_cat
-Catalog Name	test_cat	 

Review Comment:
   **Context:** After the java changes, the output of `desc catalog` i.e whole line is masked. Because of presence of `/tmp/`. With hdfs it is just masking the location instead of whole line
   
   https://github.com/apache/hive/blob/62402e9edae3a5d5335545f6841725642120b88a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QOutProcessor.java#L118
   
   `dfs -mkdir -p` is not working for TestMiniLlapLocalCliDriver. The q files (external_table_purge.q, ) in which it is working was in LlapCliDriver hence I moved the test.



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "zabetak (via GitHub)" <gi...@apache.org>.
zabetak commented on PR #6228:
URL: https://github.com/apache/hive/pull/6228#issuecomment-3660344214

   I merged this PR since it already had two approvals. Thanks for the PR @Aggarwal-Raghav and @deniskuzZ @zhangbutao for the reviews!


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6228:
URL: https://github.com/apache/hive/pull/6228#issuecomment-3636673775

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6228) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6228&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6228&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6228&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6228)
   
   


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "Aggarwal-Raghav (via GitHub)" <gi...@apache.org>.
Aggarwal-Raghav commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2606021855


##########
ql/src/test/results/clientpositive/llap/catalog.q.out:
##########
@@ -16,8 +16,6 @@ PREHOOK: Input: catalog:test_cat
 POSTHOOK: query: DESC CATALOG test_cat
 POSTHOOK: type: DESCCATALOG
 POSTHOOK: Input: catalog:test_cat
-Catalog Name	test_cat	 

Review Comment:
   Moved the `catalog.q`:
   1. To run on MiniLlapCliDriver
   2. `desc catalog extended` was printing timestamp (createtime), Hence masked it.



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "Aggarwal-Raghav (via GitHub)" <gi...@apache.org>.
Aggarwal-Raghav commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2607102507


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/catalog/desc/DescCatalogFormatter.java:
##########
@@ -66,27 +66,24 @@ static class TextDescCatalogFormatter extends DescCatalogFormatter {
     void showCatalogDescription(DataOutputStream out, String catalog, String comment, String location,
         int createTime) throws HiveException {
       try {
-        writeLine(out, "Catalog Name", catalog);
+        out.write(catalog.getBytes(StandardCharsets.UTF_8));
+        out.write(Utilities.tabCode);
         if (comment != null) {
-          writeLine(out, "Comment", HiveStringUtils.escapeJava(comment));
+          out.write(HiveStringUtils.escapeJava(comment).getBytes(StandardCharsets.UTF_8));
         }
+        out.write(Utilities.tabCode);
         if (location != null) {
-          writeLine(out, "Location", location);
+          out.write(location.getBytes(StandardCharsets.UTF_8));
         }
+        out.write(Utilities.tabCode);
         if (createTime != 0) {
           String createTimeStr = CalendarUtils.formatTimestamp((long) createTime * 1000, true);
-          writeLine(out, "CreateTime", createTimeStr);
+          out.write(createTimeStr.getBytes(StandardCharsets.UTF_8));

Review Comment:
   By design, it is meant only for `desc extended`:
   https://github.com/apache/hive/blob/d2debebbbfe7b8624332f187c1419c4cc58a5b92/ql/src/java/org/apache/hadoop/hive/ql/ddl/catalog/desc/DescCatalogOperation.java#L46-L49



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2607053184


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/catalog/desc/DescCatalogFormatter.java:
##########
@@ -66,27 +66,24 @@ static class TextDescCatalogFormatter extends DescCatalogFormatter {
     void showCatalogDescription(DataOutputStream out, String catalog, String comment, String location,
         int createTime) throws HiveException {
       try {
-        writeLine(out, "Catalog Name", catalog);
+        out.write(catalog.getBytes(StandardCharsets.UTF_8));
+        out.write(Utilities.tabCode);
         if (comment != null) {
-          writeLine(out, "Comment", HiveStringUtils.escapeJava(comment));
+          out.write(HiveStringUtils.escapeJava(comment).getBytes(StandardCharsets.UTF_8));
         }
+        out.write(Utilities.tabCode);
         if (location != null) {
-          writeLine(out, "Location", location);
+          out.write(location.getBytes(StandardCharsets.UTF_8));
         }
+        out.write(Utilities.tabCode);
         if (createTime != 0) {
           String createTimeStr = CalendarUtils.formatTimestamp((long) createTime * 1000, true);
-          writeLine(out, "CreateTime", createTimeStr);
+          out.write(createTimeStr.getBytes(StandardCharsets.UTF_8));

Review Comment:
   i don't see creation timestamp in any of new output samples. is the `createTime` set to 0?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "Aggarwal-Raghav (via GitHub)" <gi...@apache.org>.
Aggarwal-Raghav commented on PR #6228:
URL: https://github.com/apache/hive/pull/6228#issuecomment-3628610550

   After fix when `hive.ddl.output.format = text`:
   <img width="1507" height="446" alt="Screenshot 2025-12-09 at 12 07 01 AM" src="https://github.com/user-attachments/assets/f7e0e36e-f539-43f2-a15f-83d48999a767" />
   
   After fix when `hive.ddl.output.format = json`:
   <img width="1512" height="394" alt="Screenshot 2025-12-09 at 12 08 18 AM" src="https://github.com/user-attachments/assets/12dbc3fc-e11c-4a12-b549-96bac43ea136" />


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2607034381


##########
ql/src/test/results/clientpositive/llap/catalog.q.out:
##########
@@ -16,8 +16,6 @@ PREHOOK: Input: catalog:test_cat
 POSTHOOK: query: DESC CATALOG test_cat
 POSTHOOK: type: DESCCATALOG
 POSTHOOK: Input: catalog:test_cat
-Catalog Name	test_cat	 

Review Comment:
   why the catalog test has to run under Mini`Llap`CliDriver?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "zhangbutao (via GitHub)" <gi...@apache.org>.
zhangbutao commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2600716619


##########
ql/src/test/results/clientpositive/llap/catalog.q.out:
##########
@@ -16,8 +16,6 @@ PREHOOK: Input: catalog:test_cat
 POSTHOOK: query: DESC CATALOG test_cat
 POSTHOOK: type: DESCCATALOG
 POSTHOOK: Input: catalog:test_cat
-Catalog Name	test_cat	 

Review Comment:
   Can't we get the output result of DESC CATALOG in qtest?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "zhangbutao (via GitHub)" <gi...@apache.org>.
zhangbutao commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2616186596


##########
ql/src/test/results/clientpositive/llap/catalog.q.out:
##########
@@ -16,8 +16,6 @@ PREHOOK: Input: catalog:test_cat
 POSTHOOK: query: DESC CATALOG test_cat
 POSTHOOK: type: DESCCATALOG
 POSTHOOK: Input: catalog:test_cat
-Catalog Name	test_cat	 

Review Comment:
   @Aggarwal-Raghav Could you please create a JIRA ticket regarding improvements to the masking strategy?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "Aggarwal-Raghav (via GitHub)" <gi...@apache.org>.
Aggarwal-Raghav commented on PR #6228:
URL: https://github.com/apache/hive/pull/6228#issuecomment-3628612425

   CC @zhangbutao 


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #6228:
URL: https://github.com/apache/hive/pull/6228#issuecomment-3628891646

   ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6228) **Quality Gate passed**  
   Issues  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6228&issueStatuses=ACCEPTED)
   
   Measures  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6228&metric=new_coverage&view=list)  
   ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6228&metric=new_duplicated_lines_density&view=list)  
     
   [See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6228)
   
   


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "zabetak (via GitHub)" <gi...@apache.org>.
zabetak merged PR #6228:
URL: https://github.com/apache/hive/pull/6228


-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2607053184


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/catalog/desc/DescCatalogFormatter.java:
##########
@@ -66,27 +66,24 @@ static class TextDescCatalogFormatter extends DescCatalogFormatter {
     void showCatalogDescription(DataOutputStream out, String catalog, String comment, String location,
         int createTime) throws HiveException {
       try {
-        writeLine(out, "Catalog Name", catalog);
+        out.write(catalog.getBytes(StandardCharsets.UTF_8));
+        out.write(Utilities.tabCode);
         if (comment != null) {
-          writeLine(out, "Comment", HiveStringUtils.escapeJava(comment));
+          out.write(HiveStringUtils.escapeJava(comment).getBytes(StandardCharsets.UTF_8));
         }
+        out.write(Utilities.tabCode);
         if (location != null) {
-          writeLine(out, "Location", location);
+          out.write(location.getBytes(StandardCharsets.UTF_8));
         }
+        out.write(Utilities.tabCode);
         if (createTime != 0) {
           String createTimeStr = CalendarUtils.formatTimestamp((long) createTime * 1000, true);
-          writeLine(out, "CreateTime", createTimeStr);
+          out.write(createTimeStr.getBytes(StandardCharsets.UTF_8));

Review Comment:
   i don't see creation timestamp in any of new output samples



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2607034381


##########
ql/src/test/results/clientpositive/llap/catalog.q.out:
##########
@@ -16,8 +16,6 @@ PREHOOK: Input: catalog:test_cat
 POSTHOOK: query: DESC CATALOG test_cat
 POSTHOOK: type: DESCCATALOG
 POSTHOOK: Input: catalog:test_cat
-Catalog Name	test_cat	 

Review Comment:
   why the catalog test has run under Mini`Llap`CliDriver?



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2607053184


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/catalog/desc/DescCatalogFormatter.java:
##########
@@ -66,27 +66,24 @@ static class TextDescCatalogFormatter extends DescCatalogFormatter {
     void showCatalogDescription(DataOutputStream out, String catalog, String comment, String location,
         int createTime) throws HiveException {
       try {
-        writeLine(out, "Catalog Name", catalog);
+        out.write(catalog.getBytes(StandardCharsets.UTF_8));
+        out.write(Utilities.tabCode);
         if (comment != null) {
-          writeLine(out, "Comment", HiveStringUtils.escapeJava(comment));
+          out.write(HiveStringUtils.escapeJava(comment).getBytes(StandardCharsets.UTF_8));
         }
+        out.write(Utilities.tabCode);
         if (location != null) {
-          writeLine(out, "Location", location);
+          out.write(location.getBytes(StandardCharsets.UTF_8));
         }
+        out.write(Utilities.tabCode);
         if (createTime != 0) {
           String createTimeStr = CalendarUtils.formatTimestamp((long) createTime * 1000, true);
-          writeLine(out, "CreateTime", createTimeStr);
+          out.write(createTimeStr.getBytes(StandardCharsets.UTF_8));

Review Comment:
   i don't see creation timestamp in any of new output samples. is the `createTime` always 0



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]

Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2610016685


##########
ql/src/test/results/clientpositive/llap/catalog.q.out:
##########
@@ -16,8 +16,6 @@ PREHOOK: Input: catalog:test_cat
 POSTHOOK: query: DESC CATALOG test_cat
 POSTHOOK: type: DESCCATALOG
 POSTHOOK: Input: catalog:test_cat
-Catalog Name	test_cat	 

Review Comment:
   ok, we should probably improve the masking strategy



-- 
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: gitbox-unsubscribe@hive.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org