[
https://issues.apache.org/jira/browse/HIVE-13328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418675#comment-15418675
]
Arun Kumar Srinivasan commented on HIVE-13328:
----------------------------------------------
I am not able to make it work even without partition.
----------------------------------------------------------------------------------------
> 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 commands
hdfs dfs -rm -r /user/yarn/hive/issue
hdfs dfs -mkdir -p /user/yarn/hive/issue/alter
hdfs dfs -mkdir -p /user/yarn/hive/issue/alter_orc
hdfs dfs -mkdir -p /user/yarn/hive/issue/input
hdfs dfs -mkdir -p /user/yarn/hive/issue/orc
hdfs dfs -copyFromLocal input*.txt /user/yarn/hive/issue
// Hive queries
create database hive_issue_13328;
use hive_issue_13328;
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 //
drop table test_partition_orc;
CREATE EXTERNAL TABLE IF NOT EXISTS test_partition_orc ( id int, name String,
department String, dob String)
PARTITIONED BY (yoj1 INT, moj1 STRING)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
STORED AS ORC
location '/user/yarn/hive/issue/orc';
INSERT INTO TABLE test_partition_orc SELECT * FROM test_partition;
> 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)