Re: Filter on a column having multiple values

2016-02-24 Thread Yin Yang
However, when the number of choices gets big, the following notation becomes cumbersome. On Wed, Feb 24, 2016 at 3:41 PM, Mich Talebzadeh < mich.talebza...@cloudtechnologypartners.co.uk> wrote: > You can use operators here. > > t.filter($"column1" === 1 || $"column1" === 2) > > > > > > On 24/02/

Re: Filter on a column having multiple values

2016-02-24 Thread Mich Talebzadeh
You can use operators here. t.filter($"column1" === 1 || $"column1" === 2) On 24/02/2016 22:40, Ashok Kumar wrote: > Hi, > > I would like to do the following > > select count(*) from where column1 in (1,5)) > > I define > > scala> var t = HiveContext.table("table") > > This work

Re: Filter on a column having multiple values

2016-02-24 Thread Michael Armbrust
You can do this either with expr("... IN ...") or isin. Here is a full example . On Wed, Feb 24, 2016 at 2:40 PM, Ashok Kumar wrote