You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Naresh P R (Jira)" <ji...@apache.org> on 2020/10/09 21:51:00 UTC

[jira] [Updated] (HIVE-24255) StorageHandler with select-limit query is returning 0 rows

     [ https://issues.apache.org/jira/browse/HIVE-24255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Naresh P R updated HIVE-24255:
------------------------------
    Description: 
 
{code:java}
CREATE EXTERNAL TABLE test_table(db_id bigint, db_location_uri string, name string, owner_name string, owner_type string)
STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
TBLPROPERTIES ('hive.sql.database.type'='METASTORE', 'hive.sql.query'='SELECT `DB_ID`, `DB_LOCATION_URI`, `NAME`, `OWNER_NAME`, `OWNER_TYPE` FROM `DBS`');
==> Wrong Result <==
set hive.limit.optimize.enable=true;
select * from test_table limit 1;
----------------------------------------------------------------------------------------------
 VERTICES MODE STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
----------------------------------------------------------------------------------------------
Map 1 .......... container SUCCEEDED 0 0 0 0 0 0
----------------------------------------------------------------------------------------------
VERTICES: 01/01 [==========================>>] 100% ELAPSED TIME: 0.91 s
----------------------------------------------------------------------------------------------
+------------+----------------------+-----------+-----------------+-----------------+
| dbs.db_id | dbs.db_location_uri | dbs.name | dbs.owner_name | dbs.owner_type |
+------------+----------------------+-----------+-----------------+-----------------+
+------------+----------------------+-----------+-----------------+-----------------+
==> Correct Result <==
set hive.limit.optimize.enable=false;
select * from test_table limit 1;
----------------------------------------------------------------------------------------------
 VERTICES MODE STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
----------------------------------------------------------------------------------------------
Map 1 .......... container SUCCEEDED 1 1 0 0 0 0
----------------------------------------------------------------------------------------------
VERTICES: 01/01 [==========================>>] 100% ELAPSED TIME: 4.11 s
----------------------------------------------------------------------------------------------
+------------+----------------------------------------------------+-----------+-----------------+-----------------+
| dbs.db_id | dbs.db_location_uri | dbs.name | dbs.owner_name | dbs.owner_type |
+------------+----------------------------------------------------+-----------+-----------------+-----------------+
| 1 | hdfs://abcd:8020/warehouse/tablespace/managed/hive | default | public | ROLE |
-----------------------------------------------------------------------------------------------------
{code}
 

  was:
 
{code:java}
CREATE EXTERNAL TABLE test_table(db_id bigint, db_location_uri string, name string, owner_name string, owner_type string)
STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
TBLPROPERTIES ('hive.sql.database.type'='METASTORE', 'hive.sql.query'='SELECT `DB_ID`, `DB_LOCATION_URI`, `NAME`, `OWNER_NAME`, `OWNER_TYPE` FROM `DBS`');
==> Wrong Result <==
set hive.limit.optimize.enable=true;
select * from test_table limit 1;
----------------------------------------------------------------------------------------------
 VERTICES MODE STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
----------------------------------------------------------------------------------------------
Map 1 .......... container SUCCEEDED 0 0 0 0 0 0
----------------------------------------------------------------------------------------------
VERTICES: 01/01 [==========================>>] 100% ELAPSED TIME: 0.91 s
----------------------------------------------------------------------------------------------
+------------+----------------------+-----------+-----------------+-----------------+
| dbs.db_id | dbs.db_location_uri | dbs.name | dbs.owner_name | dbs.owner_type |
+------------+----------------------+-----------+-----------------+-----------------+
+------------+----------------------+-----------+-----------------+-----------------+
==> Correct Result <==
set hive.limit.optimize.enable=false;
select * from test_table limit 1;
----------------------------------------------------------------------------------------------
 VERTICES MODE STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
----------------------------------------------------------------------------------------------
Map 1 .......... container SUCCEEDED 1 1 0 0 0 0
----------------------------------------------------------------------------------------------
VERTICES: 01/01 [==========================>>] 100% ELAPSED TIME: 4.11 s
----------------------------------------------------------------------------------------------
+------------+----------------------------------------------------+-----------+-----------------+-----------------+
| dbs.db_id | dbs.db_location_uri | dbs.name | dbs.owner_name | dbs.owner_type |
+------------+----------------------------------------------------+-----------+-----------------+-----------------+
| 1 | hdfs://abcd:8020/warehouse/tablespace/managed/hive | default | public | ROLE |
{code}

+------------+----------------------------------------------------+-----------+-----------------+-----------------+


> StorageHandler with select-limit query is returning 0 rows
> ----------------------------------------------------------
>
>                 Key: HIVE-24255
>                 URL: https://issues.apache.org/jira/browse/HIVE-24255
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Naresh P R
>            Assignee: Naresh P R
>            Priority: Major
>
>  
> {code:java}
> CREATE EXTERNAL TABLE test_table(db_id bigint, db_location_uri string, name string, owner_name string, owner_type string)
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES ('hive.sql.database.type'='METASTORE', 'hive.sql.query'='SELECT `DB_ID`, `DB_LOCATION_URI`, `NAME`, `OWNER_NAME`, `OWNER_TYPE` FROM `DBS`');
> ==> Wrong Result <==
> set hive.limit.optimize.enable=true;
> select * from test_table limit 1;
> ----------------------------------------------------------------------------------------------
>  VERTICES MODE STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
> ----------------------------------------------------------------------------------------------
> Map 1 .......... container SUCCEEDED 0 0 0 0 0 0
> ----------------------------------------------------------------------------------------------
> VERTICES: 01/01 [==========================>>] 100% ELAPSED TIME: 0.91 s
> ----------------------------------------------------------------------------------------------
> +------------+----------------------+-----------+-----------------+-----------------+
> | dbs.db_id | dbs.db_location_uri | dbs.name | dbs.owner_name | dbs.owner_type |
> +------------+----------------------+-----------+-----------------+-----------------+
> +------------+----------------------+-----------+-----------------+-----------------+
> ==> Correct Result <==
> set hive.limit.optimize.enable=false;
> select * from test_table limit 1;
> ----------------------------------------------------------------------------------------------
>  VERTICES MODE STATUS TOTAL COMPLETED RUNNING PENDING FAILED KILLED
> ----------------------------------------------------------------------------------------------
> Map 1 .......... container SUCCEEDED 1 1 0 0 0 0
> ----------------------------------------------------------------------------------------------
> VERTICES: 01/01 [==========================>>] 100% ELAPSED TIME: 4.11 s
> ----------------------------------------------------------------------------------------------
> +------------+----------------------------------------------------+-----------+-----------------+-----------------+
> | dbs.db_id | dbs.db_location_uri | dbs.name | dbs.owner_name | dbs.owner_type |
> +------------+----------------------------------------------------+-----------+-----------------+-----------------+
> | 1 | hdfs://abcd:8020/warehouse/tablespace/managed/hive | default | public | ROLE |
> -----------------------------------------------------------------------------------------------------
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)