Re: SparkSQL Timestamp query failure

2015-03-30 Thread anu
Hi Alessandro Could you specify which query were you able to run successfully? 1. sqlContext.sql("SELECT * FROM Logs as l where l.timestamp = '2012-10-08 16:10:36' ").collect OR 2. sqlContext.sql("SELECT * FROM Logs as l where cast(l.timestamp as string) = '2012-10-08 16:10:36.0').collect I

Re: SparkSQL Timestamp query failure

2015-03-02 Thread anu
Thank you Alessandro :) On Tue, Mar 3, 2015 at 10:03 AM, whitebread [via Apache Spark User List] < ml-node+s1001560n2188...@n3.nabble.com> wrote: > Anu, > > 1) I defined my class Header as it follows: > > case class Header(timestamp: java.sql.Timestamp, c_ip: String, > cs_username: String, s_ip:

Re: SparkSQL Timestamp query failure

2015-03-02 Thread anu
Can you please post how did you overcome this issue. -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/SparkSQL-Timestamp-query-failure-tp19502p21868.html Sent from the Apache Spark User List mailing list archive at Nabble.com. ---

Re: SparkSQL Timestamp query failure

2014-11-23 Thread whitebread
as “timestamp” is the keyword of data type in > Hive/Spark SQL.) > >   <> > From: Alessandro Panebianco [mailto:[hidden email] > ] > Sent: Monday, November 24, 2014 11:12 AM > To: Wang, Daoyuan > Cc: [hidden email] > Subject: Re: SparkSQL Timestamp query failure

RE: SparkSQL Timestamp query failure

2014-11-23 Thread Cheng, Hao
the keyword of data type in Hive/Spark SQL.) From: Alessandro Panebianco [mailto:ale.panebia...@me.com] Sent: Monday, November 24, 2014 11:12 AM To: Wang, Daoyuan Cc: u...@spark.incubator.apache.org Subject: Re: SparkSQL Timestamp query failure Hey Daoyuan, following your suggestion I obtain the

Re: SparkSQL Timestamp query failure

2014-11-23 Thread Alessandro Panebianco
4 12:11 AM > To: u...@spark.incubator.apache.org > Subject: Re: SparkSQL Timestamp query failure > > Thanks for your answer Akhil, > > I have already tried that and the query actually doesn't fail but it doesn't > return anything either as it should. > Using single quo

RE: SparkSQL Timestamp query failure

2014-11-23 Thread Wang, Daoyuan
Hi, I think you can try cast(l.timestamp as string)='2012-10-08 16:10:36.0' Thanks, Daoyuan -Original Message- From: whitebread [mailto:ale.panebia...@me.com] Sent: Sunday, November 23, 2014 12:11 AM To: u...@spark.incubator.apache.org Subject: Re: SparkSQL Timestamp que

Re: SparkSQL Timestamp query failure

2014-11-22 Thread whitebread
Thanks for your answer Akhil, I have already tried that and the query actually doesn't fail but it doesn't return anything either as it should. Using single quotes I think it reads it as a string and not as a timestamp. I don't know how to solve this. Any other hint by any chance? Thanks, Ale

Re: SparkSQL Timestamp query failure

2014-11-22 Thread Akhil Das
What about sqlContext.sql("SELECT * FROM Logs as l where l.timestamp=*'2012-10-08 16:10:36.0'*").collect You might need to quote the timestamp it looks like. Thanks Best Regards On Sat, Nov 22, 2014 at 12:09 AM, whitebread wrote: > Hi all, > > I put some log files into sql tables through Spar