hi,
Thanks for help.

Actually i didn't declare the  function.
Can you give me the best way so solve this problem.


Here i am explaining my problem:

I have 3 tables and i have to find the maximum element in each table.


Table1 Table2  Table3
21 31 41
55 1 12
32 19 96
2 14 28












Then greater element in each tables are

Maximum elements
55 31 96



And i want the final result as the  The maximum  element is 96 from the
Table 3 or
96 with the index 3.


Thanks for your help again.

On Wed, Apr 6, 2016 at 2:11 AM, Ted Yu <yuzhih...@gmail.com> wrote:

> The error was due to REPL expecting an integer (index to the Array)
> whereas "MAX(count)" was a String.
>
> What do you want to achieve ?
>
> On Tue, Apr 5, 2016 at 4:17 AM, Angel Angel <areyouange...@gmail.com>
> wrote:
>
>> Hello,
>>
>> i am writing one spark application i which i need the index of the
>> maximum element.
>>
>> My table has one column only and i want the index of the maximum element.
>>
>> MAX(count)
>> 23
>> 32
>> 3
>> Here is my code the data type of the array is
>> org.apache.spark.sql.Dataframe.
>>
>>
>> Thanks in advance.
>> Also please suggest me to do it in another way.
>>
>> [image: Inline image 1]
>>
>
>

Reply via email to