that explains a lot...
Is there a list of reserved keywords ?
On Wed, Feb 11, 2015 at 7:56 AM, Yin Huai wrote:
> Regarding backticks: Right. You need backticks to quote the column name
> timestamp because timestamp is a reserved keyword in our parser.
>
> On Tue, Feb 10, 2015 at 3:02 PM, Mohnis
Regarding backticks: Right. You need backticks to quote the column name
timestamp because timestamp is a reserved keyword in our parser.
On Tue, Feb 10, 2015 at 3:02 PM, Mohnish Kodnani
wrote:
> actually i tried in spark shell , got same error and then for some reason
> i tried to back tick the
actually i tried in spark shell , got same error and then for some reason i
tried to back tick the "timestamp" and it worked.
val result = sqlContext.sql("select toSeconds(`timestamp`) as t,
count(rid) as qps from blah group by toSeconds(`timestamp`),qi.clientName")
so, it seems sql context is su
The simple SQL parser doesn't yet support UDFs. Try using a HiveContext.
On Tue, Feb 10, 2015 at 1:44 PM, Mohnish Kodnani
wrote:
> Hi,
> I am trying a very simple registerFunction and it is giving me errors.
>
> I have a parquet file which I register as temp table.
> Then I define a UDF.
>
> de
Hi,
I am trying a very simple registerFunction and it is giving me errors.
I have a parquet file which I register as temp table.
Then I define a UDF.
def toSeconds(timestamp: Long): Long = timestamp/10
sqlContext.registerFunction("toSeconds", toSeconds _)
val result = sqlContext.sql("select