Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
sonarqubecloud[bot] commented on PR #6228: URL: https://github.com/apache/hive/pull/6228#issuecomment-3636673775 ## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6228) **Quality Gate passed** Issues  [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6228&issueStatuses=ACCEPTED) Measures  [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6228&metric=new_coverage&view=list)  [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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
sonarqubecloud[bot] commented on PR #6228: URL: https://github.com/apache/hive/pull/6228#issuecomment-3628891646 ## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=6228) **Quality Gate passed** Issues  [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6228&issueStatuses=ACCEPTED) Measures  [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=6228&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=6228&metric=new_coverage&view=list)  [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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
Aggarwal-Raghav commented on code in PR #6228:
URL: https://github.com/apache/hive/pull/6228#discussion_r2599814690
##
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));
Review Comment:
changes are made similar to
`org.apache.hadoop.hive.ql.ddl.database.desc.DescDatabaseFormatter.TextDescDatabaseFormatter()`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
Aggarwal-Raghav commented on PR #6228: URL: https://github.com/apache/hive/pull/6228#issuecomment-3628610550 After fix when `hive.ddl.output.format = text`: https://github.com/user-attachments/assets/f7e0e36e-f539-43f2-a15f-83d48999a767"; /> After fix when `hive.ddl.output.format = json`: 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
Re: [PR] HIVE-29259: Remove label from text based output for desc catalog [hive]
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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] - To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
