Hive
  1. Hive
  2. HIVE-5137

A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: HiveServer2
    • Labels:
      None

      Description

      Currently, a query like "create table if not exists t2 as select * from t1" sets the hasResultSet to true in SQLOperation and in turn, the query returns a result set. However, as a DDL command, this should ideally not return a result set.

      1. HIVE-5137.D12453.1.patch
        5 kB
        Phabricator
      2. HIVE-5137.D12453.2.patch
        122 kB
        Phabricator
      3. HIVE-5137.D12453.3.patch
        5 kB
        Phabricator
      4. HIVE-5137.D12453.4.patch
        5 kB
        Phabricator
      5. HIVE-5137.D12453.5.patch
        5 kB
        Phabricator
      6. HIVE-5137.D12453.6.patch
        5 kB
        Phabricator
      7. HIVE-5137.D12453.7.patch
        5 kB
        Phabricator
      8. HIVE-5137.D12453.8.patch
        5 kB
        Vaibhav Gumashta

        Activity

        Hide
        Phabricator added a comment -

        vaibhavgumashta requested code review of "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        Reviewers: JIRA

        HIVE-5137, WIP patch 1 for reviewing the progress. testExplainStmt in TestJdbcDriver2 will need a relook, commented out for now.

        Currently, a query like "create table if not exists t2 as select * from t1" sets the hasResultSet to true in SQLOperation and in turn, the query returns a result set. However, as a DDL command, this should ideally not return a result set.

        TEST PLAN
        EMPTY

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        AFFECTED FILES
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java

        MANAGE HERALD RULES
        https://reviews.facebook.net/herald/view/differential/

        WHY DID I GET THIS EMAIL?
        https://reviews.facebook.net/herald/transcript/29799/

        To: JIRA, vaibhavgumashta

        Show
        Phabricator added a comment - vaibhavgumashta requested code review of " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". Reviewers: JIRA HIVE-5137 , WIP patch 1 for reviewing the progress. testExplainStmt in TestJdbcDriver2 will need a relook, commented out for now. Currently, a query like "create table if not exists t2 as select * from t1" sets the hasResultSet to true in SQLOperation and in turn, the query returns a result set. However, as a DDL command, this should ideally not return a result set. TEST PLAN EMPTY REVISION DETAIL https://reviews.facebook.net/D12453 AFFECTED FILES jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java MANAGE HERALD RULES https://reviews.facebook.net/herald/view/differential/ WHY DID I GET THIS EMAIL? https://reviews.facebook.net/herald/transcript/29799/ To: JIRA, vaibhavgumashta
        Hide
        Phabricator added a comment -

        vaibhavgumashta updated the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        • Eclipse removed unused imports on commenting out testExplainStmt. Adding back

        Reviewers: JIRA

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        CHANGE SINCE LAST DIFF
        https://reviews.facebook.net/D12453?vs=38625&id=38631#toc

        AFFECTED FILES
        bin/hive
        common/src/java/org/apache/hadoop/hive/common/ObjectPair.java
        conf/hive-default.xml.template
        hcatalog/core/src/main/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java
        hcatalog/core/src/test/java/org/apache/hcatalog/data/schema/TestHCatSchema.java
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java
        ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/ExprProcCtx.java
        ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/ExprProcFactory.java
        ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/OpProcFactory.java
        ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/OpWalkerCtx.java
        ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartExprEvalUtils.java
        ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java
        ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java
        ql/src/java/org/apache/hadoop/hive/ql/parse/MetaDataExportListener.java
        ql/src/java/org/apache/hadoop/hive/ql/parse/ParseContext.java
        ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
        ql/src/java/org/apache/hadoop/hive/ql/udf/UDFBaseCompare.java
        ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToDate.java
        ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUnixTimeStamp.java
        ql/src/test/queries/clientpositive/create_udaf.q
        ql/src/test/queries/clientpositive/list_bucket_dml_7.q
        ql/src/test/queries/clientpositive/list_bucket_dml_8.q
        ql/src/test/queries/clientpositive/orc_dictionary_threshold.q
        ql/src/test/queries/clientpositive/udf4.q
        ql/src/test/queries/clientpositive/udf_pmod.q
        ql/src/test/queries/clientpositive/udf_to_boolean.q
        ql/src/test/queries/clientpositive/udf_to_byte.q
        ql/src/test/queries/clientpositive/udf_to_double.q
        ql/src/test/queries/clientpositive/udf_to_float.q
        ql/src/test/queries/clientpositive/udf_to_long.q
        ql/src/test/queries/clientpositive/udf_to_short.q
        ql/src/test/queries/clientpositive/udf_to_string.q
        ql/src/test/results/clientpositive/create_udaf.q.out
        ql/src/test/results/clientpositive/infer_bucket_sort_list_bucket.q.out
        ql/src/test/results/clientpositive/list_bucket_dml_7.q.out
        ql/src/test/results/clientpositive/list_bucket_dml_8.q.out
        ql/src/test/results/clientpositive/orc_dictionary_threshold.q.out
        ql/src/test/results/clientpositive/stats_noscan_2.q.out
        ql/src/test/results/clientpositive/udf4.q.out
        ql/src/test/results/clientpositive/udf_pmod.q.out
        ql/src/test/results/clientpositive/udf_to_boolean.q.out
        ql/src/test/results/clientpositive/udf_to_byte.q.out
        ql/src/test/results/clientpositive/udf_to_double.q.out
        ql/src/test/results/clientpositive/udf_to_float.q.out
        ql/src/test/results/clientpositive/udf_to_long.q.out
        ql/src/test/results/clientpositive/udf_to_short.q.out
        ql/src/test/results/clientpositive/udf_to_string.q.out
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java

        To: JIRA, vaibhavgumashta

        Show
        Phabricator added a comment - vaibhavgumashta updated the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". Eclipse removed unused imports on commenting out testExplainStmt. Adding back Reviewers: JIRA REVISION DETAIL https://reviews.facebook.net/D12453 CHANGE SINCE LAST DIFF https://reviews.facebook.net/D12453?vs=38625&id=38631#toc AFFECTED FILES bin/hive common/src/java/org/apache/hadoop/hive/common/ObjectPair.java conf/hive-default.xml.template hcatalog/core/src/main/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java hcatalog/core/src/test/java/org/apache/hcatalog/data/schema/TestHCatSchema.java jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/ExprProcCtx.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/ExprProcFactory.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/OpProcFactory.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/OpWalkerCtx.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartExprEvalUtils.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/PartitionPruner.java ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/MetaDataExportListener.java ql/src/java/org/apache/hadoop/hive/ql/parse/ParseContext.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/udf/UDFBaseCompare.java ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToDate.java ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUnixTimeStamp.java ql/src/test/queries/clientpositive/create_udaf.q ql/src/test/queries/clientpositive/list_bucket_dml_7.q ql/src/test/queries/clientpositive/list_bucket_dml_8.q ql/src/test/queries/clientpositive/orc_dictionary_threshold.q ql/src/test/queries/clientpositive/udf4.q ql/src/test/queries/clientpositive/udf_pmod.q ql/src/test/queries/clientpositive/udf_to_boolean.q ql/src/test/queries/clientpositive/udf_to_byte.q ql/src/test/queries/clientpositive/udf_to_double.q ql/src/test/queries/clientpositive/udf_to_float.q ql/src/test/queries/clientpositive/udf_to_long.q ql/src/test/queries/clientpositive/udf_to_short.q ql/src/test/queries/clientpositive/udf_to_string.q ql/src/test/results/clientpositive/create_udaf.q.out ql/src/test/results/clientpositive/infer_bucket_sort_list_bucket.q.out ql/src/test/results/clientpositive/list_bucket_dml_7.q.out ql/src/test/results/clientpositive/list_bucket_dml_8.q.out ql/src/test/results/clientpositive/orc_dictionary_threshold.q.out ql/src/test/results/clientpositive/stats_noscan_2.q.out ql/src/test/results/clientpositive/udf4.q.out ql/src/test/results/clientpositive/udf_pmod.q.out ql/src/test/results/clientpositive/udf_to_boolean.q.out ql/src/test/results/clientpositive/udf_to_byte.q.out ql/src/test/results/clientpositive/udf_to_double.q.out ql/src/test/results/clientpositive/udf_to_float.q.out ql/src/test/results/clientpositive/udf_to_long.q.out ql/src/test/results/clientpositive/udf_to_short.q.out ql/src/test/results/clientpositive/udf_to_string.q.out service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java To: JIRA, vaibhavgumashta
        Hide
        Phabricator added a comment -

        vaibhavgumashta updated the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        Updating the accidental push.

        Reviewers: JIRA

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        CHANGE SINCE LAST DIFF
        https://reviews.facebook.net/D12453?vs=38631&id=38655#toc

        AFFECTED FILES
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java

        To: JIRA, vaibhavgumashta

        Show
        Phabricator added a comment - vaibhavgumashta updated the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". Updating the accidental push. Reviewers: JIRA REVISION DETAIL https://reviews.facebook.net/D12453 CHANGE SINCE LAST DIFF https://reviews.facebook.net/D12453?vs=38631&id=38655#toc AFFECTED FILES jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java To: JIRA, vaibhavgumashta
        Hide
        Phabricator added a comment -

        vaibhavgumashta updated the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        Eclipse import related fix.

        Reviewers: JIRA

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        CHANGE SINCE LAST DIFF
        https://reviews.facebook.net/D12453?vs=38655&id=38661#toc

        AFFECTED FILES
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java

        To: JIRA, vaibhavgumashta

        Show
        Phabricator added a comment - vaibhavgumashta updated the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". Eclipse import related fix. Reviewers: JIRA REVISION DETAIL https://reviews.facebook.net/D12453 CHANGE SINCE LAST DIFF https://reviews.facebook.net/D12453?vs=38655&id=38661#toc AFFECTED FILES jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java To: JIRA, vaibhavgumashta
        Hide
        Phabricator added a comment -

        vaibhavgumashta updated the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        Final fix.

        Reviewers: JIRA

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        CHANGE SINCE LAST DIFF
        https://reviews.facebook.net/D12453?vs=38661&id=38679#toc

        AFFECTED FILES
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java

        To: JIRA, vaibhavgumashta

        Show
        Phabricator added a comment - vaibhavgumashta updated the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". Final fix. Reviewers: JIRA REVISION DETAIL https://reviews.facebook.net/D12453 CHANGE SINCE LAST DIFF https://reviews.facebook.net/D12453?vs=38661&id=38679#toc AFFECTED FILES jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java To: JIRA, vaibhavgumashta
        Hide
        Phabricator added a comment -

        thejas has commented on the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        INLINE COMMENTS
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java:473 I think writing it to stderr is better. Maybe create a function for this -

        e.printStackTrace();
        fail(e.toString());
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java:468 a function for this will make it more readable -
        Something like -
        checkResultsAvailable(String[] setupStmts, String stmt, boolean resultsExpected)
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java:267 We need to look at ways to get explain statement giving results as well.

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        To: JIRA, vaibhavgumashta
        Cc: thejas

        Show
        Phabricator added a comment - thejas has commented on the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". INLINE COMMENTS jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java:473 I think writing it to stderr is better. Maybe create a function for this - e.printStackTrace(); fail(e.toString()); jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java:468 a function for this will make it more readable - Something like - checkResultsAvailable(String[] setupStmts, String stmt, boolean resultsExpected) jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java:267 We need to look at ways to get explain statement giving results as well. REVISION DETAIL https://reviews.facebook.net/D12453 To: JIRA, vaibhavgumashta Cc: thejas
        Hide
        Phabricator added a comment -

        thejas has commented on the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        INLINE COMMENTS
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java:262 can you also add a testcase that uses executeQuery() with a query that does not produce result, and verify that it throws an exception ?
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:102 it will be more better to check for getFetchTask in the if condition, then assert the condtions on the schema within the if {} block

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        To: JIRA, vaibhavgumashta
        Cc: thejas

        Show
        Phabricator added a comment - thejas has commented on the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". INLINE COMMENTS jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java:262 can you also add a testcase that uses executeQuery() with a query that does not produce result, and verify that it throws an exception ? service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:102 it will be more better to check for getFetchTask in the if condition, then assert the condtions on the schema within the if {} block REVISION DETAIL https://reviews.facebook.net/D12453 To: JIRA, vaibhavgumashta Cc: thejas
        Hide
        Phabricator added a comment -

        thejas has commented on the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        INLINE COMMENTS
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:103 Explain is the only case that I found that is not making use of fetch task. It using the Context file/dir, but unlike other tasks, it does not add a fetch task for the read. Long term, I think we should make it consistent by using fetchtask for that as well. But for now we can just check for ExplainTask in the plan.

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        To: JIRA, vaibhavgumashta
        Cc: thejas

        Show
        Phabricator added a comment - thejas has commented on the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". INLINE COMMENTS service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:103 Explain is the only case that I found that is not making use of fetch task. It using the Context file/dir, but unlike other tasks, it does not add a fetch task for the read. Long term, I think we should make it consistent by using fetchtask for that as well. But for now we can just check for ExplainTask in the plan. REVISION DETAIL https://reviews.facebook.net/D12453 To: JIRA, vaibhavgumashta Cc: thejas
        Hide
        Phabricator added a comment -

        vaibhavgumashta updated the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        HIVE-5137: Refactoring of TestJdbcDriver2, added condition to set hasResultSet true for an explain query.

        Reviewers: JIRA

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        CHANGE SINCE LAST DIFF
        https://reviews.facebook.net/D12453?vs=38679&id=38973#toc

        AFFECTED FILES
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java

        To: JIRA, vaibhavgumashta
        Cc: thejas

        Show
        Phabricator added a comment - vaibhavgumashta updated the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". HIVE-5137 : Refactoring of TestJdbcDriver2, added condition to set hasResultSet true for an explain query. Reviewers: JIRA REVISION DETAIL https://reviews.facebook.net/D12453 CHANGE SINCE LAST DIFF https://reviews.facebook.net/D12453?vs=38679&id=38973#toc AFFECTED FILES jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java To: JIRA, vaibhavgumashta Cc: thejas
        Hide
        Phabricator added a comment -

        thejas has commented on the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        Looks good. Just 2 minor nits.

        INLINE COMMENTS
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:113 Can you make it something like ""Error running query: Schema and FieldSchema should be set when query plan has a FetchTask"
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:109 I think its a little easier to read to write it this way-
        if(driver.getPlan().getFetchTask() != null) {
        //Schema has to be set
        if(not schema set)

        { throw error; }

        ..
        setHasResultSet(true);
        }

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        To: JIRA, vaibhavgumashta
        Cc: thejas

        Show
        Phabricator added a comment - thejas has commented on the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". Looks good. Just 2 minor nits. INLINE COMMENTS service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:113 Can you make it something like ""Error running query: Schema and FieldSchema should be set when query plan has a FetchTask" service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java:109 I think its a little easier to read to write it this way- if(driver.getPlan().getFetchTask() != null) { //Schema has to be set if(not schema set) { throw error; } .. setHasResultSet(true); } REVISION DETAIL https://reviews.facebook.net/D12453 To: JIRA, vaibhavgumashta Cc: thejas
        Hide
        Phabricator added a comment -

        vaibhavgumashta updated the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        HIVE-5137: minor refactoring

        Reviewers: JIRA

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        CHANGE SINCE LAST DIFF
        https://reviews.facebook.net/D12453?vs=38973&id=38979#toc

        AFFECTED FILES
        jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java

        To: JIRA, vaibhavgumashta
        Cc: thejas

        Show
        Phabricator added a comment - vaibhavgumashta updated the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". HIVE-5137 : minor refactoring Reviewers: JIRA REVISION DETAIL https://reviews.facebook.net/D12453 CHANGE SINCE LAST DIFF https://reviews.facebook.net/D12453?vs=38973&id=38979#toc AFFECTED FILES jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java To: JIRA, vaibhavgumashta Cc: thejas
        Hide
        Phabricator added a comment -

        thejas has commented on the revision "HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL".

        LGTM +1

        REVISION DETAIL
        https://reviews.facebook.net/D12453

        To: JIRA, vaibhavgumashta
        Cc: thejas

        Show
        Phabricator added a comment - thejas has commented on the revision " HIVE-5137 [jira] A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTaskSQL". LGTM +1 REVISION DETAIL https://reviews.facebook.net/D12453 To: JIRA, vaibhavgumashta Cc: thejas
        Hide
        Vaibhav Gumashta added a comment -

        Uploading a copy of same patch to kickoff tests

        Show
        Vaibhav Gumashta added a comment - Uploading a copy of same patch to kickoff tests
        Hide
        Vaibhav Gumashta added a comment -

        Cancelling to upload the patch in a valid format

        Show
        Vaibhav Gumashta added a comment - Cancelling to upload the patch in a valid format
        Hide
        Hive QA added a comment -

        Overall: +1 all checks pass

        Here are the results of testing the latest attachment:
        https://issues.apache.org/jira/secure/attachment/12600903/HIVE-5137.D12453.8.patch

        SUCCESS: +1 2904 tests passed

        Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/580/testReport
        Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/580/console

        Messages:

        Executing org.apache.hive.ptest.execution.PrepPhase
        Executing org.apache.hive.ptest.execution.ExecutionPhase
        Executing org.apache.hive.ptest.execution.ReportingPhase
        

        This message is automatically generated.

        Show
        Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12600903/HIVE-5137.D12453.8.patch SUCCESS: +1 2904 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/580/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/580/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated.
        Hide
        Thejas M Nair added a comment -

        Patch committed to trunk. Vaibhav, thanks for the contribution!

        Show
        Thejas M Nair added a comment - Patch committed to trunk. Vaibhav, thanks for the contribution!
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hive-trunk-hadoop2-ptest #82 (See https://builds.apache.org/job/Hive-trunk-hadoop2-ptest/82/)
        HIVE-5137: A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask (Vaibhav Gumashta via Thejas Nair) (thejas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1519547)

        • /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        • /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hive-trunk-hadoop2-ptest #82 (See https://builds.apache.org/job/Hive-trunk-hadoop2-ptest/82/ ) HIVE-5137 : A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask (Vaibhav Gumashta via Thejas Nair) (thejas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1519547 ) /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hive-trunk-hadoop1-ptest #149 (See https://builds.apache.org/job/Hive-trunk-hadoop1-ptest/149/)
        HIVE-5137: A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask (Vaibhav Gumashta via Thejas Nair) (thejas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1519547)

        • /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        • /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hive-trunk-hadoop1-ptest #149 (See https://builds.apache.org/job/Hive-trunk-hadoop1-ptest/149/ ) HIVE-5137 : A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask (Vaibhav Gumashta via Thejas Nair) (thejas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1519547 ) /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hive-trunk-hadoop2 #399 (See https://builds.apache.org/job/Hive-trunk-hadoop2/399/)
        HIVE-5137: A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask (Vaibhav Gumashta via Thejas Nair) (thejas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1519547)

        • /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        • /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hive-trunk-hadoop2 #399 (See https://builds.apache.org/job/Hive-trunk-hadoop2/399/ ) HIVE-5137 : A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask (Vaibhav Gumashta via Thejas Nair) (thejas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1519547 ) /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hive-trunk-h0.21 #2307 (See https://builds.apache.org/job/Hive-trunk-h0.21/2307/)
        HIVE-5137: A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask (Vaibhav Gumashta via Thejas Nair) (thejas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1519547)

        • /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
        • /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
        Show
        Hudson added a comment - FAILURE: Integrated in Hive-trunk-h0.21 #2307 (See https://builds.apache.org/job/Hive-trunk-h0.21/2307/ ) HIVE-5137 : A Hive SQL query should not return a ResultSet when the underlying plan does not include a FetchTask (Vaibhav Gumashta via Thejas Nair) (thejas: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1519547 ) /hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java /hive/trunk/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java
        Hide
        Edward Capriolo added a comment -

        If you call fetchAll() does it return empty List or throw exception? There may be some users calling fetchAll() regardless of the query.

        Show
        Edward Capriolo added a comment - If you call fetchAll() does it return empty List or throw exception? There may be some users calling fetchAll() regardless of the query.
        Hide
        Thejas M Nair added a comment -

        Edward Capriolo I didn't understand your comment. fetchAll() method of which class ?

        Show
        Thejas M Nair added a comment - Edward Capriolo I didn't understand your comment. fetchAll() method of which class ?
        Hide
        Edward Capriolo added a comment -

        HiveInterface.fetchAll(). I know we have scripts that call FetchAll() or fetchOne() on queries that probably do not have one. I wanted to make sure this will not be a breaking change to existing code.

        Show
        Edward Capriolo added a comment - HiveInterface.fetchAll(). I know we have scripts that call FetchAll() or fetchOne() on queries that probably do not have one. I wanted to make sure this will not be a breaking change to existing code.
        Hide
        Thejas M Nair added a comment -

        HiveInterface is specific to hiveserver1, so this HS2 change will have no impact.

        Show
        Thejas M Nair added a comment - HiveInterface is specific to hiveserver1, so this HS2 change will have no impact.
        Hide
        Edward Capriolo added a comment -

        Ok makes sense.

        Show
        Edward Capriolo added a comment - Ok makes sense.
        Hide
        Ashutosh Chauhan added a comment -

        This issue has been fixed and released as part of 0.12 release. If you find further issues, please create a new jira and link it to this one.

        Show
        Ashutosh Chauhan added a comment - This issue has been fixed and released as part of 0.12 release. If you find further issues, please create a new jira and link it to this one.

          People

          • Assignee:
            Vaibhav Gumashta
            Reporter:
            Vaibhav Gumashta
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development