HyukjinKwon commented on a change in pull request #27477: [SPARK-30724][SQL] 
Support 'LIKE ANY' and 'LIKE ALL' operators
URL: https://github.com/apache/spark/pull/27477#discussion_r376164622
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/like-any.sql
 ##########
 @@ -0,0 +1,39 @@
+CREATE OR REPLACE TEMPORARY VIEW like_any_table AS SELECT * FROM (VALUES
+  ('google', '%oo%'),
+  ('facebook', '%oo%'),
+  ('linkedin', '%in'))
+  as t1(company, pat);
+
+select company from like_any_table where company like any ('%oo%','%in','fa%') 
;
+
+select company from like_any_table where company like any 
('microsoft','%yoo%') ;
+
+select
+    company,
+    CASE
+        WHEN company like any ('%oo%','%in','fa%') THEN 'Y'
+        ELSE 'N'
+    END AS is_available,
+    CASE
+        WHEN company like any ('%oo%','fa%') OR company like any ('%in','ms%') 
THEN 'Y'
+        ELSE 'N'
+    END AS mix
+From like_any_table;
+
+--Mix test with constant pattern and column value
 
 Review comment:
   nit: space after `--`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to