You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "ramesh0201 (via GitHub)" <gi...@apache.org> on 2024/03/22 22:17:05 UTC
[PR] HIVE-28129 Execute statement doesnot report the correct query string information [hive]
ramesh0201 opened a new pull request, #5155:
URL: https://github.com/apache/hive/pull/5155
<!--
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?
Execute Statement should report the correct query string. Because it inherits the conf from the prepare query's sem object, we need to update the query string.
### Why are the changes needed?
Because currently execute queries report the prepare statement as their query string in all the logs.
### Does this PR introduce _any_ user-facing change?
No
### Is the change a dependency upgrade?
No
### How was this patch tested?
mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile=execute_query_string.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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "ramesh0201 (via GitHub)" <gi...@apache.org>.
ramesh0201 merged PR #5155:
URL: https://github.com/apache/hive/pull/5155
--
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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "ramesh0201 (via GitHub)" <gi...@apache.org>.
ramesh0201 commented on code in PR #5155:
URL: https://github.com/apache/hive/pull/5155#discussion_r1538087842
##########
ql/src/test/results/clientpositive/llap/prepare_plan.q.out:
##########
@@ -128,11 +128,11 @@ STAGE PLANS:
Processor Tree:
ListSink
-PREHOOK: query: prepare pcount from select count(*) from src where key > ?
Review Comment:
Prepare queries doesn't go through the execution phase as per current implementation https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/Driver.java#L166C30-L166C44
So the pre-execution and post-execution hooks are skipped as well, which is why we miss seeing those results in the q.out file. I feel it is ok. Just that we need to use compilation side hooks to test the prepare queries. explain..prepare still shows up in the q.out files.
So I am not sure if we have to create a follow up to test the prepare queries? what is your take?
--
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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5155:
URL: https://github.com/apache/hive/pull/5155#issuecomment-2016459290
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5155) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5155&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5155&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5155&resolved=false&inNewCodePeriod=true)
 No data about Coverage
 No data about Duplication
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5155)
--
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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5155:
URL: https://github.com/apache/hive/pull/5155#issuecomment-2018995118
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5155) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5155&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5155&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5155&resolved=false&inNewCodePeriod=true)
 No data about Coverage
 No data about Duplication
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5155)
--
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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "zabetak (via GitHub)" <gi...@apache.org>.
zabetak commented on code in PR #5155:
URL: https://github.com/apache/hive/pull/5155#discussion_r1537457971
##########
ql/src/test/queries/clientpositive/execute_query_string.q:
##########
@@ -0,0 +1,3 @@
+create table prepareexecute(a int, b int);
+prepare pcount from select count(*) from prepareexecute where a > ?;
+execute pcount using '200';
Review Comment:
The new test is redundant since the same query pattern appears in other .q files and the effects of the changes are clearly visible in the .q.out changes.
##########
ql/src/test/results/clientpositive/llap/prepare_plan.q.out:
##########
@@ -128,11 +128,11 @@ STAGE PLANS:
Processor Tree:
ListSink
-PREHOOK: query: prepare pcount from select count(*) from src where key > ?
Review Comment:
The changes in the .q.out file are the expected ones however there seems to be something missing from the prepare statement implementation. After the changes introduced here the `query: prepare` pattern does not appear at all in the .q.out files.
Is this normal? Should we log a follow-up ticket?
--
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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5155:
URL: https://github.com/apache/hive/pull/5155#issuecomment-2016321843
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5155) **Quality Gate passed**
Issues
 [10 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5155&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5155&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5155&resolved=false&inNewCodePeriod=true)
 No data about Coverage
 No data about Duplication
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5155)
--
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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "zabetak (via GitHub)" <gi...@apache.org>.
zabetak commented on code in PR #5155:
URL: https://github.com/apache/hive/pull/5155#discussion_r1538762136
##########
ql/src/test/results/clientpositive/llap/prepare_plan.q.out:
##########
@@ -128,11 +128,11 @@ STAGE PLANS:
Processor Tree:
ListSink
-PREHOOK: query: prepare pcount from select count(*) from src where key > ?
Review Comment:
Thanks for the explanation. Let's leave it as is at the moment and if really needed we can create a JIRA later ;)
--
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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "ramesh0201 (via GitHub)" <gi...@apache.org>.
ramesh0201 commented on PR #5155:
URL: https://github.com/apache/hive/pull/5155#issuecomment-2021152706
Thank you @zabetak for the 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
Re: [PR] HIVE-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #5155:
URL: https://github.com/apache/hive/pull/5155#issuecomment-2016380151
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5155) **Quality Gate passed**
Issues
 [11 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5155&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5155&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5155&resolved=false&inNewCodePeriod=true)
 No data about Coverage
 No data about Duplication
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5155)
--
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-28129 Execute statement doesnot report the correct query string information [hive]
Posted by "ramesh0201 (via GitHub)" <gi...@apache.org>.
ramesh0201 commented on code in PR #5155:
URL: https://github.com/apache/hive/pull/5155#discussion_r1538080619
##########
ql/src/test/queries/clientpositive/execute_query_string.q:
##########
@@ -0,0 +1,3 @@
+create table prepareexecute(a int, b int);
+prepare pcount from select count(*) from prepareexecute where a > ?;
+execute pcount using '200';
Review Comment:
Yes you are right, I will remove the new q file
--
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