You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by hagersaleh <lo...@yahoo.com> on 2015/04/12 14:44:16 UTC

how can Handling in flink this operation in sql bettween ,like , In


1- BETWEEN Operator  Sql Example 
SELECT * FROM Products
WHERE Price BETWEEN 10 AND 20; 
2- The SQL LIKE Operator Example
SELECT * FROM Customers
WHERE City LIKE 's%'; 
3-IN Operator Example
SELECT * FROM Customers
WHERE City IN ('Paris','London');



--
View this message in context: http://apache-flink-incubator-user-mailing-list-archive.2336050.n4.nabble.com/how-can-Handling-in-flink-this-operation-in-sql-bettween-like-In-tp985.html
Sent from the Apache Flink (Incubator) User Mailing List archive. mailing list archive at Nabble.com.

Re: how can Handling in flink this operation in sql bettween ,like , In

Posted by hagersaleh <lo...@yahoo.com>.
Thank you very much
example on like and in operation



--
View this message in context: http://apache-flink-incubator-user-mailing-list-archive.2336050.n4.nabble.com/how-can-Handling-in-flink-this-operation-in-sql-bettween-like-In-tp985p987.html
Sent from the Apache Flink (Incubator) User Mailing List archive. mailing list archive at Nabble.com.

Re: how can Handling in flink this operation in sql bettween ,like , In

Posted by Robert Metzger <rm...@apache.org>.
Hi,

all these operations can be implemented in Flink using the "filter()"
function.

For example BETWEEN:

DataSet<Product> products = env.createFromElements(...);
products..filter(new FilterFunction<Product>() {

   @Override
   public boolean filter(Product value) throws Exception {
      return value.price >= 10 && value.price <= 20;
   }
})


You can implement the other filters in a similar fashion.

Best,
Robert


On Sun, Apr 12, 2015 at 2:44 PM, hagersaleh <lo...@yahoo.com> wrote:

>
>
> 1- BETWEEN Operator  Sql Example
> SELECT * FROM Products
> WHERE Price BETWEEN 10 AND 20;
> 2- The SQL LIKE Operator Example
> SELECT * FROM Customers
> WHERE City LIKE 's%';
> 3-IN Operator Example
> SELECT * FROM Customers
> WHERE City IN ('Paris','London');
>
>
>
> --
> View this message in context:
> http://apache-flink-incubator-user-mailing-list-archive.2336050.n4.nabble.com/how-can-Handling-in-flink-this-operation-in-sql-bettween-like-In-tp985.html
> Sent from the Apache Flink (Incubator) User Mailing List archive. mailing
> list archive at Nabble.com.
>