You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Jeff Zhang <zj...@gmail.com> on 2011/01/07 09:50:20 UTC
Find a case that does not make sense in hive
Hi all
I create a table with a partition. Then I import data into this table
without specify partition, in this case I cannot retrieval data from
this table using select statement.
But I can retrieve data when importing data with specify partition.
So I think since hive do not allow me to retrieve data in the first
case, it should not allow me to import data without specify partition
--
Best Regards
Jeff Zhang
Re: Find a case that does not make sense in hive
Posted by Edward Capriolo <ed...@gmail.com>.
On Fri, Jan 7, 2011 at 5:17 AM, 김영우 <wa...@gmail.com> wrote:
> Hi Vaibhav,
> Which version do you use for testing?
> In Hive 0.7 (trunk, I'm currently using), Both 'INSERT OVERWRITE ... SELECT'
> and 'LOAD DATA ..' statements throw an error when I try to insert data into
> a partitioned table without specifying a 'PARTITION' clause.
> - Youngwoo
>
> 2011/1/7 vaibhav negi <ss...@gmail.com>
>>
>> Hi Youngwoo,
>>
>> Hive allows u to load data into a partiotioned table without specifying
>> partiiton column value.
>>
>> I did this simple test.
>>
>> 1. create hive table with 1 partition coulumn
>> 2. load data into table without specifying partition column, got success
>> message.
>> 3. can see data file in hadoop, but if u query hive, u can't access that.
>>
>> It's a bug
>>
>> Thanks and Regards
>>
>> Vaibhav Negi
>>
>>
>> On Fri, Jan 7, 2011 at 3:17 PM, 김영우 <wa...@gmail.com> wrote:
>>>
>>> Hi Jeff,
>>> How could you insert data into a partitioned table without specify
>>> partition columns or value?
>>>
>>> - Youngwoo
>>>
>>> 2011/1/7 Jeff Zhang <zj...@gmail.com>
>>>>
>>>> Hi all
>>>>
>>>> I create a table with a partition. Then I import data into this table
>>>> without specify partition, in this case I cannot retrieval data from
>>>> this table using select statement.
>>>> But I can retrieve data when importing data with specify partition.
>>>>
>>>> So I think since hive do not allow me to retrieve data in the first
>>>> case, it should not allow me to import data without specify partition
>>>>
>>>>
>>>> --
>>>> Best Regards
>>>>
>>>> Jeff Zhang
>>>
>>
>
>
Even if you can do it, you should not because it is not the proper
usage of a partitioned table to put data in the parent folder outside
of the partition.
Re: Find a case that does not make sense in hive
Posted by 김영우 <wa...@gmail.com>.
Hi Vaibhav,
Which version do you use for testing?
In Hive 0.7 (trunk, I'm currently using), Both 'INSERT OVERWRITE ... SELECT'
and 'LOAD DATA ..' statements throw an error when I try to insert data into
a partitioned table without specifying a 'PARTITION' clause.
- Youngwoo
2011/1/7 vaibhav negi <ss...@gmail.com>
>
> Hi Youngwoo,
>
> Hive allows u to load data into a partiotioned table without specifying
> partiiton column value.
>
> I did this simple test.
>
> 1. create hive table with 1 partition coulumn
> 2. load data into table without specifying partition column, got success
> message.
> 3. can see data file in hadoop, but if u query hive, u can't access that.
>
> It's a bug
>
> Thanks and Regards
>
> Vaibhav Negi
>
>
>
> On Fri, Jan 7, 2011 at 3:17 PM, 김영우 <wa...@gmail.com> wrote:
>
>> Hi Jeff,
>>
>> How could you insert data into a partitioned table without specify
>> partition columns or value?
>>
>>
>> - Youngwoo
>>
>> 2011/1/7 Jeff Zhang <zj...@gmail.com>
>>
>> Hi all
>>>
>>> I create a table with a partition. Then I import data into this table
>>> without specify partition, in this case I cannot retrieval data from
>>> this table using select statement.
>>> But I can retrieve data when importing data with specify partition.
>>>
>>> So I think since hive do not allow me to retrieve data in the first
>>> case, it should not allow me to import data without specify partition
>>>
>>>
>>> --
>>> Best Regards
>>>
>>> Jeff Zhang
>>>
>>
>>
>
Re: Find a case that does not make sense in hive
Posted by vaibhav negi <ss...@gmail.com>.
Hi Youngwoo,
Hive allows u to load data into a partiotioned table without specifying
partiiton column value.
I did this simple test.
1. create hive table with 1 partition coulumn
2. load data into table without specifying partition column, got success
message.
3. can see data file in hadoop, but if u query hive, u can't access that.
It's a bug
Thanks and Regards
Vaibhav Negi
On Fri, Jan 7, 2011 at 3:17 PM, 김영우 <wa...@gmail.com> wrote:
> Hi Jeff,
>
> How could you insert data into a partitioned table without specify
> partition columns or value?
>
>
> - Youngwoo
>
> 2011/1/7 Jeff Zhang <zj...@gmail.com>
>
> Hi all
>>
>> I create a table with a partition. Then I import data into this table
>> without specify partition, in this case I cannot retrieval data from
>> this table using select statement.
>> But I can retrieve data when importing data with specify partition.
>>
>> So I think since hive do not allow me to retrieve data in the first
>> case, it should not allow me to import data without specify partition
>>
>>
>> --
>> Best Regards
>>
>> Jeff Zhang
>>
>
>
Re: Find a case that does not make sense in hive
Posted by 김영우 <wa...@gmail.com>.
Hi Jeff,
How could you insert data into a partitioned table without specify partition
columns or value?
- Youngwoo
2011/1/7 Jeff Zhang <zj...@gmail.com>
> Hi all
>
> I create a table with a partition. Then I import data into this table
> without specify partition, in this case I cannot retrieval data from
> this table using select statement.
> But I can retrieve data when importing data with specify partition.
>
> So I think since hive do not allow me to retrieve data in the first
> case, it should not allow me to import data without specify partition
>
>
> --
> Best Regards
>
> Jeff Zhang
>