You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/11/18 08:29:10 UTC

[GitHub] [hive] akshat0395 opened a new pull request, #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres

akshat0395 opened a new pull request, #3782:
URL: https://github.com/apache/hive/pull/3782

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Update SHOW_COMPACTION_QUERY to support postgres syntax 
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Details: [HIVE-26759](https://issues.apache.org/jira/browse/HIVE-26759)
   `ERROR: column "CC_START" does not exist`, when Postgres is used as Hive metastore
   
   Due to this error, the Initiator class was failing after 1st iteration
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Manually configuring Postgres and Derby as HMS and see this error persist


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


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3782:
URL: https://github.com/apache/hive/pull/3782#discussion_r1026155190


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnQueries.java:
##########
@@ -18,36 +18,34 @@
 package org.apache.hadoop.hive.metastore.txn;
 
 public class TxnQueries {
-  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = 
-    " ORDER BY CASE " +
-    "   WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_END\" " +
-    "   WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_START\" " +
-    "   ELSE \"CC_COMMIT_TIME\" " +
+  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = "  ORDER BY  CASE " +

Review Comment:
   please restore the original formatting, it's hard to follow 1 liner change



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


[GitHub] [hive] InvisibleProgrammer commented on a diff in pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
InvisibleProgrammer commented on code in PR #3782:
URL: https://github.com/apache/hive/pull/3782#discussion_r1026160509


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnQueries.java:
##########
@@ -18,36 +18,34 @@
 package org.apache.hadoop.hive.metastore.txn;
 
 public class TxnQueries {
-  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = 
-    " ORDER BY CASE " +
-    "   WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_END\" " +
-    "   WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_START\" " +
-    "   ELSE \"CC_COMMIT_TIME\" " +
+  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = "  ORDER BY  CASE " +
+    " WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
+    " THEN \"CC_END\" " +
+    " WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
+    " THEN \"CC_START\" " +
+    " ELSE \"CC_COMMIT_TIME\" " +
     " END desc ," +
     " \"CC_ENQUEUE_TIME\" asc";
 
-  public static final String SHOW_COMPACTION_QUERY = 
-    "SELECT XX.* FROM ( SELECT " +
-    "  \"CQ_DATABASE\" AS CC_DATABASE, \"CQ_TABLE\" AS CC_TABLE, \"CQ_PARTITION\" AS CC_PARTITION, " +
-    "  \"CQ_STATE\" AS CC_STATE, \"CQ_TYPE\" AS CC_TYPE, \"CQ_WORKER_ID\" AS CC_WORKER_ID, " +
-    "  \"CQ_START\" AS CC_START, -1 \"CC_END\", \"CQ_RUN_AS\" AS CC_RUN_AS, " +
-    "  \"CQ_HADOOP_JOB_ID\" AS CC_HADOOP_JOB_ID, \"CQ_ID\" AS CC_ID, \"CQ_ERROR_MESSAGE\" AS CC_ERROR_MESSAGE, " +
-    "  \"CQ_ENQUEUE_TIME\" AS CC_ENQUEUE_TIME, \"CQ_WORKER_VERSION\" AS CC_WORKER_VERSION, " +
-    "  \"CQ_INITIATOR_ID\" AS CC_INITIATOR_ID, \"CQ_INITIATOR_VERSION\" AS CC_INITIATOR_VERSION, " +
-    "  \"CQ_CLEANER_START\" AS CC_CLEANER_START, \"CQ_POOL_NAME\" AS CC_POOL_NAME, \"CQ_TXN_ID\" AS CC_TXN_ID, " +
-    "  \"CQ_NEXT_TXN_ID\" AS CC_NEXT_TXN_ID, \"CQ_COMMIT_TIME\" AS CC_COMMIT_TIME, " +
-    "  \"CQ_HIGHEST_WRITE_ID\" AS CC_HIGHEST_WRITE_ID " +
+  public static final String SHOW_COMPACTION_QUERY = "SELECT XX.* FROM ( SELECT " +
+    " \"CQ_DATABASE\" AS \"CC_DATABASE\", \"CQ_TABLE\" AS \"CC_TABLE\", \"CQ_PARTITION\" AS \"CC_PARTITION\", " +
+    " \"CQ_STATE\" AS \"CC_STATE\", \"CQ_TYPE\" AS \"CC_TYPE\", \"CQ_WORKER_ID\" AS \"CC_WORKER_ID\", " +
+    " \"CQ_START\" AS \"CC_START\", -1 AS \"CC_END\", \"CQ_RUN_AS\" AS \"CC_RUN_AS\", " +
+    " \"CQ_HADOOP_JOB_ID\" AS \"CC_HADOOP_JOB_ID\", \"CQ_ID\" AS \"CC_ID\", \"CQ_ERROR_MESSAGE\" AS \"CC_ERROR_MESSAGE\", " +
+    " \"CQ_ENQUEUE_TIME\" AS \"CC_ENQUEUE_TIME\", \"CQ_WORKER_VERSION\" AS \"CC_WORKER_VERSION\", " +
+    " \"CQ_INITIATOR_ID\" AS \"CC_INITIATOR_ID\", \"CQ_INITIATOR_VERSION\" AS \"CC_INITIATOR_VERSION\", " +
+    " \"CQ_CLEANER_START\" AS \"CC_CLEANER_START\", \"CQ_POOL_NAME\" AS \"CC_POOL_NAME\", \"CQ_TXN_ID\" AS \"CC_TXN_ID\", " +
+    " \"CQ_NEXT_TXN_ID\" AS \"CC_NEXT_TXN_ID\", \"CQ_COMMIT_TIME\" AS \"CC_COMMIT_TIME\", " +
+    " \"CQ_HIGHEST_WRITE_ID\" AS \"CC_HIGHEST_WRITE_ID\" " +

Review Comment:
   I agree with @deniskuzZ . Even with ignoring whitespace changes, it is impossible to tell what is the difference.
   <img width="1611" alt="image" src="https://user-images.githubusercontent.com/1486749/202659443-f38ec76d-ab8c-474a-83ad-83bae8fff5e1.png">
   
   



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


[GitHub] [hive] akshat0395 commented on a diff in pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
akshat0395 commented on code in PR #3782:
URL: https://github.com/apache/hive/pull/3782#discussion_r1026179264


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnQueries.java:
##########
@@ -18,36 +18,34 @@
 package org.apache.hadoop.hive.metastore.txn;
 
 public class TxnQueries {
-  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = 
-    " ORDER BY CASE " +
-    "   WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_END\" " +
-    "   WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_START\" " +
-    "   ELSE \"CC_COMMIT_TIME\" " +
+  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = "  ORDER BY  CASE " +
+    " WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
+    " THEN \"CC_END\" " +
+    " WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
+    " THEN \"CC_START\" " +
+    " ELSE \"CC_COMMIT_TIME\" " +
     " END desc ," +
     " \"CC_ENQUEUE_TIME\" asc";
 
-  public static final String SHOW_COMPACTION_QUERY = 
-    "SELECT XX.* FROM ( SELECT " +
-    "  \"CQ_DATABASE\" AS CC_DATABASE, \"CQ_TABLE\" AS CC_TABLE, \"CQ_PARTITION\" AS CC_PARTITION, " +
-    "  \"CQ_STATE\" AS CC_STATE, \"CQ_TYPE\" AS CC_TYPE, \"CQ_WORKER_ID\" AS CC_WORKER_ID, " +
-    "  \"CQ_START\" AS CC_START, -1 \"CC_END\", \"CQ_RUN_AS\" AS CC_RUN_AS, " +
-    "  \"CQ_HADOOP_JOB_ID\" AS CC_HADOOP_JOB_ID, \"CQ_ID\" AS CC_ID, \"CQ_ERROR_MESSAGE\" AS CC_ERROR_MESSAGE, " +
-    "  \"CQ_ENQUEUE_TIME\" AS CC_ENQUEUE_TIME, \"CQ_WORKER_VERSION\" AS CC_WORKER_VERSION, " +
-    "  \"CQ_INITIATOR_ID\" AS CC_INITIATOR_ID, \"CQ_INITIATOR_VERSION\" AS CC_INITIATOR_VERSION, " +
-    "  \"CQ_CLEANER_START\" AS CC_CLEANER_START, \"CQ_POOL_NAME\" AS CC_POOL_NAME, \"CQ_TXN_ID\" AS CC_TXN_ID, " +
-    "  \"CQ_NEXT_TXN_ID\" AS CC_NEXT_TXN_ID, \"CQ_COMMIT_TIME\" AS CC_COMMIT_TIME, " +
-    "  \"CQ_HIGHEST_WRITE_ID\" AS CC_HIGHEST_WRITE_ID " +
+  public static final String SHOW_COMPACTION_QUERY = "SELECT XX.* FROM ( SELECT " +
+    " \"CQ_DATABASE\" AS \"CC_DATABASE\", \"CQ_TABLE\" AS \"CC_TABLE\", \"CQ_PARTITION\" AS \"CC_PARTITION\", " +
+    " \"CQ_STATE\" AS \"CC_STATE\", \"CQ_TYPE\" AS \"CC_TYPE\", \"CQ_WORKER_ID\" AS \"CC_WORKER_ID\", " +
+    " \"CQ_START\" AS \"CC_START\", -1 AS \"CC_END\", \"CQ_RUN_AS\" AS \"CC_RUN_AS\", " +
+    " \"CQ_HADOOP_JOB_ID\" AS \"CC_HADOOP_JOB_ID\", \"CQ_ID\" AS \"CC_ID\", \"CQ_ERROR_MESSAGE\" AS \"CC_ERROR_MESSAGE\", " +
+    " \"CQ_ENQUEUE_TIME\" AS \"CC_ENQUEUE_TIME\", \"CQ_WORKER_VERSION\" AS \"CC_WORKER_VERSION\", " +
+    " \"CQ_INITIATOR_ID\" AS \"CC_INITIATOR_ID\", \"CQ_INITIATOR_VERSION\" AS \"CC_INITIATOR_VERSION\", " +
+    " \"CQ_CLEANER_START\" AS \"CC_CLEANER_START\", \"CQ_POOL_NAME\" AS \"CC_POOL_NAME\", \"CQ_TXN_ID\" AS \"CC_TXN_ID\", " +
+    " \"CQ_NEXT_TXN_ID\" AS \"CC_NEXT_TXN_ID\", \"CQ_COMMIT_TIME\" AS \"CC_COMMIT_TIME\", " +
+    " \"CQ_HIGHEST_WRITE_ID\" AS \"CC_HIGHEST_WRITE_ID\" " +

Review Comment:
   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: 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


[GitHub] [hive] deniskuzZ merged pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
deniskuzZ merged PR #3782:
URL: https://github.com/apache/hive/pull/3782


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


[GitHub] [hive] sonarcloud[bot] commented on pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #3782:
URL: https://github.com/apache/hive/pull/3782#issuecomment-1320050478

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=3782)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3782&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3782&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=3782&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=3782&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3782&metric=coverage&view=list) No Coverage information  
   [![No Duplication information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/NoDuplicationInfo-16px.png 'No Duplication information')](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=3782&metric=duplicated_lines_density&view=list) No Duplication information
   
   


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


[GitHub] [hive] akshat0395 commented on a diff in pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
akshat0395 commented on code in PR #3782:
URL: https://github.com/apache/hive/pull/3782#discussion_r1026178911


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnQueries.java:
##########
@@ -18,36 +18,34 @@
 package org.apache.hadoop.hive.metastore.txn;
 
 public class TxnQueries {
-  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = 
-    " ORDER BY CASE " +
-    "   WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_END\" " +
-    "   WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_START\" " +
-    "   ELSE \"CC_COMMIT_TIME\" " +
+  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = "  ORDER BY  CASE " +
+    " WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
+    " THEN \"CC_END\" " +
+    " WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
+    " THEN \"CC_START\" " +
+    " ELSE \"CC_COMMIT_TIME\" " +
     " END desc ," +
     " \"CC_ENQUEUE_TIME\" asc";
 
-  public static final String SHOW_COMPACTION_QUERY = 
-    "SELECT XX.* FROM ( SELECT " +
-    "  \"CQ_DATABASE\" AS CC_DATABASE, \"CQ_TABLE\" AS CC_TABLE, \"CQ_PARTITION\" AS CC_PARTITION, " +
-    "  \"CQ_STATE\" AS CC_STATE, \"CQ_TYPE\" AS CC_TYPE, \"CQ_WORKER_ID\" AS CC_WORKER_ID, " +
-    "  \"CQ_START\" AS CC_START, -1 \"CC_END\", \"CQ_RUN_AS\" AS CC_RUN_AS, " +
-    "  \"CQ_HADOOP_JOB_ID\" AS CC_HADOOP_JOB_ID, \"CQ_ID\" AS CC_ID, \"CQ_ERROR_MESSAGE\" AS CC_ERROR_MESSAGE, " +
-    "  \"CQ_ENQUEUE_TIME\" AS CC_ENQUEUE_TIME, \"CQ_WORKER_VERSION\" AS CC_WORKER_VERSION, " +
-    "  \"CQ_INITIATOR_ID\" AS CC_INITIATOR_ID, \"CQ_INITIATOR_VERSION\" AS CC_INITIATOR_VERSION, " +
-    "  \"CQ_CLEANER_START\" AS CC_CLEANER_START, \"CQ_POOL_NAME\" AS CC_POOL_NAME, \"CQ_TXN_ID\" AS CC_TXN_ID, " +
-    "  \"CQ_NEXT_TXN_ID\" AS CC_NEXT_TXN_ID, \"CQ_COMMIT_TIME\" AS CC_COMMIT_TIME, " +
-    "  \"CQ_HIGHEST_WRITE_ID\" AS CC_HIGHEST_WRITE_ID " +
+  public static final String SHOW_COMPACTION_QUERY = "SELECT XX.* FROM ( SELECT " +
+    " \"CQ_DATABASE\" AS \"CC_DATABASE\", \"CQ_TABLE\" AS \"CC_TABLE\", \"CQ_PARTITION\" AS \"CC_PARTITION\", " +
+    " \"CQ_STATE\" AS \"CC_STATE\", \"CQ_TYPE\" AS \"CC_TYPE\", \"CQ_WORKER_ID\" AS \"CC_WORKER_ID\", " +
+    " \"CQ_START\" AS \"CC_START\", -1 AS \"CC_END\", \"CQ_RUN_AS\" AS \"CC_RUN_AS\", " +
+    " \"CQ_HADOOP_JOB_ID\" AS \"CC_HADOOP_JOB_ID\", \"CQ_ID\" AS \"CC_ID\", \"CQ_ERROR_MESSAGE\" AS \"CC_ERROR_MESSAGE\", " +
+    " \"CQ_ENQUEUE_TIME\" AS \"CC_ENQUEUE_TIME\", \"CQ_WORKER_VERSION\" AS \"CC_WORKER_VERSION\", " +
+    " \"CQ_INITIATOR_ID\" AS \"CC_INITIATOR_ID\", \"CQ_INITIATOR_VERSION\" AS \"CC_INITIATOR_VERSION\", " +
+    " \"CQ_CLEANER_START\" AS \"CC_CLEANER_START\", \"CQ_POOL_NAME\" AS \"CC_POOL_NAME\", \"CQ_TXN_ID\" AS \"CC_TXN_ID\", " +
+    " \"CQ_NEXT_TXN_ID\" AS \"CC_NEXT_TXN_ID\", \"CQ_COMMIT_TIME\" AS \"CC_COMMIT_TIME\", " +
+    " \"CQ_HIGHEST_WRITE_ID\" AS \"CC_HIGHEST_WRITE_ID\" " +
     "FROM " +
-    "  \"COMPACTION_QUEUE\" " +
+    " \"COMPACTION_QUEUE\" " +
     "UNION ALL " +
     "SELECT " +
-    "  \"CC_DATABASE\", \"CC_TABLE\", \"CC_PARTITION\", \"CC_STATE\", \"CC_TYPE\", \"CC_WORKER_ID\", " +
-    "  \"CC_START\", \"CC_END\", \"CC_RUN_AS\", \"CC_HADOOP_JOB_ID\", \"CC_ID\", \"CC_ERROR_MESSAGE\", " +
-    "  \"CC_ENQUEUE_TIME\", \"CC_WORKER_VERSION\", \"CC_INITIATOR_ID\", \"CC_INITIATOR_VERSION\", " +
-    "   -1 , \"CC_POOL_NAME\", \"CC_TXN_ID\", \"CC_NEXT_TXN_ID\", \"CC_COMMIT_TIME\", " +
-    "  \"CC_HIGHEST_WRITE_ID\"" +
+    " \"CC_DATABASE\", \"CC_TABLE\", \"CC_PARTITION\", \"CC_STATE\", \"CC_TYPE\", \"CC_WORKER_ID\", " +
+    " \"CC_START\", \"CC_END\", \"CC_RUN_AS\", \"CC_HADOOP_JOB_ID\", \"CC_ID\", \"CC_ERROR_MESSAGE\", " +
+    " \"CC_ENQUEUE_TIME\", \"CC_WORKER_VERSION\", \"CC_INITIATOR_ID\", \"CC_INITIATOR_VERSION\", " +
+    "  -1 AS \"CC_NEXT_TXN_ID\", \"CC_POOL_NAME\", \"CC_TXN_ID\", \"CC_NEXT_TXN_ID\", \"CC_COMMIT_TIME\", " +

Review Comment:
   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: 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


[GitHub] [hive] akshat0395 commented on pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
akshat0395 commented on PR #3782:
URL: https://github.com/apache/hive/pull/3782#issuecomment-1319725585

   @deniskuzZ @InvisibleProgrammer Thanks for the review, I have incorporated the suggestion, request your re-review


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


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3782:
URL: https://github.com/apache/hive/pull/3782#discussion_r1026154231


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnQueries.java:
##########
@@ -18,36 +18,34 @@
 package org.apache.hadoop.hive.metastore.txn;
 
 public class TxnQueries {
-  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = 
-    " ORDER BY CASE " +
-    "   WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_END\" " +
-    "   WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_START\" " +
-    "   ELSE \"CC_COMMIT_TIME\" " +
+  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = "  ORDER BY  CASE " +
+    " WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
+    " THEN \"CC_END\" " +
+    " WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
+    " THEN \"CC_START\" " +
+    " ELSE \"CC_COMMIT_TIME\" " +
     " END desc ," +
     " \"CC_ENQUEUE_TIME\" asc";
 
-  public static final String SHOW_COMPACTION_QUERY = 
-    "SELECT XX.* FROM ( SELECT " +
-    "  \"CQ_DATABASE\" AS CC_DATABASE, \"CQ_TABLE\" AS CC_TABLE, \"CQ_PARTITION\" AS CC_PARTITION, " +
-    "  \"CQ_STATE\" AS CC_STATE, \"CQ_TYPE\" AS CC_TYPE, \"CQ_WORKER_ID\" AS CC_WORKER_ID, " +
-    "  \"CQ_START\" AS CC_START, -1 \"CC_END\", \"CQ_RUN_AS\" AS CC_RUN_AS, " +
-    "  \"CQ_HADOOP_JOB_ID\" AS CC_HADOOP_JOB_ID, \"CQ_ID\" AS CC_ID, \"CQ_ERROR_MESSAGE\" AS CC_ERROR_MESSAGE, " +
-    "  \"CQ_ENQUEUE_TIME\" AS CC_ENQUEUE_TIME, \"CQ_WORKER_VERSION\" AS CC_WORKER_VERSION, " +
-    "  \"CQ_INITIATOR_ID\" AS CC_INITIATOR_ID, \"CQ_INITIATOR_VERSION\" AS CC_INITIATOR_VERSION, " +
-    "  \"CQ_CLEANER_START\" AS CC_CLEANER_START, \"CQ_POOL_NAME\" AS CC_POOL_NAME, \"CQ_TXN_ID\" AS CC_TXN_ID, " +
-    "  \"CQ_NEXT_TXN_ID\" AS CC_NEXT_TXN_ID, \"CQ_COMMIT_TIME\" AS CC_COMMIT_TIME, " +
-    "  \"CQ_HIGHEST_WRITE_ID\" AS CC_HIGHEST_WRITE_ID " +
+  public static final String SHOW_COMPACTION_QUERY = "SELECT XX.* FROM ( SELECT " +
+    " \"CQ_DATABASE\" AS \"CC_DATABASE\", \"CQ_TABLE\" AS \"CC_TABLE\", \"CQ_PARTITION\" AS \"CC_PARTITION\", " +
+    " \"CQ_STATE\" AS \"CC_STATE\", \"CQ_TYPE\" AS \"CC_TYPE\", \"CQ_WORKER_ID\" AS \"CC_WORKER_ID\", " +
+    " \"CQ_START\" AS \"CC_START\", -1 AS \"CC_END\", \"CQ_RUN_AS\" AS \"CC_RUN_AS\", " +
+    " \"CQ_HADOOP_JOB_ID\" AS \"CC_HADOOP_JOB_ID\", \"CQ_ID\" AS \"CC_ID\", \"CQ_ERROR_MESSAGE\" AS \"CC_ERROR_MESSAGE\", " +
+    " \"CQ_ENQUEUE_TIME\" AS \"CC_ENQUEUE_TIME\", \"CQ_WORKER_VERSION\" AS \"CC_WORKER_VERSION\", " +
+    " \"CQ_INITIATOR_ID\" AS \"CC_INITIATOR_ID\", \"CQ_INITIATOR_VERSION\" AS \"CC_INITIATOR_VERSION\", " +
+    " \"CQ_CLEANER_START\" AS \"CC_CLEANER_START\", \"CQ_POOL_NAME\" AS \"CC_POOL_NAME\", \"CQ_TXN_ID\" AS \"CC_TXN_ID\", " +
+    " \"CQ_NEXT_TXN_ID\" AS \"CC_NEXT_TXN_ID\", \"CQ_COMMIT_TIME\" AS \"CC_COMMIT_TIME\", " +
+    " \"CQ_HIGHEST_WRITE_ID\" AS \"CC_HIGHEST_WRITE_ID\" " +
     "FROM " +
-    "  \"COMPACTION_QUEUE\" " +
+    " \"COMPACTION_QUEUE\" " +
     "UNION ALL " +
     "SELECT " +
-    "  \"CC_DATABASE\", \"CC_TABLE\", \"CC_PARTITION\", \"CC_STATE\", \"CC_TYPE\", \"CC_WORKER_ID\", " +
-    "  \"CC_START\", \"CC_END\", \"CC_RUN_AS\", \"CC_HADOOP_JOB_ID\", \"CC_ID\", \"CC_ERROR_MESSAGE\", " +
-    "  \"CC_ENQUEUE_TIME\", \"CC_WORKER_VERSION\", \"CC_INITIATOR_ID\", \"CC_INITIATOR_VERSION\", " +
-    "   -1 , \"CC_POOL_NAME\", \"CC_TXN_ID\", \"CC_NEXT_TXN_ID\", \"CC_COMMIT_TIME\", " +
-    "  \"CC_HIGHEST_WRITE_ID\"" +
+    " \"CC_DATABASE\", \"CC_TABLE\", \"CC_PARTITION\", \"CC_STATE\", \"CC_TYPE\", \"CC_WORKER_ID\", " +
+    " \"CC_START\", \"CC_END\", \"CC_RUN_AS\", \"CC_HADOOP_JOB_ID\", \"CC_ID\", \"CC_ERROR_MESSAGE\", " +
+    " \"CC_ENQUEUE_TIME\", \"CC_WORKER_VERSION\", \"CC_INITIATOR_ID\", \"CC_INITIATOR_VERSION\", " +
+    "  -1 AS \"CC_NEXT_TXN_ID\", \"CC_POOL_NAME\", \"CC_TXN_ID\", \"CC_NEXT_TXN_ID\", \"CC_COMMIT_TIME\", " +

Review Comment:
   there are 2 CC_NEXT_TXN_ID declarations



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


[GitHub] [hive] deniskuzZ commented on a diff in pull request #3782: HIVE-26759: Update SHOW_COMPACTION_QUERY to support postgres HMS

Posted by GitBox <gi...@apache.org>.
deniskuzZ commented on code in PR #3782:
URL: https://github.com/apache/hive/pull/3782#discussion_r1026156472


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnQueries.java:
##########
@@ -18,36 +18,34 @@
 package org.apache.hadoop.hive.metastore.txn;
 
 public class TxnQueries {
-  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = 
-    " ORDER BY CASE " +
-    "   WHEN \"CC_END\" > \"CC_START\" and \"CC_END\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_END\" " +
-    "   WHEN \"CC_START\" > \"CC_COMMIT_TIME\" " +
-    "     THEN \"CC_START\" " +
-    "   ELSE \"CC_COMMIT_TIME\" " +
+  public static final String SHOW_COMPACTION_ORDERBY_CLAUSE = "  ORDER BY  CASE " +

Review Comment:
   @akshat0395, thank you for submitting the bug fix. Could you please restore the original formatting, it's very inconvenient to follow the changes.



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