You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Arun Kumar Srinivasan (JIRA)" <ji...@apache.org> on 2016/08/11 16:25:20 UTC

[jira] [Issue Comment Deleted] (HIVE-13328) Cannot Quey Hive External Returning 0 values

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

Arun Kumar Srinivasan updated HIVE-13328:
-----------------------------------------
    Comment: was deleted

(was: Checked the hive external partition table as text file and ORC. Check the steps below. 

HIVE PARTITION 
-----------------------------------------------------

// Unix prompt

vi input_2015.txt

1,Name1,Dep1,1981
3,Name3,Dep3,1982

vi input_2016.txt

2,Name2,Dep2,1986
2,Name4,Dep4,1988

hdfs dfs -rm /user/yarn/hive/issue/input*

hdfs dfs -copyFromLocal input*.txt /user/yarn/hive/issue

hdfs dfs -ls -h /user/yarn/hive/issue/input*


// HIVE prompt

drop table test_partition;

CREATE EXTERNAL TABLE IF NOT EXISTS test_partition ( id int, name String, department String, dob String)
PARTITIONED BY (yoj INT, moj STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
STORED AS TEXTFILE
location '/user/yarn/hive/issue';

LOAD DATA INPATH '/user/yarn/hive/issue/input_2015.txt' INTO TABLE test_partition PARTITION (yoj=2015, moj='01');

LOAD DATA INPATH '/user/yarn/hive/issue/input_2016.txt' INTO TABLE test_partition PARTITION (yoj=2016, moj='01');

SELECT * FROM test_partition;

// ORC TABLE

CREATE EXTERNAL TABLE IF NOT EXISTS test_partition_orc ( id int, name String, department String, dob String)
PARTITIONED BY (yoj INT, moj STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
STORED AS ORC
location '/user/yarn/hive/issue';

LOAD DATA INPATH '/user/yarn/hive/issue/input_2015.txt' INTO TABLE test_partition_orc PARTITION (yoj=2015, moj='01');

LOAD DATA INPATH '/user/yarn/hive/issue/input_2016.txt' INTO TABLE test_partition_orc PARTITION (yoj=2016, moj='01');


SELECT * FROM test_partition_orc;
)

> Cannot Quey Hive External Returning 0 values
> --------------------------------------------
>
>                 Key: HIVE-13328
>                 URL: https://issues.apache.org/jira/browse/HIVE-13328
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 0.13.0
>         Environment: MAPRFS
>            Reporter: bharath kumar
>            Assignee: Arun Kumar Srinivasan
>            Priority: Blocker
>
> Having Issues with Involving ORC format and external table.Below are the sequence of steps followed.
>  
> created an external table
> using insert overwrite data is populated to external table with partition.
> insert overwrite table external_table partition (data_date='2016-22-03')
> select ....from (select * from db3.table1
> where data_date = '2016-22-03') i
> left join (select * from db3.table2 where data_date = '2016-22-03') th on i.column1 = th.column1 and
> i.column2 = th.column2;
>  
> But when i query the external table data is not present. Tried below procedures like 
> ALTER TABLE NAME ADD PARTITION(DATA_DATE='2016-22-03');
> MSCK REPAIR TABLE TABLENAME;
> OK
> Partitions not in metastore:   
> What could be the issue?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)