Replies: 0
I have created 2 tables belos is the schema:
create external table test_date(
first_date DATE,last_date DATE,name string)
row format delimited
fields terminated by ‘|’
location ‘/data/test_date';
create external table part_test_date(
last_date DATE,name string)
PARTITIONED by (first_date date)
STORED AS ORC
location ‘/ORC/test_date';
I used below command to add some data into partitioned table.
insert overwrite table part_test_date partition(first_date) select
last_date,name,first_date
from test_date where first_date between ‘2014-10-01′ and ‘2014-10-15′;
When I use below query the data is retrived in a correctly.
select * from part_test_date where first_date between ‘2014-10-01′ and ‘2014-10-15′;
But when i fire below query I get result as a NULL.
select first_date from part_test_date where first_date between ‘2014-10-01′ and ‘2014-10-15′;
NULL
NULL
NULL
NULL
NULL
NULL
Please let me know what is wrong here.