Re: SparkSQL built in functions

2015-06-29 Thread Salih Oztop
Bob Corsaro Cc: Salih Oztop ; user Sent: Monday, June 29, 2015 9:52 PM Subject: Re: SparkSQL built in functions Interesting. Looking at the definitions, sql.functions.pow is defined only for (col,col). Just as an experiment, create a column with value 2 and see if that works.Cheers

Re: SparkSQL built in functions

2015-06-29 Thread Krishna Sankar
-TypeError >> Traceback (most recent call >> last) in ()> 1 df.select("name", >> (df.age)**2).show() >> TypeError: unsupported operand type(s) for ** or pow(): 'Column' and 'int' >> >

Re: SparkSQL built in functions

2015-06-29 Thread Bob Corsaro
)> 1 df.select("name", > (df.age)**2).show() > TypeError: unsupported operand type(s) for ** or pow(): 'Column' and 'int' > > > Moreover testing the functions individually they are working fine. > > pow(2,4) > > 16 > > 2**4 >

Re: SparkSQL built in functions

2015-06-29 Thread Salih Oztop
lect("name", (df.age)**2).show() TypeError: unsupported operand type(s) for ** or pow(): 'Column' and 'int' Moreover testing the functions individually they are working fine.pow(2,4) 162**4 16 Kind Regards Salih Oztop From: Bob Corsaro To: user Sent: Monday, June

SparkSQL built in functions

2015-06-29 Thread Bob Corsaro
I'm having trouble using "select pow(col) from table" It seems the function is not registered for SparkSQL. Is this on purpose or an oversight? I'm using pyspark.