Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9446

JDBC DatabaseMetadata.getColumns() does not work for temporary tables

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.14.0
    • Fix Version/s: 1.1.0
    • Component/s: JDBC
    • Labels:
      None

      Description

      After creating temporary table, calling DatabaseMetadData.getColumns() hits error "UnknownTableException(message:default.tmp_07 table not found)"

        Activity

        Hide
        jdere Jason Dere added a comment -

        Hive temp tables use SessionHiveMetaStoreClient to override certain methods of HiveMetaStoreClient to allow the metadata API calls to support temp tables. getColumns() uses getSchema(), which was not overridden in SessionHiveMetaStoreClient. Attaching patch which overrides getSchema() and test case.

        Show
        jdere Jason Dere added a comment - Hive temp tables use SessionHiveMetaStoreClient to override certain methods of HiveMetaStoreClient to allow the metadata API calls to support temp tables. getColumns() uses getSchema(), which was not overridden in SessionHiveMetaStoreClient. Attaching patch which overrides getSchema() and test case.
        Hide
        thejas Thejas M Nair added a comment -

        +1

        Show
        thejas Thejas M Nair added a comment - +1
        Hide
        hiveqa Hive QA added a comment -

        Overall: -1 at least one tests failed

        Here are the results of testing the latest attachment:
        https://issues.apache.org/jira/secure/attachment/12693961/HIVE-9446.1.patch

        ERROR: -1 due to 63 failed/errored test(s), 7347 tests executed
        Failed tests:

        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_archive_excludeHadoop20
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_archive_multi
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join11
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join12
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join13
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join27
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join4
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join5
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join8
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_cbo_simple_select
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_cbo_subq_in
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_column_access_stats
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_constantPropagateForSubQuery
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_correlationoptimizer1
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_correlationoptimizer6
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_correlationoptimizer8
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_explain_logical
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_filter_join_breaktask
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_filter_join_breaktask2
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_groupby_sort_1_23
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_groupby_sort_skew_1_23
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_metadataOnlyOptimizer
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_metadataonly1
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_gby2
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_join_filter
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_outer_join5
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_union_view
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_vc
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_rcfile_union
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_smb_mapjoin_25
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_in
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_in_having
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_notin
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_notin_having
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_views
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_table_access_keys_stats
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udaf_covar_pop
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union24
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union28
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union30
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_null
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_10
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_2
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_5
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_6_subq
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_8
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_9
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_vector_decimal_mapjoin
        org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_vector_mapjoin_reduce
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_cbo_simple_select
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_cbo_subq_in
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_dynamic_partition_pruning
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_dynamic_partition_pruning_2
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_filter_join_breaktask
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_filter_join_breaktask2
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_mrr
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_subquery_in
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vector_decimal_mapjoin
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vector_mapjoin_reduce
        org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vectorized_dynamic_partition_pruning
        org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_constprog_partitioner
        org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_ql_rewrite_gbtoidx_cbo_1
        org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_ql_rewrite_gbtoidx_cbo_2
        

        Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2489/testReport
        Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2489/console
        Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-2489/

        Messages:

        Executing org.apache.hive.ptest.execution.PrepPhase
        Executing org.apache.hive.ptest.execution.ExecutionPhase
        Executing org.apache.hive.ptest.execution.ReportingPhase
        Tests exited with: TestsFailedException: 63 tests failed
        

        This message is automatically generated.

        ATTACHMENT ID: 12693961 - PreCommit-HIVE-TRUNK-Build

        Show
        hiveqa Hive QA added a comment - Overall : -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12693961/HIVE-9446.1.patch ERROR: -1 due to 63 failed/errored test(s), 7347 tests executed Failed tests: org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_archive_excludeHadoop20 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_archive_multi org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join11 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join12 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join13 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join27 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join4 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join5 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_auto_join8 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_cbo_simple_select org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_cbo_subq_in org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_column_access_stats org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_constantPropagateForSubQuery org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_correlationoptimizer1 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_correlationoptimizer6 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_correlationoptimizer8 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_explain_logical org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_filter_join_breaktask org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_filter_join_breaktask2 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_groupby_sort_1_23 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_groupby_sort_skew_1_23 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_metadataOnlyOptimizer org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_metadataonly1 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_gby2 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_join_filter org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_outer_join5 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_union_view org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_ppd_vc org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_rcfile_union org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_smb_mapjoin_25 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_in org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_in_having org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_notin org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_notin_having org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_subquery_views org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_table_access_keys_stats org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_udaf_covar_pop org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union24 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union28 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union30 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_null org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_10 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_2 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_5 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_6_subq org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_8 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_union_remove_9 org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_vector_decimal_mapjoin org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver_vector_mapjoin_reduce org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_cbo_simple_select org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_cbo_subq_in org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_dynamic_partition_pruning org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_dynamic_partition_pruning_2 org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_filter_join_breaktask org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_filter_join_breaktask2 org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_mrr org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_subquery_in org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vector_decimal_mapjoin org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vector_mapjoin_reduce org.apache.hadoop.hive.cli.TestMiniTezCliDriver.testCliDriver_vectorized_dynamic_partition_pruning org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_constprog_partitioner org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_ql_rewrite_gbtoidx_cbo_1 org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_ql_rewrite_gbtoidx_cbo_2 Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2489/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/2489/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-2489/ Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 63 tests failed This message is automatically generated. ATTACHMENT ID: 12693961 - PreCommit-HIVE-TRUNK-Build
        Hide
        jdere Jason Dere added a comment -

        Failures do not look related to the patch. udaf_covar_pop.q does not fail locally, and the other 62 failures appear to have been failing recently during other precommit tests as well.

        Show
        jdere Jason Dere added a comment - Failures do not look related to the patch. udaf_covar_pop.q does not fail locally, and the other 62 failures appear to have been failing recently during other precommit tests as well.
        Hide
        jdere Jason Dere added a comment -

        Committed to trunk

        Show
        jdere Jason Dere added a comment - Committed to trunk

          People

          • Assignee:
            jdere Jason Dere
            Reporter:
            jdere Jason Dere
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development