spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillermo Ortiz <konstt2...@gmail.com>
Subject Re: SparkSQL, executing an "OR"
Date Tue, 03 Mar 2015 13:13:55 GMT
thanks, it works.

2015-03-03 13:32 GMT+01:00 Cheng, Hao <hao.cheng@intel.com>:
> Using where('age >=10 && 'age <=4) instead.
>
> -----Original Message-----
> From: Guillermo Ortiz [mailto:konstt2000@gmail.com]
> Sent: Tuesday, March 3, 2015 5:14 PM
> To: user
> Subject: SparkSQL, executing an "OR"
>
> I'm trying to execute a query with Spark.
>
> (Example from the Spark Documentation)
> val teenagers = people.where('age >= 10).where('age <= 19).select('name)
>
> Is it possible to execute an OR with this syntax?
> val teenagers = people.where('age >= 10 'or 'age <= 4).where('age <=
> 19).select('name)
>
> I have tried different ways and I didn't get it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org For additional commands, e-mail:
user-help@spark.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message