You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Renuka Be <re...@gmail.com> on 2015/07/31 07:43:42 UTC
Regarding query in HiveResultSet
Hi Folks,
I want to find Max value from the HiveResult. There is option listed in
HiveResultSet properties "HiveResultSet.Max()". When i use this
'HiveResultSet.Max()' it throws exception.
Error : At least one object must implement IComparable.
Is there any way to find Min, Max from the HiveResultSet?
Thanks,
Renuka N.
Re: Regarding query in HiveResultSet
Posted by Nitin Pawar <ni...@gmail.com>.
why don't you get those as result of query results instead of iterating
through all on c# side?
your query can directly provide min and max
is there is a specific thing which is blocking you from getting from hive
and do it on application side?
On Fri, Jul 31, 2015 at 4:14 PM, Renuka Be <re...@gmail.com> wrote:
> I have used hive query to get column values that returns HiveResultSet. I
> need to find Min and Max value in HiveResultSet in code level.
> Is there any possibility. I am using c#.
>
> -Renuka N
>
>
> On Fri, Jul 31, 2015 at 3:29 AM, Nitin Pawar <ni...@gmail.com>
> wrote:
>
>> then why not just use max function?
>>
>> select max(a) from (select sum(a) as a, b from t group by b)n
>>
>> On Fri, Jul 31, 2015 at 12:48 PM, Renuka Be <re...@gmail.com>
>> wrote:
>>
>>> Hi Nitin,
>>>
>>> I am using hive query.
>>>
>>> Regards,
>>> Renuka N.
>>>
>>> On Fri, Jul 31, 2015 at 2:42 AM, Nitin Pawar <ni...@gmail.com>
>>> wrote:
>>>
>>>> are you writing your java code using hive or you are writing hive
>>>> query?
>>>>
>>>> On Fri, Jul 31, 2015 at 11:13 AM, Renuka Be <re...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi Folks,
>>>>>
>>>>> I want to find Max value from the HiveResult. There is option listed
>>>>> in HiveResultSet properties "HiveResultSet.Max()". When i use this
>>>>> 'HiveResultSet.Max()' it throws exception.
>>>>>
>>>>> Error : At least one object must implement IComparable.
>>>>>
>>>>> Is there any way to find Min, Max from the HiveResultSet?
>>>>>
>>>>> Thanks,
>>>>> Renuka N.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Nitin Pawar
>>>>
>>>
>>>
>>
>>
>> --
>> Nitin Pawar
>>
>
>
--
Nitin Pawar
Re: Regarding query in HiveResultSet
Posted by Renuka Be <re...@gmail.com>.
I have used hive query to get column values that returns HiveResultSet. I
need to find Min and Max value in HiveResultSet in code level.
Is there any possibility. I am using c#.
-Renuka N
On Fri, Jul 31, 2015 at 3:29 AM, Nitin Pawar <ni...@gmail.com>
wrote:
> then why not just use max function?
>
> select max(a) from (select sum(a) as a, b from t group by b)n
>
> On Fri, Jul 31, 2015 at 12:48 PM, Renuka Be <re...@gmail.com>
> wrote:
>
>> Hi Nitin,
>>
>> I am using hive query.
>>
>> Regards,
>> Renuka N.
>>
>> On Fri, Jul 31, 2015 at 2:42 AM, Nitin Pawar <ni...@gmail.com>
>> wrote:
>>
>>> are you writing your java code using hive or you are writing hive query?
>>>
>>> On Fri, Jul 31, 2015 at 11:13 AM, Renuka Be <re...@gmail.com>
>>> wrote:
>>>
>>>> Hi Folks,
>>>>
>>>> I want to find Max value from the HiveResult. There is option listed in
>>>> HiveResultSet properties "HiveResultSet.Max()". When i use this
>>>> 'HiveResultSet.Max()' it throws exception.
>>>>
>>>> Error : At least one object must implement IComparable.
>>>>
>>>> Is there any way to find Min, Max from the HiveResultSet?
>>>>
>>>> Thanks,
>>>> Renuka N.
>>>>
>>>
>>>
>>>
>>> --
>>> Nitin Pawar
>>>
>>
>>
>
>
> --
> Nitin Pawar
>
Re: Regarding query in HiveResultSet
Posted by Nitin Pawar <ni...@gmail.com>.
then why not just use max function?
select max(a) from (select sum(a) as a, b from t group by b)n
On Fri, Jul 31, 2015 at 12:48 PM, Renuka Be <re...@gmail.com> wrote:
> Hi Nitin,
>
> I am using hive query.
>
> Regards,
> Renuka N.
>
> On Fri, Jul 31, 2015 at 2:42 AM, Nitin Pawar <ni...@gmail.com>
> wrote:
>
>> are you writing your java code using hive or you are writing hive query?
>>
>> On Fri, Jul 31, 2015 at 11:13 AM, Renuka Be <re...@gmail.com>
>> wrote:
>>
>>> Hi Folks,
>>>
>>> I want to find Max value from the HiveResult. There is option listed in
>>> HiveResultSet properties "HiveResultSet.Max()". When i use this
>>> 'HiveResultSet.Max()' it throws exception.
>>>
>>> Error : At least one object must implement IComparable.
>>>
>>> Is there any way to find Min, Max from the HiveResultSet?
>>>
>>> Thanks,
>>> Renuka N.
>>>
>>
>>
>>
>> --
>> Nitin Pawar
>>
>
>
--
Nitin Pawar
Re: Regarding query in HiveResultSet
Posted by Renuka Be <re...@gmail.com>.
Hi Nitin,
I am using hive query.
Regards,
Renuka N.
On Fri, Jul 31, 2015 at 2:42 AM, Nitin Pawar <ni...@gmail.com>
wrote:
> are you writing your java code using hive or you are writing hive query?
>
> On Fri, Jul 31, 2015 at 11:13 AM, Renuka Be <re...@gmail.com>
> wrote:
>
>> Hi Folks,
>>
>> I want to find Max value from the HiveResult. There is option listed in
>> HiveResultSet properties "HiveResultSet.Max()". When i use this
>> 'HiveResultSet.Max()' it throws exception.
>>
>> Error : At least one object must implement IComparable.
>>
>> Is there any way to find Min, Max from the HiveResultSet?
>>
>> Thanks,
>> Renuka N.
>>
>
>
>
> --
> Nitin Pawar
>
Re: Regarding query in HiveResultSet
Posted by Nitin Pawar <ni...@gmail.com>.
are you writing your java code using hive or you are writing hive query?
On Fri, Jul 31, 2015 at 11:13 AM, Renuka Be <re...@gmail.com> wrote:
> Hi Folks,
>
> I want to find Max value from the HiveResult. There is option listed in
> HiveResultSet properties "HiveResultSet.Max()". When i use this
> 'HiveResultSet.Max()' it throws exception.
>
> Error : At least one object must implement IComparable.
>
> Is there any way to find Min, Max from the HiveResultSet?
>
> Thanks,
> Renuka N.
>
--
Nitin Pawar