diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
commit | 31773f157bf8164364649b5f470f52dece0a4317 (patch) | |
tree | 33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/sql/suites/in | |
parent | 2c7938962d8689e175574fc1e817c05049f27905 (diff) | |
parent | eff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff) | |
download | ydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz |
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/sql/suites/in')
77 files changed, 3265 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/in/basic_in.sql b/yql/essentials/tests/sql/suites/in/basic_in.sql new file mode 100644 index 0000000000..fdb8c00408 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/basic_in.sql @@ -0,0 +1,13 @@ +/* postgres can not */ +SELECT + 1 IN (1, 2), + 3 NOT IN (1, 2), + "1" IN (key, subkey, value), + key NOT IN (key, subkey, value), + key NOT IN AsList(subkey), + CAST(subkey AS Int32) IN (1, 2) AS optional_key_i32, + CAST(subkey AS Int64) IN (1, 2) AS optional_key_i64, + CAST(subkey AS Uint32) IN (1, 2) AS optional_key_ui32, + CAST(subkey AS Uint64) IN (1, 2) AS optional_key_ui64, + CAST(subkey AS Uint8) IN (1, 2) AS optional_key_to_larger_type +FROM plato.Input; diff --git a/yql/essentials/tests/sql/suites/in/default.cfg b/yql/essentials/tests/sql/suites/in/default.cfg new file mode 100644 index 0000000000..3d282ff63b --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/default.cfg @@ -0,0 +1,5 @@ +in Input input.txt +in Input2 input2.txt +in Input3 input3.txt +in Input4 input4.txt +in InputWithTuples input_with_tuples.txt diff --git a/yql/essentials/tests/sql/suites/in/empty.txt b/yql/essentials/tests/sql/suites/in/empty.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/empty.txt diff --git a/yql/essentials/tests/sql/suites/in/huge_in.sql b/yql/essentials/tests/sql/suites/in/huge_in.sql new file mode 100644 index 0000000000..f2d164b254 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/huge_in.sql @@ -0,0 +1,2495 @@ +SELECT + * +FROM plato.Input +WHERE value IN ( +'rambler.ru', +'worldoftanks.ru', +'pikabu.ru', +'rbc.ru', +'ria.ru', +'lenta.ru', +'4pda.ru', +'lostfilm.tv', +'yaplakal.com', +'auto.mail.ru', +'lady.mail.ru', +'echo.msk.ru', +'gazeta.ru', +'lifenews.ru', +'drive2.ru', +'vesti.ru', +'ivi.ru', +'russian.rt.com', +'championat.com', +'habrahabr.ru', +'tass.ru', +'kp.ru', +'games.mail.ru', +'sports.ru', +'hi-tech.mail.ru', +'fishki.net', +'news.sportbox.ru', +'playground.ru', +'1tv.ru', +'fb.ru', +'rg.ru', +'ntv.ru', +'kakprosto.ru', +'vz.ru', +'deti.mail.ru', +'dom2.ru', +'e1.ru', +'aif.ru', +'adme.ru', +'regnum.ru', +'livejournal.com', +'interfax.ru', +'tvzvezda.ru', +'infox.sg', +'sport-express.ru', +'health.mail.ru', +'kommersant.ru', +'izvestia.ru', +'topwar.ru', +'meduza.io', +'mk.ru', +'geektimes.ru', +'worldofwarships.ru', +'newsru.com', +'tvrain.ru', +'stream.1tv.ru', +'dota2.ru', +'woman.ru', +'banki.ru', +'3dnews.ru', +'weekend.rambler.ru', +'womanadvice.ru', +'video-dom2.ru', +'ren.tv', +'rusvesna.su', +'vedomosti.ru', +'tvc.ru', +'forexpf.ru', +'inosmi.ru', +'goodgame.ru', +'rusnovosti.ru', +'cont.ws', +'overclockers.ru', +'politikus.ru', +'autorambler.ru', +'bbc.com', +'fontanka.ru', +'lifehacker.ru', +'novayagazeta.ru', +'ixbt.com', +'oper.ru', +'m24.ru', +'stopgame.ru', +'rustoria.ru', +'russianfood.com', +'russia.tv', +'football.kulichki.net', +'svpressa.ru', +'igromania.ru', +'finance.rambler.ru', +'kinopati.ru', +'elhow.ru', +'ngs.ru', +'navalny.com', +'ru.investing.com', +'shazoo.ru', +'carambatv.ru', +'colonelcassad.livejournal.com', +'turkcinema.tv', +'syl.ru', +'gamebomb.ru', +'ctc.ru', +'hltv.org', +'khl.ru', +'slon.ru', +'101.ru', +'rusplt.ru', +'lostfilm.info', +'matchtv.ru', +'svoboda.org', +'finam.ru', +'virtus.pro', +'tjournal.ru', +'livelib.ru', +'tvigle.ru', +'sovsport.ru', +'expert.ru', +'rns.online', +'varlamov.ru', +'astromeridian.ru', +'74.ru', +'quto.ru', +'mobile-review.com', +'stranamasterov.ru', +'the-village.ru', +'quote.rbc.ru', +'rosbalt.ru', +'eurosport.ru', +'bash.im', +'1prime.ru', +'coop-land.ru', +'kanobu.ru', +'radiopotok.ru', +'bfm.ru', +'dni.ru', +'soccer.ru', +'europaplus.ru', +'warfiles.ru', +'radiovesti.ru', +'nnm.me', +'eadaily.com', +'unian.net', +'drive.ru', +'afisha.ru', +'wot-news.com', +'forbes.ru', +'ferra.ru', +'vc.ru', +'rusnext.ru', +'tema.livejournal.com', +'u-mama.ru', +'eda.ru', +'f1news.ru', +'bazaistoria.ru', +'ura.ru', +'24auto.ru', +'utro.ru', +'edimdoma.ru', +'politobzor.net', +'sibnet.ru', +'snob.ru', +'news.drom.ru', +'newsland.com', +'popmech.ru', +'trinixy.ru', +'politrussia.com', +'iphones.ru', +'uznayvse.ru', +'alogvinov.com', +'ru-m.org', +'vashmnenie.ru', +'buhonline.ru', +'politota.dirty.ru', +'referatwork.ru', +'gooool.org', +'news-front.info', +'vokrug.tv', +'pravda.ru', +'autonews.ru', +'gamer.ru', +'zr.ru', +'govoritmoskva.ru', +'gamemag.ru', +'letidor.ru', +'vestifinance.ru', +'spletnik.ru', +'cosmo.ru', +'9gag.com', +'exler.ru', +'kolesa.ru', +'bombardir.ru', +'km.ru', +'eva.ru', +'maximonline.ru', +'pedsovet.su', +'megamozg.ru', +'film.ru', +'ondom2.com', +'topnews.ru', +'zdravotvet.ru', +'schlock.ru', +'kinomania.ru', +'wday.ru', +'life-dom2.ru', +'kosmetista.ru', +'rusfootball.info', +'infoniac.ru', +'sql.ru', +'sport.rbc.ru', +'narutoplanet.ru', +'chelyabinsk.ru', +'trashbox.ru', +'ng.ru', +'msk.kp.ru', +'thg.ru', +'soccer365.ru', +'ridus.ru', +'audit-it.ru', +'mix.sibnet.ru', +'fanat1k.ru', +'riafan.ru', +'gameguru.ru', +'oko-planet.su', +'gmbox.ru', +'macdigger.ru', +'kudago.com', +'goha.ru', +'style.rbc.ru', +'avmalgin.livejournal.com', +'pure-t.ru', +'toastedballs.com', +'66.ru', +'kremlin.ru', +'ppt.ru', +'pix.playground.ru', +'gotovim.ru', +'zhenskoe-mnenie.ru', +'motor.ru', +'moslenta.ru', +'dp.ru', +'pravoslavie.ru', +'footballhd.ru', +'72.ru', +'hmn.ru', +'ruposters.ru', +'ag.ru', +'youloveit.ru', +'7days.ru', +'bmpd.livejournal.com', +'nplus1.ru', +'finanz.ru', +'fantasy-worlds.org', +'07kbr.ru', +'glavbukh.ru', +'newsvl.ru', +'avtovzglyad.ru', +'sdelanounas.ru', +'rbctv.rbc.ru', +'gorod48.ru', +'elle.ru', +'realty.rbc.ru', +'fashiony.ru', +'super.ru', +'opennet.ru', +'rusfishing.ru', +'weburg.net', +'znak.com', +'smotrisport.tv', +'eurolab.ua', +'tonkosti.ru', +'irk.ru', +'kramola.info', +'yurasumy.livejournal.com', +'u-f.ru', +'liveresult.ru', +'starhit.ru', +'allboxing.ru', +'shkolazhizni.ru', +'bloknot.ru', +'babyplan.ru', +'klerk.ru', +'notebook-center.ru', +'pravmir.ru', +'eg.ru', +'cn.ru', +'anekdotov.net', +'info.drom.ru', +'comss.info', +'oszone.net', +'orsk.ru', +'blogistars.com', +'inopressa.ru', +'xakep.ru', +'riotpixels.com', +'rsport.ru', +'peremogi.livejournal.com', +'moe-online.ru', +'newkaliningrad.ru', +'cxem.net', +'nash-dom2.ru', +'vprognoze.ru', +'glav.su', +'mama.ru', +'nhl.com', +'ekabu.ru', +'59.ru', +'ucrazy.ru', +'euro-football.ru', +'tvzavr.ru', +'moevideo.net', +'ibigdan.livejournal.com', +'7ya.ru', +'sadalskij.livejournal.com', +'vm.ru', +'rusdialog.ru', +'factroom.ru', +'mir24.tv', +'voenhronika.ru', +'argumenti.ru', +'63.ru', +'politnavigator.net', +'peoples.ru', +'medkrug.ru', +'vladtime.ru', +'3ddd.ru', +'business-gazeta.ru', +'moya-planeta.ru', +'gorod.afisha.ru', +'openrussia.org', +'strana-sovetov.com', +'allhockey.ru', +'mobiltelefon.ru', +'interfax-russia.ru', +'politonline.ru', +'filmpro.ru', +'bugaga.ru', +'iguides.ru', +'urod.ru', +'westwing.ru', +'timeout.ru', +'dw.com', +'pandoraopen.ru', +'autochel.ru', +'tourister.ru', +'cnews.ru', +'pronedra.ru', +'zadolba.li', +'rap.ru', +'112.ua', +'molodost.bz', +'mirsovetov.ru', +'conf.7ya.ru', +'disgustingmen.com', +'hi-news.ru', +'anna-news.info', +'e-news.su', +'warandpeace.ru', +'tvkultura.ru', +'mirfactov.com', +'koolinar.ru', +'evrl.to', +'cinemate.cc', +'roem.ru', +'libertycity.ru', +'informing.ru', +'ofigenno.cc', +'kolmovo.ru', +'amic.ru', +'mhealth.ru', +'autoreview.ru', +'itc.ua', +'161.ru', +'mmohelper.ru', +'wow-impulse.ru', +'appleinsider.ru', +'pravda-tv.ru', +'avtomarket.ru', +'newsrbk.ru', +'gtavicecity.ru', +'radiomayak.ru', +'rsute.ru', +'spbdnevnik.ru', +'dailymail.co.uk', +'svopi.ru', +'akaoray.ru', +'fc-zenit.ru', +'macos.livejournal.com', +'vozduh.afisha.ru', +'city-n.ru', +'furfur.me', +'ru.euronews.com', +'metronews.ru', +'vgtimes.ru', +'nstarikov.ru', +'polit.ru', +'zoom.cnews.ru', +'hiji.ru', +'gordonua.com', +'bigpicture.ru', +'prestige-gaming.ru', +'5-tv.ru', +'rb.ru', +'spbvoditel.ru', +'overclockers.ua', +'moddb.com', +'7dach.ru', +'ohranatruda.ru', +'ngs24.ru', +'russian7.ru', +'nashgorod.ru', +'rockstargame.ru', +'nat-geo.ru', +'gastronom.ru', +'hitech.vesti.ru', +'burdastyle.ru', +'rfpl.org', +'audi-club.ru', +'allnokia.ru', +'3mv.ru', +'zavuch.ru', +'news.ykt.ru', +'lawmix.ru', +'chita.ru', +'altapress.ru', +'domchel.ru', +'dooralei.ru', +'be-in.ru', +'newslab.ru', +'geekcity.ru', +'rueconomics.ru', +'cheat-master.ru', +'takprosto.cc', +'dofiga.net', +'nacrestike.ru', +'24smi.org', +'voffka.com', +'mpsh.ru', +'vhlru.ru', +'infox.ru', +'bbc.co.uk', +'newstube.ru', +'womenhealthnet.ru', +'gazeta.spb.ru', +'lookatme.ru', +'ivona.bigmir.net', +'economics.unian.net', +'pozneronline.ru', +'rlocman.ru', +'w-o-s.ru', +'wowhead.com', +'nashpoz.ru', +'tverigrad.ru', +'ign.com', +'diets.ru', +'demotivation.me', +'ru.gecid.com', +'golos-ameriki.ru', +'finmarket.ru', +'theguardian.com', +'amur.info', +'monavista.ru', +'arzamas.academy', +'pravo.ru', +'edition.cnn.com', +'ukr.net', +'travel.drom.ru', +'cluber.com.ua', +'bibika.ru', +'sharij.net', +'pedsovet.org', +'masterok.livejournal.com', +'psychologies.ru', +'gorod55.ru', +'esquire.ru', +'myslo.ru', +'postnauka.ru', +'abc-news.ru', +'dom2.su', +'volshebnaya-eda.ru', +'ucheba.ru', +'medialeaks.ru', +'artstation.com', +'kaifolog.ru', +'relax.ru', +'bikepost.ru', +'rusbiathlon.ru', +'bookmakersrating.ru', +'culture.ru', +'7kingdoms.ru', +'wroom.ru', +'sobesednik.ru', +'proufu.ru', +'chezasite.com', +'bnkomi.ru', +'piter.tv', +'computerra.ru', +'eer.ru', +'yaom.ru', +'rrnews.ru', +'kpfu.ru', +'ukraina.ru', +'gagadget.com', +'buhgalteria.ru', +'atlib.ru', +'wonderzine.com', +'mmoboom.ru', +'bucwar.ru', +'primamedia.ru', +'47news.ru', +'klub-drug.ru', +'kulturologia.ru', +'bk55.ru', +'2do2go.ru', +'securitylab.ru', +'nakanune.ru', +'zdorovieinfo.ru', +'medportal.ru', +'novate.ru', +'smotra.ru', +'hibiny.com', +'penzainform.ru', +'buh.ru', +'hi-fi.ru', +'dwg.ru', +'naked-science.ru', +'ibusiness.ru', +'fresher.ru', +'carsguru.net', +'fit4brain.com', +'muz-tv.ru', +'kavkaz-uzel.ru', +'kitchenmag.ru', +'ruspoll.ru', +'wowlol.ru', +'bcs-express.ru', +'uralweb.ru', +'nv.ua', +'liveleak.com', +'vasi.net', +'topspb.tv', +'sobaka.ru', +'inmyroom.ru', +'detkityumen.ru', +'mirkosmosa.ru', +'allwomens.ru', +'kp40.ru', +'optimakomp.ru', +'29.ru', +'trendymen.ru', +'hardwareluxx.ru', +'pln-pskov.ru', +'klops.ru', +'lfootball.ws', +'kleo.ru', +'sputnikipogrom.com', +'pg21.ru', +'medikforum.ru', +'donnews.ru', +'bankir.ru', +'news.vse42.ru', +'searchnews.info', +'fedpress.ru', +'fishingsib.ru', +'podelki-rukami-svoimi.ru', +'jv.ru', +'nashaplaneta.su', +'ideas.vdolevke.ru', +'diletant.media', +'gta.com.ua', +'zagopod.com', +'rian.com.ua', +'gov.spb.ru', +'glamius.ru', +'yablyk.com', +'uapress.info', +'komarovskiy.net', +'stolica.onego.ru', +'popcornnews.ru', +'qrz.ru', +'rutraveller.ru', +'ohotniki.ru', +'progorodsamara.ru', +'24tv.ua', +'rusdtp.ru', +'houzz.ru', +'chto-proishodit.ru', +'dnpmag.com', +'ru.hellomagazine.com', +'runews24.ru', +'kak2z.ru', +'pcgamer.com', +'ruskline.ru', +'dr-piliulkin.livejournal.com', +'dezinfo.net', +'korzik.net', +'3rm.info', +'tv-soyuz.ru', +'knitka.ru', +'alimero.ru', +'planeta.moy.su', +'elementy.ru', +'newsli.ru', +'zabmedia.ru', +'antifashist.com', +'tvoytrener.com', +'elec.ru', +'domechti.ru', +'ulpressa.ru', +'babiki.ru', +'realty.newsru.com', +'1obl.ru', +'motorpage.ru', +'winline.ru', +'earth-chronicles.ru', +'amdn.news', +'ochepyatki.ru', +'goodhouse.ru', +'rt.com', +'vzsar.ru', +'buzzfeed.com', +'bragazeta.ru', +'tks.ru', +'womanhit.ru', +'sostav.ru', +'ruspravda.info', +'androidinsider.ru', +'gdekluet.ru', +'dejurka.ru', +'keddr.com', +'prokazan.ru', +'vladmama.ru', +'newtimes.ru', +'voicesevas.ru', +'v1.ru', +'komiinform.ru', +'chipstone.livejournal.com', +'properm.ru', +'searchengines.ru', +'38mama.ru', +'videoboom.cc', +'newsru.co.il', +'4tololo.ru', +'mosday.ru', +'deita.ru', +'cars.ru', +'news.allcrimea.net', +'ufa1.ru', +'gq.ru', +'uafootball.org.ua', +'travel.ru', +'bn.ru', +'news.am', +'tvernews.ru', +'tomshardware.co.uk', +'ok-inform.ru', +'tproger.ru', +'shophelp.ru', +'news.tut.by', +'spb.aif.ru', +'nytimes.com', +'verstov.info', +'droider.ru', +'batona.net', +'gamespot.com', +'sarbc.ru', +'dribbble.com', +'nkj.ru', +'vokrugsveta.ru', +'vestiprim.ru', +'kp.ua', +'restate.ru', +'glamour.ru', +'doctorpiter.ru', +'76.ru', +'inforesist.org', +'rzn.info', +'spartak.com', +'progorod11.ru', +'e-xecutive.ru', +'kdelo.ru', +'jevons1.com', +'news.day.az', +'hochu.ua', +'prophotos.ru', +'4living.ru', +'rusradio.ru', +'kvadroom.ru', +'nevnov.ru', +'om1.ru', +'omskinform.ru', +'nahnews.org', +'riarealty.ru', +'avtoradio.ru', +'homyak55.ru', +'papaimama.ru', +'reuters.com', +'ngs55.ru', +'lvrach.ru', +'nvworld.ru', +'autopeople.ru', +'livesport.ru', +'wmj.ru', +'ru.uefa.com', +'doseng.org', +'techpowerup.com', +'trud.ru', +'khabmama.ru', +'vtambove.ru', +'patriarchia.ru', +'progorodnn.ru', +'art-assorty.ru', +'gazeta.a42.ru', +'vev.ru', +'sdelaysam-svoimirukami.ru', +'rusjev.net', +'zagolovki.ru', +'pressa.tv', +'sarnovosti.ru', +'kazanfirst.ru', +'copypast.ru', +'mignews.com', +'gameawards.ru', +'bloomberg.com', +'facenewss.ru', +'mforum.ru', +'samru.ru', +'rockpapershotgun.com', +'gallerix.ru', +'pravdoryb.info', +'diy.ru', +'rmnt.ru', +'autosaratov.ru', +'antipriunil.ru', +'yuga.ru', +'vitaportal.ru', +'vogue.ru', +'newsonline24.com.ua', +'android-help.ru', +'joinfo.ua', +'meganovosti.net', +'planet-today.ru', +'chinamobil.ru', +'tltgorod.ru', +'freeseller.ru', +'nversia.ru', +'jpgazeta.ru', +'ellegirl.ru', +'tele.ru', +'probirka.org', +'pribalt.info', +'bg.ru', +'vashgorod.ru', +'1gai.ru', +'fithacker.ru', +'darievna.ru', +'36on.ru', +'readtoday.ru', +'domihobby.ru', +'internet-technologies.ru', +'irinazaytseva.ru', +'nsknews.info', +'telegraf.com.ua', +'chemport.ru', +'fotokomok.ru', +'cameralabs.org', +'mchs.gov.ru', +'rostovdrive.ru', +'grimnir74.livejournal.com', +'riavrn.ru', +'province.ru', +'letnews.ru', +'progorod43.ru', +'andychef.ru', +'dk.ru', +'dni24.com', +'rus.newsru.ua', +'mr7.ru', +'wordyou.ru', +'stereo.ru', +'gay.ru', +'utmagazine.ru', +'ya62.ru', +'purmix.ru', +'5koleso.ru', +'zakon.ru', +'seonews.ru', +'metaltorg.ru', +'unn.com.ua', +'kgd.ru', +'onedio.ru', +'flot.com', +'zol.ru', +'eg-online.ru', +'fakty.ictv.ua', +'newsforamericans.com', +'zn.ua', +'rifey.ru', +'dialog.ua', +'psycabi.net', +'gorodskoyportal.ru', +'blackpantera.ru', +'tv2.tomsk.ru', +'brodude.ru', +'bloknot-volgograd.ru', +'aillarionov.livejournal.com', +'gotps3.ru', +'lady.tochka.net', +'medicinform.net', +'videozal.net', +'zhenskiy-sait.ru', +'ru.tv', +'arms-expo.ru', +'prikol.ru', +'krabov.net', +'n4k.ru', +'museum.ru', +'fontanka.fi', +'the-challenger.ru', +'sledcomrf.ru', +'newsader.com', +'zelenograd.ru', +'avia.pro', +'bloknot-voronezh.ru', +'theoryandpractice.ru', +'buro247.ru', +'telegraph.co.uk', +'njcar.ru', +'iphone-gps.ru', +'sport.bigmir.net', +'soccerlivehd.com', +'topgearrussia.ru', +'argumentiru.com', +'metrolyrics.com', +'dvnovosti.ru', +'infowoman.com.ua', +'riasv.ru', +'bankingsite.ru', +'mgnews.ru', +'sredstva.ru', +'cossa.ru', +'vg247.com', +'molnet.ru', +'grammio.com', +'sovsekretno.ru', +'etotdom.com', +'lipetskmedia.ru', +'video.bigmir.net', +'nexplorer.ru', +'beremennost.net', +'filmz.ru', +'ski.ru', +'24gadget.ru', +'rus.delfi.lv', +'sotovik.ru', +'online812.ru', +'knowyourmeme.com', +'howtogeek.com', +'nsn.fm', +'mobiledevice.ru', +'ozpp.ru', +'colta.ru', +'guru3d.com', +'31tv.ru', +'gorodkirov.ru', +'nikolaeva.livejournal.com', +'hitech.newsru.com', +'starslife.ru', +'gazeta-unp.ru', +'rosteplo.ru', +'allcarz.ru', +'tourprom.ru', +'devaka.ru', +'bloknot-rostov.ru', +'peterburg2.ru', +'nur.kz', +'gardenia.ru', +'ug.ru', +'independent.co.uk', +'bashinform.ru', +'etoday.ru', +'autonet.ru', +'vostokmedia.com', +'krsk.sibnovosti.ru', +'medlinks.ru', +'xage.ru', +'myfreesoft.ru', +'viperson.ru', +'trkterra.ru', +'kinokadr.ru', +'interviewrussia.ru', +'aksakal.tv', +'vicer.ru', +'irn.ru', +'yugopolis.ru', +'islam-today.ru', +'btimes.ru', +'rusactors.ru', +'gaming.msi.com', +'redigo.ru', +'vpk-news.ru', +'politolog.net', +'hronika.info', +'oilru.com', +'sntat.ru', +'ekburg.ru', +'auto.newsru.com', +'teknoblog.ru', +'washingtonpost.com', +'kinofilms.ua', +'pics.ru', +'tumix.ru', +'cnet.com', +'rustelegraph.ru', +'marrietta.ru', +'botanichka.ru', +'piterburger.ru', +'fitseven.ru', +'okino.ua', +'mastera-rukodeliya.ru', +'domnika.ru', +'newizv.ru', +'army-news.ru', +'korfiati.ru', +'otr-online.ru', +'pravdaurfo.ru', +'mngz.ru', +'nevsedoma.com.ua', +'product-test.ru', +'newrezume.org', +'blognews.am', +'philologist.livejournal.com', +'almodi.org', +'carobka.ru', +'exkavator.ru', +'by24.org', +'news.auto.ru', +'tvk6.ru', +'yoursputnik.ru', +'mylitta.ru', +'mel.fm', +'livekuban.ru', +'perm.aif.ru', +'turizm.ru', +'osp.ru', +'uralinform.ru', +'procrf.ru', +'finam.info', +'saratovnews.ru', +'marieclaire.ru', +'secure.avaaz.org', +'womenclub.ru', +'signorina.ru', +'kapital-rus.ru', +'nedeli.org', +'vtb.ru', +'allure.ru', +'myspace.com', +'health-ua.org', +'huffingtonpost.com', +'ain.ua', +'ufacitynews.ru', +'trikky.ru', +'tv.ua', +'passion.ru', +'storyfox.ru', +'crimea.kp.ru', +'ipadstory.ru', +'mycharm.ru', +'forbes.com', +'prelest.com', +'foodclub.ru', +'idi-k-nam.ru', +'spicami.ru', +'medicus.ru', +'android4all.ru', +'novostroy-m.ru', +'moscow-post.com', +'fashiontime.ru', +'mk-london.co.uk', +'htn.su', +'paperpaper.ru', +'rospres.com', +'unikassa.ru', +'zoopicture.ru', +'knitplanet.ru', +'resobr.ru', +'novayagazeta-ug.ru', +'energovopros.ru', +'lyxavto.ru', +'vsezdorovo.com', +'dela-ruk.ru', +'top-antropos.com', +'crimea.ria.ru', +'taxpravo.ru', +'ikirov.ru', +'interfax.com.ua', +'goodvesti.ru', +'sofascore.com', +'vremyan.ru', +'mag.relax.by', +'myjane.ru', +'supersadovnik.ru', +'povozcar.ru', +'animal.ru', +'an-crimea.ru', +'informnapalm.org', +'menobr.ru', +'depo.ua', +'ntpo.com', +'domovouyasha.ru', +'comandir.com', +'mobiset.ru', +'turbina.ru', +'tribuna.ru', +'wek.ru', +'updiet.info', +'insider.pro', +'kvedomosti.com', +'saint-petersburg.ru', +'restoran.ru', +'tatar-inform.ru', +'blogimam.com', +'carexpert.ru', +'techno.bigmir.net', +'mirror.co.uk', +'f1cd.ru', +'vlasti.net', +'ukranews.com', +'lifehacker.com', +'prikol.i.ua', +'imenno.ru', +'whoswho.com.ua', +'nbcnews.com', +'indystar.com', +'zergulio.livejournal.com', +'116.ru', +'zina-korzina.livejournal.com', +'pe.com', +'cyber.sports.ru', +'news.meta.ua', +'lingorado.com', +'ampravda.ru', +'ru.golos.ua', +'gwinplane.livejournal.com', +'cbssports.com', +'sport.tut.by', +'fapl.ru', +'profile.ru', +'shpilenok.livejournal.com', +'volgograd.kp.ru', +'sapojnik.livejournal.com', +'chicagotribune.com', +'portal-credo.ru', +'fintraining.livejournal.com', +'kungurov.livejournal.com', +'oldfisher-mk.livejournal.com', +'kosmos-x.net.ru', +'npr.org', +'twincities.com', +'aex.ru', +'mb.onliner.by', +'vesiskitim.ru', +'rua.gr', +'gusev-online.ru', +'blog.yandex.ru', +'heraldsun.com.au', +'chel.mk.ru', +'info-tses.kz', +'militaryexp.com', +'cikavosti.com', +'vestnik-rm.ru', +'nsk.dk.ru', +'chistoprudov.livejournal.com', +'ru-healthlife.livejournal.com', +'vestitambov.ru', +'jobs.tut.by', +'kurer-sreda.ru', +'bloombergview.com', +'thenewstribune.com', +'izh.kp.ru', +'tv21.ru', +'hindustantimes.com', +'businesswire.com', +'bankfax.ru', +'ato.ru', +'bryansktoday.ru', +'dtpptz.ru', +'mzadornov.livejournal.com', +'doktor-killer.livejournal.com', +'motonews.ru', +'penza-press.ru', +'iran.ru', +'9to5mac.com', +'dima-pashchenko.livejournal.com', +'bloknot-stavropol.ru', +'dynamo.kiev.ua', +'motogonki.ru', +'fortune.com', +'pushba.livejournal.com', +'yarnovosti.com', +'uralpress.ru', +'wsj.com', +'rabochy-put.ru', +'eurointegration.com.ua', +'prosportkz.kz', +'ufa-room.ru', +'brainpickings.org', +'sport.business-gazeta.ru', +'radulova.livejournal.com', +'pg12.ru', +'asfera.info', +'smbc-comics.com', +'whatculture.com', +'foto-history.livejournal.com', +'zdnet.com', +'motogp-news.ru', +'media-polesye.by', +'vsenovostint.ru', +'kolyan.net', +'dirty.ru', +'kineshemec.ru', +'izrus.co.il', +'dailyherald.com', +'csmonitor.com', +'mogilev.jobs.tut.by', +'in-news.ru', +'novostink.ru', +'xn----8sbeybxdibygm.ru-an.info', +'spb-auto.livejournal.com', +'strangernn.livejournal.com', +'ngs42.ru', +'kriminalnn.ru', +'newsmsk.com', +'esotericblog.ru', +'rweek.ru', +'grey-croco.livejournal.com', +'volg.mk.ru', +'comingsoon.net', +'siliconrus.com', +'nvo.ng.ru', +'alternathistory.livejournal.com', +'krasnoturinsk.info', +'oblgazeta.ru', +'engadget.com', +'sportfm.ru', +'politichanka.livejournal.com', +'androidauthority.com', +'fondsk.ru', +'bankrate.com', +'neowin.net', +'vestikavkaza.ru', +'flackelf.livejournal.com', +'readwrite.com', +'radonezh.ru', +'kase.kz', +'cracked.com', +'udmtv.ru', +'arigus-tv.ru', +'otvprim.ru', +'ufa.rbc.ru', +'sibdepo.ru', +'eu-shestakov.livejournal.com', +'i4u.com', +'newsday.com', +'yug.svpressa.ru', +'krasnoyarsk.dk.ru', +'lib.komarovskiy.net', +'lada.kz', +'baikal-media.ru', +'news.sky.com', +'belnovosti.by', +'otdam-darom.livejournal.com', +'recode.net', +'vice.com', +'grozny.tv', +'ru-chp.livejournal.com', +'stalic.livejournal.com', +'gosh100.livejournal.com', +'vibirai.ru', +'buzulukmedia.ru', +'chessok.net', +'tula.aif.ru', +'dvinainform.ru', +'rgvktv.ru', +'vinauto777.livejournal.com', +'azcentral.com', +'newsler.ru', +'top.rbc.ru', +'kvnews.ru', +'altai.aif.ru', +'kazan.kp.ru', +'irk.kp.ru', +'pravdoiskatel77.livejournal.com', +'dailydot.com', +'limonov-eduard.livejournal.com', +'fastcompany.com', +'zpravda.ru', +'belapan.com', +'washingtontimes.com', +'journalstar.com', +'articles.chita.ru', +'cnbc.com', +'spulers.livejournal.com', +'telegraf.by', +'stoletie.ru', +'nnov.kp.ru', +'startribune.com', +'vsluh.ru', +'finance.nur.kz', +'gorno-altaisk.info', +'gipsyteam.ru', +'prikol.bigmir.net', +'gotennis.ru', +'chelseablues.ru', +'themarysue.com', +'sl-lopatnikov.livejournal.com', +'chehov-vid.ru', +'economist.com', +'cultofmac.com', +'el-murid.livejournal.com', +'shel-gilbo.livejournal.com', +'serfilatov.livejournal.com', +'mr-rf.ru', +'go31.ru', +'bulochnikov.livejournal.com', +'beauty.passion.ru', +'ru.publika.md', +'dangerousminds.net', +'gorodskievesti.ru', +'cnn.com', +'nasdaq.com', +'geektyrant.com', +'realt.onliner.by', +'gorod-che.ru', +'islamdag.ru', +'42.tut.by', +'verola.livejournal.com', +'news.vtomske.ru', +'muravei-s.livejournal.com', +'goal.com', +'eugenyshultz.livejournal.com', +'nbcbayarea.com', +'dobryanka.net', +'gawker.com', +'contracostatimes.com', +'spin.com', +'thestar.com', +'belta.by', +'ria56.ru', +'abc.net.au', +'e-kazan.ru', +'zaks.ru', +'hollywoodreporter.com', +'a-nikonov.livejournal.com', +'vluki.ru', +'factmag.com', +'auto.kz', +'sport-igrok.ru', +'karpovka.net', +'dymontiger.livejournal.com', +'doc.rt.com', +'metroelf.livejournal.com', +'michurinsk.ru', +'scmp.com', +'your-look-today.livejournal.com', +'computerworld.com', +'chelny-izvest.ru', +'wired.com', +'pressdemocrat.com', +'revda-info.ru', +'vesti.irk.ru', +'chepetsk.ru', +'dnr-news.com', +'1news.az', +'philly.com', +'kt.kz', +'sochi-express.ru', +'alexandrafl.livejournal.com', +'omskzdes.ru', +'gazetaby.com', +'ugra-news.ru', +'csnphilly.com', +'ij-adult.livejournal.com', +'u74.ru', +'lubernet.ru', +'russos.livejournal.com', +'intex-press.by', +'yesasia.ru', +'bostonherald.com', +'androidcentral.com', +'blagin-anton.livejournal.com', +'friend.livejournal.com', +'novgaz-rzn.ru', +'prokopievsk.ru', +'spb.kp.ru', +'prophotos-ru.livejournal.com', +'mentalfloss.com', +'av.by', +'soba4ki.livejournal.com', +'pro.tonkosti.ru', +'salamnews.org', +'fsrussia.ru', +'9tv.co.il', +'gtrk-omsk.ru', +'te-st.ru', +'gubdaily.ru', +'gomel.today', +'kirovnet.ru', +'news.join.ua', +'novostroy-spb.ru', +'musictimes.com', +'blastr.com', +'yp.fedpress.ru', +'usatoday.com', +'blog.fontanka.ru', +'usolie.info', +'profit.kz', +'marpravda.ru', +'france24.com', +'sutynews.ru', +'wolsk.ru', +'vdomodedovo.info', +'chervonec-001.livejournal.com', +'comicvine.com', +'kavkaz.mk.ru', +'oregonlive.com', +'social.ridus.ru', +'evo-lutio.livejournal.com', +'astrakhan-24.ru', +'uchvatovsb.livejournal.com', +'avvakoum.livejournal.com', +'onliner.by', +'burckina-faso.livejournal.com', +'spydell.livejournal.com', +'freedom.livejournal.com', +'ru.ign.com', +'ria-m.tv', +'interesno.co', +'smh.com.au', +'pg13.ru', +'syasnews.ru', +'vestivrn.ru', +'phonearena.com', +'nme.com', +'timesunion.com', +'charsov.livejournal.com', +'isra.com', +'astanatv.kz', +'moygorod-online.ru', +'sem40.ru', +'militariorg.ucoz.ru', +'news.com.au', +'espn.go.com', +'deseretnews.com', +'azerisport.com', +'sciencealert.com', +'orlandosentinel.com', +'vgoroden.ru', +'novorosinform.org', +'novosti.dn.ua', +'liwli.ru', +'likeni.ru', +'tettie.livejournal.com', +'gothamist.com', +'vrn.mk.ru', +'comicbookresources.com', +'tlt.ru', +'inter.ua', +'govorun26.ru', +'sport.nur.kz', +'7info.ru', +'infpol.ru', +'ng.kz', +'gmorder.livejournal.com', +'sibkray.ru', +'thedenverchannel.com', +'kurgan.ru', +'vseprosport.ru', +'crimsonalter.livejournal.com', +'lady.nur.kz', +'moto-magazine.ru', +'geeksaresexy.net', +'vv-34.ru', +'wow-impulse.net', +'echonedeli.ru', +'globalaffairs.ru', +'ibigdan.com', +'kansascity.com', +'the-day-x.ru', +'vesti.az', +'melon-panda.livejournal.com', +'tatler.ru', +'novorus.info', +'gorky-look.livejournal.com', +'waralbum.ru', +'shri-boomer.livejournal.com', +'text.khl.ru', +'thecrimson.com', +'briansk.ru', +'shakkar.livejournal.com', +'saracinua.livejournal.com', +'nsk.kp.ru', +'kentucky.com', +'astronews.ru', +'mikle1.livejournal.com', +'ptoday.ru', +'novgorod.ru', +'vesti-sochi.tv', +'samara.kp.ru', +'swissinfo.ch', +'ufatime.ru', +'holmogor.livejournal.com', +'alt.kp.ru', +'humus.livejournal.com', +'ancient-origins.net', +'russianshowbiz.info', +'sv.ru-m.org', +'interfax.by', +'skisport.ru', +'zakon.kz', +'sochi.com', +'pro-n.by', +'greenchelman-3.livejournal.com', +'consequenceofsound.net', +'nyka-huldra.livejournal.com', +'perevodika.ru', +'ntv.livejournal.com', +'wired.co.uk', +'total.kz', +'morena-morana.livejournal.com', +'ru.delfi.lt', +'katysha.livejournal.com', +'media.club4x4.ru', +'dilbert.com', +'droid-life.com', +'mainfun.ru', +'screenrant.com', +'domodedovod.ru', +'ont.by', +'news.vdv-s.ru', +'kalmykia-online.ru', +'kaluga24.tv', +'ok-magazine.ru', +'sense-life.com', +'ctv.ca', +'grantland.com', +'kolomna-spravka.ru', +'sport.kazanfirst.ru', +'gazetairkutsk.ru', +'t.rbc.ru', +'pcworld.com', +'opposingviews.com', +'rbcdaily.ru', +'dom.63.ru', +'trisosny.ru', +'progorod33.ru', +'kaliningrad.kp.ru', +'bgr.com', +'reason.com', +'al.com', +'mediamatters.org', +'businessspectator.com.au', +'kashin.guru', +'syracuse.com', +'dubikvit.livejournal.com', +'fritzmorgen.livejournal.com', +'foodclub-ru.livejournal.com', +'goloskarpat.info', +'paparazzi.ru', +'malyshi.livejournal.com', +'bit.ua', +'netall.ru', +'news.megatyumen.ru', +'rus.azattyq.org', +'isurok.livejournal.com', +'inamora.livejournal.com', +'volha.livejournal.com', +'mediaite.com', +'cinemablend.com', +'potsreotizm.livejournal.com', +'ufa.kp.ru', +'dymovskiy-name.livejournal.com', +'hor.passion.ru', +'168.ru', +'huffingtonpost.co.uk', +'reb.by', +'caravan.kz', +'vesti48.ru', +'vott.ru', +'kirov-portal.ru', +'news.vitebsk.cc', +'110km.ru', +'theglobeandmail.com', +'novokuznetsk.su', +'ivanoctober.livejournal.com', +'kuban.mk.ru', +'uproxx.com', +'gezitter.org', +'thestreet.com', +'letchikleha.livejournal.com', +'slashgear.com', +'rusanalit.livejournal.com', +'reporter.akipress.org', +'moneycontrol.com', +'polygon.com', +'mashkind.livejournal.com', +'cheremuha.com', +'odsgomel.org', +'chaskor.ru', +'bespridanitsa.livejournal.com', +'frant.me', +'prilepin.livejournal.com', +'pgatour.com', +'hqroom.ru', +'kotaku.com', +'dolboeb.livejournal.com', +'ej.by', +'gizmodo.com', +'irek-murtazin.livejournal.com', +'barrons.com', +'syzran-small.ru', +'sportbo.ru', +'xn----ctbsbazhbctieai.ru-an.info', +'holodilnik.info', +'digitalspy.com', +'fratria.ru', +'time.com', +'vesti42.ru', +'365news.biz', +'upi.com', +'xn--h1akeme.ru-an.info', +'dengi.59.ru', +'ast-news.ru', +'blogs.pravda.com.ua', +'sergeydolya.livejournal.com', +'independent.ie', +'sibved.livejournal.com', +'nypost.com', +'bimru.ru', +'ru-aviation.livejournal.com', +'theregister.co.uk', +'thestir.cafemom.com', +'forbes.kz', +'roman-n.livejournal.com', +'realty.vesti.ru', +'indianexpress.com', +'rapsinews.ru', +'ulan.mk.ru', +'vg-saveliev.livejournal.com', +'secondstreet.ru', +'vnnews.ru', +'ara-bublik.livejournal.com', +'yurayakunin.livejournal.com', +'zelenyikot.livejournal.com', +'newsko.ru', +'visualhistory.livejournal.com', +'bnews.kz', +'tomsk.ru', +'alternet.org', +'ural.kp.ru', +'zarulem.by', +'blog.netpeak.ua', +'macworld.com', +'sport.ru', +'desmoinesregister.com', +'vsegda-tvoj.livejournal.com', +'news.1777.ru', +'nfl.com', +'putin-today.ru', +'dw.de', +'hurriyetdailynews.com', +'tampabay.com', +'7mednews.ru', +'macleans.ca', +'malka-lorenz.livejournal.com', +'dv.kp.ru', +'chastnik.ru', +'gazetarb.ru', +'alexandr-rogers.livejournal.com', +'astrakhanfm.ru', +'newsweek.com', +'novorossy.ru', +'365info.kz', +'baltimoresun.com', +'saratov.kp.ru', +'region15.ru', +'nsktv.ru', +'ft.com', +'kak-eto-sdelano.livejournal.com', +'spb.sovsport.ru', +'theoatmeal.com', +'avclub.com', +'auto.29.ru', +'apsny.ge', +'omg.md', +'obninsk.name', +'journalufa.com', +'ndn.info', +'tayga.info', +'sciencedump.com', +'homester.com.ua', +'krylov.livejournal.com', +'beerplace.com.ua', +'natamax.livejournal.com', +'rusathletics.com', +'cursiv.ru', +'mmaboxing.ru', +'facte.ru', +'dorkly.com', +'ofeliyadd.livejournal.com', +'kazan.mk.ru', +'fototelegraf.ru', +'tv29.ru', +'tut.by', +'35media.ru', +'rgo.ru', +'yarjal.com', +'bleacherreport.com', +'hata.by', +'oper-1974.livejournal.com', +'livescience.com', +'io9.com', +'people.com', +'theweek.com', +'nymag.com', +'businessinsider.com', +'primecrime.ru', +'gazeta13.ru', +'irsenas.livejournal.com', +'russiapost.su', +'trend.az', +'tkgorod.ru', +'politico.com', +'apn.ru', +'andreistp.livejournal.com', +'adweek.com', +'stuff.co.nz', +'space.com', +'sarapul.net', +'ko44.ru', +'yar.kp.ru', +'exler.livejournal.com', +'newser.com', +'penzanews.ru', +'sportsgrid.com', +'vlast.kz', +'informationweek.com', +'vidsboku.com', +'mstrok.ru', +'webmastermaksim.ru', +'ukrinform.ua', +'geo.ru', +'galkovsky.livejournal.com', +'karel.mk.ru', +'mir-mag.livejournal.com', +'prosto-gost.livejournal.com', +'k-ur.ru', +'mhl.khl.ru', +'news.novgorod.ru', +'cleveland.com', +'theage.com.au', +'kenigtiger.livejournal.com', +'unian.ua', +'starshinazapasa.livejournal.com', +'yuripasholok.livejournal.com', +'deadline.com', +'aljazeera.com', +'timesofisrael.com', +'people-press.org', +'medpagetoday.com', +'freep.com', +'aviaport.ru', +'make-your-style.livejournal.com', +'examiner.com', +'phys.org', +'andrei-bt.livejournal.com', +'glamurchik.tochka.net', +'newsinfo.inquirer.net', +'altpress.com', +'ibtimes.co.uk', +'rul.by', +'nationalreview.com', +'lasvegassun.com', +'gagauzinfo.md', +'dailynews.com', +'bohemicus.livejournal.com', +'amfora.livejournal.com', +'adindex.ru', +'chispa1707.livejournal.com', +'autoban.by', +'portal-kultura.ru', +'matrony.ru', +'omsk.kp.ru', +'podrobno.uz', +'rusila.su', +'dom.72.ru', +'fn-volga.ru', +'martin.livejournal.com', +'thehindu.com', +'miloserdie.ru', +'sportingnews.com', +'networkworld.com', +'seattlepi.com', +'ctv.by', +'vseneobichnoe.livejournal.com', +'techtimes.com', +'macrumors.com', +'novayagazeta.livejournal.com', +'spiked-online.com', +'aquatek-filips.livejournal.com', +'sitv.ru', +'arbaletfire.livejournal.com', +'zavtra.ru', +'chernovik.net', +'evrazia.org', +'news29.ru', +'alex-aka-jj.livejournal.com', +'luki.ru', +'usnews.com', +'xn--90aiasbk5as2f.xn--p1ai', +'cardesign.ru', +'newsbabr.com', +'info.sibnet.ru', +'wik-end.com', +'flytothesky.ru', +'rostov.rbc.ru', +'ryazan.kp.ru', +'rostov.kp.ru', +'billionnews.ru', +'admagazine.ru', +'rebro-a-dama.livejournal.com', +'velolive.com', +'vb.kg', +'sarinform.ru', +'stainlesstlrat.livejournal.com', +'metalinjection.net', +'amurmedia.ru', +'top.thepo.st', +'che-online.com', +'volga-tv.ru', +'mercurynews.com', +'rodgor-vlg.ru', +'komikz.ru', +'ca-news.org', +'greenpeace.org', +'alex-leshy.livejournal.com', +'valyaeva.ru', +'usmagazine.com', +'sergeytsvetkov.livejournal.com', +'tradelikeapro.ru', +'autostat.ru', +'go32.ru', +'mediapost.com', +'ru-an.info', +'mixednews.ru', +'auto.161.ru', +'most.tv', +'yarnews.net', +'tvtomsk.ru', +'xkcd.com', +'riatomsk.ru', +'ais.by', +'4vsar.ru', +'khabar.ibnlive.com', +'infodoktor.by', +'eaomedia.ru', +'laughingsquid.com', +'islamnews.ru', +'masslive.com', +'glazovportal.net', +'forum.gipsyteam.ru', +'sport-weekend.com', +'express.co.uk', +'riadagestan.ru', +'politsovet.ru', +'pryf.livejournal.com', +'chrono-tm.org', +'newsroom24.ru', +'rbworld.org', +'sports.kz', +'puerrtto.livejournal.com', +'konkretno.ru', +'kursiv.kz', +'money.rbc.ru', +'tutuskania.livejournal.com', +'arbatovagidepar.livejournal.com', +'rollingstone.com', +'nslovo.info', +'newsbel.by', +'thestate.com', +'theatlantic.com', +'ivanovonews.ru', +'ao.by', +'sportsdaily.ru', +'pushkino.tv', +'kg.akipress.org', +'kopeika.org', +'royalcheese.ru', +'tmz.com', +'ab.onliner.by', +'zwezda.net', +'diapazon.kz', +'kagemushanatako.livejournal.com', +'pravdapfo.ru', +'afn.by', +'24.kg', +'niann.ru', +'cbsnews.com', +'weeklystandard.com', +'ufacity.info', +'gorodusinsk.ru', +'newsarama.com', +'pinwin.ru', +'indiatimes.com', +'doodoo.ru', +'sun-sentinel.com', +'variety.com', +'diak-kuraev.livejournal.com', +'maks-portal.ru', +'73online.ru', +'slate.com', +'beautyinsider.ru', +'kiss-my-abs.livejournal.com', +'auto.altapress.ru', +'day.az', +'dawn.com', +'prima-tv.ru', +'ruscur.ru', +'omskpress.ru', +'awas1952.livejournal.com', +'dom.59.ru', +'samara.ru', +'bikeradar.com', +'engineering-ru.livejournal.com', +'xn----ctbsbaa3aibxhck.ru-an.info', +'video.khl.ru', +'thesun.co.uk', +'ajc.com', +'technologyreview.com', +'vesti-ukr.com', +'ekb.rbc.ru', +'8plus1.ru', +'korabel.ru', +'k1news.ru', +'mixnews.lv', +'ekb.dk.ru', +'pavel-sviridov.livejournal.com', +'courant.com', +'scientificamerican.com', +'dnaindia.com', +'popsci.com', +'aftershock-1.livejournal.com', +'ubergizmo.com', +'ndtv.com', +'zabinfo.ru', +'prochepetsk.ru', +'superomsk.ru', +'ivakin-alexey.livejournal.com', +'discovery.com', +'utexas.edu', +'gts.tv', +'footballtop.ru', +'bloody-disgusting.com', +'arstechnica.com', +'vykza.ru', +'vaduhan-08.livejournal.com', +'bither.livejournal.com', +'rus-obr.ru', +'sakhalin.info', +'bocharik.livejournal.com', +'drugoigorod.ru', +'topic.lt', +'putin-slil.livejournal.com', +'pavel-shipilin.livejournal.com', +'geek.com', +'darsik-dasha.livejournal.com', +'tver.kp.ru', +'aktau-business.com', +'volna.afisha.ru', +'informpskov.ru', +'susanin.udm.ru', +'venturebeat.com', +'mcall.com', +'denofgeek.com', +'artemdragunov.livejournal.com', +'niasam.ru', +'communitarian.ru', +'kalugahouse.ru', +'solnyszka.livejournal.com', +'stltoday.com', +'periskop.livejournal.com', +'technobuffalo.com', +'rugrad.eu', +'extremetech.com', +'miamiherald.com', +'digitaltrends.com', +'kuban.rbc.ru', +'fox4kc.com', +'newsok.com', +'gtrk.tv', +'yerkramas.org', +'rt.rbc.ru', +'nbcsports.com', +'bizjournals.com', +'2x2.su', +'dailycaller.com', +'v102.ru', +'nydailynews.com', +'ysia.ru', +'biathlonrus.com', +'bloodandsweat.ru', +'newsvo.ru', +'nn.mk.ru', +'people.passion.ru', +'biserok.org', +'orenday.ru', +'marketwatch.com', +'afanasy.biz', +'ya-kadyrov.livejournal.com', +'chelnyltd.ru', +'truthdig.com', +'uk.eonline.com', +'bobsoccer.ru', +'kv.by', +'realty.ngs.ru', +'mirf.ru', +'u-tv.ru', +'mk.tula.ru', +'adn.com', +'star-telegram.com', +'techradar.com', +'ru-cats.livejournal.com', +'marvel.com', +'pppirate.livejournal.com', +'proboknet.livejournal.com', +'superkarate.ru', +'drugoi.livejournal.com', +'mycity.by', +'pskov.kp.ru', +'benzinga.com', +'velikiynovgorod.ru', +'qestigra.ru', +'5min.by', +'kirov.kp.ru', +'onlinetambov.ru', +'ibtimes.com', +'hueviebin1.livejournal.com', +'pachom.livejournal.com', +'auto.onliner.by', +'wrestdag.ru', +'ex-press.by', +'beauty-nax.livejournal.com', +'andreyvadjra.livejournal.com', +'nesn.com', +'hrono61.livejournal.com', +'dailyfinance.com', +'discred.ru', +'devyatka.ru', +'skysports.com', +'kaluga-poisk.ru', +'politsib.ru', +'nationalgeographic.com', +'ru.reuters.com', +'alau.kz', +'perm.rbc.ru', +'fighttime.ru', +'ru.apa.az', +'home-and-garden.livejournal.com', +'news.nashbryansk.ru', +'legatus-pretor.livejournal.com', +'presstv.ir', +'kuban.kp.ru', +'kot-de-azur.livejournal.com', +'kuzpress.ru', +'comicsalliance.com', +'tbo.com', +'viking-nord.livejournal.com', +'abrod.livejournal.com', +'svodka.akipress.org', +'cosharel.livejournal.com', +'onedivision.ru', +'tazabek.kg', +'thinkprogress.org', +'zasekin.ru', +'aif.by', +'strajj.livejournal.com', +'prweb.com', +'infobank.by', +'gg34.ru', +'sib.fm', +'koketka.livejournal.com', +'td5howard.livejournal.com', +'megatyumen.ru', +'timbuktoo.livejournal.com', +'charlotteobserver.com', +'latimes.com', +'gazeta-n1.ru', +'doneck-news.com', +'scandaly.ru', +'vesti.ua', +'newsobserver.com', +'news.ngs.ru', +'vkarpinsk.info', +'putnik1.livejournal.com', +'pesen-net.livejournal.com', +'newdaynews.ru', +'equestrian.ru', +'fotografersha.livejournal.com', +'serovglobus.ru', +'foxbusiness.com', +'jacksonville.com', +'ural56.ru', +'maxfux.livejournal.com', +'dostup1.ru', +'tatpressa.ru', +'nasa.gov', +'jewish.ru', +'t-itanium.livejournal.com', +'dimabalakirev.livejournal.com', +'mb.com.ph', +'mosaica.ru', +'tainy.net', +'bel.ru', +'inform.kz', +'votkinsk.net', +'odintsovo.info', +'klaxon.ru', +'teh-nomad.livejournal.com', +'lev-sharansky2.livejournal.com', +'iflscience.com', +'foxsports.com', +'got.vg', +'5sfer.com', +'android.mobile-review.com', +'xn--80ajoghfjyj0a.xn--p1ai', +'irishtimes.com', +'emelamud.livejournal.com', +'mnenia.zahav.ru', +'mgorod.kz', +'news.ircity.ru', +'novorossia.su', +'sexmotor.livejournal.com', +'wod-1958.livejournal.com', +'andrey-kuprikov.livejournal.com', +'kerzak-1.livejournal.com', +'maxkatz.livejournal.com', +'portamur.ru', +'avto.kazanfirst.ru', +'sledcom.ru', +'p-i-f.livejournal.com', +'chern-molnija.livejournal.com', +'sokol-ff.livejournal.com', +'cbc.ca', +'paranormal-news.ru', +'pitchfork.com', +'azh.kz', +'archi.ru', +'tvcom-tv.ru', +'salon.com', +'pora-valit.livejournal.com', +'cherinfo.ru', +'football.ua', +'ai-zhilin.livejournal.com', +'doktorbel.livejournal.com', +'tsn.ua', +'gorobzor.ru', +'auto.72.ru', +'dobre.stb.ua', +'hypetrak.com', +'53news.ru', +'mozhga.net', +'uglich-jj.livejournal.com', +'npubop.livejournal.com', +'vox.com', +'sbnation.com', +'iskra-kungur.ru', +'arabic.rt.com', +'lovigin.livejournal.com', +'pennlive.com', +'miss-tramell.livejournal.com', +'open.by', +'sacbee.com', +'udf.by', +'40161.ru', +'panzerbar.livejournal.com', +'rotoworld.com', +'b-online.ru', +'oppps.ru', +'ruscesar.livejournal.com', +'theins.ru', +'vesti-yamal.ru', +'euroradio.fm', +'grodno24.com', +'flgr.ru', +'actualcomment.ru', +'asiarussia.ru', +'pravdasevera.ru', +'apn-spb.ru', +'samara-ru.livejournal.com', +'tech.onliner.by', +'gazetavolgodonsk.ru', +'walera11.livejournal.com', +'motherjones.com', +'techspot.com', +'molonlabe.livejournal.com', +'billboard.com', +'ocregister.com', +'ctv7.ru', +'tobolsk.ru', +'kado4nikov.livejournal.com', +'tv-rb.ru', +'fool.com', +'gorodche.ru', +'f1-world.ru', +'tourdom.ru', +'techbrowsing.com', +'szhaman.livejournal.com', +'sb.by', +'rostec.ru', +'zacks.com', +'i-news.kz', +'chexov.net', +'mockwa.com', +'varjag-2007.livejournal.com', +'privetsochi.ru', +'waitbutwhy.com', +'prnewswire.com', +'chaiknet.ru', +'prostitutka-ket.livejournal.com', +'ulyanovskcity.ru', +'auto.vesti.ru', +'ihoraksjuta.livejournal.com', +'rostov.dk.ru', +'abw.by', +'avtosreda.ru', +'segodnia.ru', +'tanya-mass.livejournal.com', +'rebenok.by', +'12news.uz', +'albert-lex.livejournal.com', +'boingboing.net', +'u-96.livejournal.com', +'denverpost.com', +'nikitskij.livejournal.com', +'tavto.ru', +'odin-moy-den.livejournal.com', +'nerdist.com', +'hotnewhiphop.com', +'newregion.kz', +'kanchukov-sa.livejournal.com', +'zebra-tv.ru', +'chel.kp.ru', +'primeminister.kz', +'sfgate.com', +'murmansk.kp.ru', +'novos.mk.ru', +'islam.ru', +'mlb.com', +'charter97.org', +'echo.az', +'rk.karelia.ru', +'tvnz.co.nz', +'volgograd-trv.ru', +'progorod76.ru', +'1istochnik.ru', +'varandej.livejournal.com', +'newskaz.ru', +'statesman.com', +'bleedingcool.com', +'chel.dk.ru', +'nemoold.livejournal.com', +'uborshizzza.livejournal.com', +'select.by', +'kem.kp.ru', +'kapital.kz', +'uraldaily.ru', +'abs-cbnnews.com', +'volkovysk.by', +'today.com', +'mi3ch.livejournal.com', +'rus.ozodi.org', +'volzsky.ru', +'macradar.ru', +'kolobok1973.livejournal.com', +'littlehirosima.livejournal.com', +'tofight.ru', +'canadianbusiness.com', +'gmichailov.livejournal.com', +'seva-riga.livejournal.com', +'stuff.tv', +'uk.eurosport.yahoo.com', +'deccanherald.com', +'rollingstone.ru', +'eurofootball.ru', +'palmbeachpost.com', +'21.by', +'vmolo.by', +'hawk.ru', +'nj.com', +'vlg.aif.ru', +'nv-online.info', +'korea-blog.livejournal.com', +'baltinfo.ru', +'rossosh.bloknot-voronezh.ru', +'meditation-portal.com', +'bloknot-volzhsky.ru', +'dpmmax.livejournal.com', +'ru-auto.livejournal.com', +'frontpagemag.com', +'mkala.mk.ru', +'citysakh.ru', +'rovego.livejournal.com', +'allsportinfo.ru', +'miumau.livejournal.com', +'rawstory.com', +'lady.ru', +'comicbookmovie.com', +'homes.e1.ru', +'myudm.ru', +'nola.com', +'tengrinews.kz', +'foxnews.com', +'stars365.livejournal.com', +'zt16.ru', +'vesti-kpss.livejournal.com', +'weacom.ru', +'actualidad.rt.com', +'polosa.co.il', +'1777.ru', +'twower.livejournal.com', +'gigaom.com', +'pravdanews.info', +'katun24.ru', +'barnaul.fm', +'altaynews.kz', +'denokan.livejournal.com', +'uralpolit.ru', +'tumen.kp.ru', +'cjonline.com', +'post-gazette.com', +'superherohype.com', +'medicalnewstoday.com', +'amsrus.ru', +'om-saratov.ru', +'nstarikov.livejournal.com', +'rusrep.ru', +'oblast45.ru', +'mtv.com', +'canadafreepress.com', +'voanews.com', +'oleglurie-new.livejournal.com', +'russkiy-malchik.livejournal.com', +'finance.tut.by', +'m-kalashnikov.livejournal.com', +'vyatka.ru', +'business-class.su', +'nationalpost.com', +'63ru.livejournal.com', +'mchs.gov.by', +'naviny.by', +'ew.com', +'bloknot-volgodonsk.ru', +'stogova.livejournal.com', +'tv.mk.ru', +'realty.altapress.ru', +'i-korotchenko.livejournal.com', +'scalemodels.ru', +'etoonda.livejournal.com', +'evening-kazan.ru', +'bryansknovosti.ru', +'kushva-online.ru', +'belaruspartisan.org', +'inquisitr.com', +'infokam.su', +'healthinfo.ua', +'comicbook.com', +'mashable.com', +'washingtonexaminer.com', +'a-s-k-e-t.livejournal.com', +'sayanogorsk.info', +'dgl.ru', +'pervo.ru', +'omaha.com', +'mid-day.com', +'myfin.by', +'kotelnich.info', +'alex-anpilogov.livejournal.com', +'wrestrus.ru', +'7x7-journal.ru', +'natabelu.livejournal.com', +'biser.info', +'rus.postimees.ee', +'dela.ru', +'digitall-angell.livejournal.com', +'chron.com', +'chelny-biz.ru', +'a-nalgin.livejournal.com', +'kukmor.livejournal.com', +'crimerussia.ru', +'mordovmedia.ru', +'parade.com', +'3dtoday.ru', +'vkusnyblog.ru', +'newstula.ru', +'soccernews.ru', +'eilin-o-connor.livejournal.com', +'mentbuster.livejournal.com', +'kaotic.com', +'rossoshru.ru', +'she.ngs.ru', +'news.sarbc.ru', +'baikal-daily.ru', +'thequietus.com', +'flb.ru', +'stockinfocus.ru', +'xobi.com.ua', +'eonline.com', +'ru-railway.livejournal.com', +'andrey-cruz.livejournal.com', +'19rus.info', +'pauluskp.livejournal.com', +'calipsodellmar.livejournal.com', +'newtimes.kz', +'abcnews.go.com', +'plush-koala.livejournal.com', +'newscientist.com', +'ss69100.livejournal.com', +'contactmusic.com', +'smolnarod.ru', +'bnkirov.ru', +'norg-norg.livejournal.com', +'slashfilm.com', +'dallasnews.com', +'oren.ru', +'point.md', +'orelgrad.ru', +'pressball.by', +'forum-msk.org', +'gradus.pro', +'gazeta.uz', +'matveychev-oleg.livejournal.com', +'apsnypress.info', +'46tv.ru', +'ku66.ru', +'video.komarovskiy.net', +'mysanantonio.com', +'kavpolit.com', +'dima-piterski.livejournal.com', +'made-inussr.livejournal.com', +'thehill.com', +'sciencemag.org', +'pcmag.com', +'europaplustv.com', +'rjadovoj-rus.livejournal.com', +'govp.info', +'heritage.org', +'perm.kp.ru', +'shurigin.livejournal.com', +'tuday.ru', +'knews.kg', +'shushpanzer-ru.livejournal.com', +'webtous.ru', +'boston.com', +'odnako.org', +'ironworld.ru', +'dailybest.me', +'da-dzi.livejournal.com', +'versia.ru', +'autosport.com.ru', +'pravda-news.ru', +'pocketnow.com', +'asaratov.livejournal.com', +'dddkursk.ru', +'letohin.livejournal.com', +'theaustralian.com.au', +'steptohealth.ru', +'alexcheban.livejournal.com', +'lleo.me', +'prodengi.kz', +'readovka.ru', +'efir24.tv', +'ru-bykov.livejournal.com', +'today.kz', +'kasparov.ru.', +'chelsea-fc.ru', +'academ.info', +'feministki.livejournal.com', +'iarex.ru', +'marimedia.ru', +'androidcommunity.com', +'uzoranet.livejournal.com', +'ru-vederko.livejournal.com', +'tanjand.livejournal.com', +'komionline.ru', +'gazette.com', +'auto.tut.by', +'ted.com', +'mic.com', +'spb.mk.ru', +'berdsk-online.ru', +'ossetia.ru', +'ki-bella.livejournal.com', +'keytas.ru', +'severinform.ru', +'tvolk.ru', +'balashover.ru', +'tor.com', +'news.21.by', +'karelinform.ru', +'marv.livejournal.com', +'seekingalpha.com', +'ntsk.ru', +'ksy-putan.livejournal.com', +'universetoday.com', +'thenextweb.com', +'foma.ru', +'kchetverg.ru', +'ftbl.ru', +'altyn-orda.kz', +'ua.tribuna.com', +'56orb.ru', +'vesti.karelia.ru', +'haaretz.com', +'twentysix.ru', +'primorye24.ru', +'jsonline.com', +'tobolsk.info', +'tennessean.com', +'moment-istini.com', +'vrn.kp.ru', +'navalny.livejournal.com', +'roomble.com', +'observer.com', +'kyky.org', +'news.chita.ru', +'gov.cap.ru', +'ammo1.livejournal.com', +'wnyc.org', +'whrussia.ru', +'belan-olga.livejournal.com', +'arguendi.livejournal.com', +'freesmi.by', +'greenbot.com', +'(nemihail.livejournal.com', +'obltv.ru', +'sterlegrad.ru', +'mlive.com', +'gpk.gov.by', +'fanatik.kz', +'marina-yudenich.livejournal.com', +'afisha.ngs.ru', +'kupchinonews.ru', +'shakin.ru', +'silver.ru', +'mirnov.ru', +'techcrunch.com', +'streetinsider.com', +'otyrar.kz', +'siapress.ru', +'krsk.kp.ru', +'becky-sharpe.livejournal.com', +'mkala.ru', +'prosto-vova.livejournal.com', +'tagilcity.ru', +'bloknot-krasnodar.ru', +'greg-butcher.livejournal.com', +'popados.livejournal.com', +'mossudmed.livejournal.com', +'s13.ru', +'globalconflict.ru', +'newyorker.com', +'vladnews.ru', +'kadykchanskiy.livejournal.com', +'vladimir-krm.livejournal.com', +'globalpost.com', +'smolensk-i.ru', +'newsmax.com', +'providers.by', +'theverge.com', +'samsebeskazal.livejournal.com', +'vb.by', +'people.onliner.by', +'peopleandcountries.com', +'roizman.livejournal.com', +'omvesti.ru', +'sterlitamak.ru', +'patch.com', +'khabtime.info', +'winnipegfreepress.com', +'davydov-index.livejournal.com' +); diff --git a/yql/essentials/tests/sql/suites/in/in_ansi.sql b/yql/essentials/tests/sql/suites/in/in_ansi.sql new file mode 100644 index 0000000000..328826d33c --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi.sql @@ -0,0 +1,23 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN (2, 3, null), -- Nothing<Bool?> + null IN (), -- false? + null IN (null), -- Nothing<Bool?> + null IN (1), -- Nothing<Bool?> + (1, null) IN ((1, 1), (2, 2)), -- Nothing<Bool?> + (1, null) IN ((2, 2), (3, 3)), -- false? + (1, 2) IN ((1, null), (2, 2)), -- Nothing<Bool?> + (1, 2) IN ((null, 1), (2, 1)), -- false? + (1, 2) IN ((1, null), (2, 1)), -- Nothing<Bool?> + 128 IN (128ut, 1t), -- true +; + +SELECT + Just(1) IN (1, 2, 3), -- true? + 1 IN (Just(2), Just(3)), -- false? +; + diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_dict.sql b/yql/essentials/tests/sql/suites/in/in_ansi_dict.sql new file mode 100644 index 0000000000..aaf4b5590c --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_dict.sql @@ -0,0 +1,21 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN AsDict((2, "x"), (3, "y"), (null, "z")), -- Nothing<Bool?> + null IN DictCreate(Int32, String?), -- false? + null IN AsDict((null, "foo")), -- Nothing<Bool?> + null IN AsDict((1, "bar")), -- Nothing<Bool?> + (1, null) IN AsDict(((1, 1), null), ((2, 2), "foo")), -- Nothing<Bool?> + (1, null) IN AsDict(((2, 2), "foo"), ((3, 3), "bar")), -- false? + (1, 2) IN AsDict(((1, null), "foo"), ((2, 2), "bar")), -- Nothing<Bool?> + (1, 2) IN AsDict(((null, 1), "foo"), ((2, 1), null)), -- false? + (1, 2) IN AsDict(((1, null), "foo"), ((2, 1), "bar")), -- Nothing<Bool?> +; + +SELECT + Just(1) IN AsDict((1, "foo"), (2, "bar"), (3, null)), -- true? + 1 IN AsDict((Just(2), null), (Just(3), "bar")), -- false? +; diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_dict1.sql b/yql/essentials/tests/sql/suites/in/in_ansi_dict1.sql new file mode 100644 index 0000000000..82b00039bc --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_dict1.sql @@ -0,0 +1,12 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN {2, 3, null}, -- Nothing<Bool?> + 2 IN {2, 3, null}, -- true? + (1, 2) IN {(1, null), (2, 1)}, -- Nothing<Bool?> + (1, 2) IN {(1, null), (1, 2)}, -- true? +; + diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_empty.sql b/yql/essentials/tests/sql/suites/in/in_ansi_empty.sql new file mode 100644 index 0000000000..743967fdcf --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_empty.sql @@ -0,0 +1,17 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +SELECT + null IN EmptyList(), -- false? + null IN EmptyDict(), -- false? + null IN (), -- false? + 1 IN EmptyList(), -- false + 1 IN EmptyDict(), -- false + 1 IN (), -- false + null IN Nothing(EmptyList?), -- Nothing<Bool?> + null IN Nothing(EmptyDict?), -- Nothing<Bool?> + null IN Nothing(ParseType("Tuple<>?")), -- Nothing<Bool?> +; + diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_join.cfg b/yql/essentials/tests/sql/suites/in/in_ansi_join.cfg new file mode 100644 index 0000000000..ebb9b67252 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_join.cfg @@ -0,0 +1,2 @@ +in Input input_optkey1.txt +in Dict optdict.txt diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_join.sql b/yql/essentials/tests/sql/suites/in/in_ansi_join.sql new file mode 100644 index 0000000000..48bfb9d637 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_join.sql @@ -0,0 +1,52 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +USE plato; + +-- Input: optkeys are 1-10,null +-- Dict: keys are 1,5,7,9,11,null + +-- Either side can be: non-optional (P), optional without nulls (O), optional with nulls (N) - we test each of possible combination + +$lp = (SELECT Unwrap(optkey) AS optkey FROM Input WHERE optkey IS NOT NULL); +$lo = (SELECT optkey FROM Input WHERE optkey IS NOT NULL); +$ln = (SELECT optkey FROM Input); + +$rp = (SELECT Unwrap(key) AS key FROM Dict WHERE key IS NOT NULL); +$ro = (SELECT key FROM Dict WHERE key IS NOT NULL); +$rn = (SELECT key FROM Dict); + + +-- Right is P +SELECT optkey FROM $lp WHERE optkey NOT IN $rp ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $lo WHERE optkey NOT IN $rp ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $ln WHERE optkey NOT IN $rp ORDER BY optkey; -- [2,3,4,6,8,10] + +-- Right is O +SELECT optkey FROM $lp WHERE optkey NOT IN $ro ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $lo WHERE optkey NOT IN $ro ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $ln WHERE optkey NOT IN $ro ORDER BY optkey; -- [2,3,4,6,8,10] + +-- Right is N +SELECT optkey FROM $lp WHERE optkey NOT IN $rn ORDER BY optkey; -- [] +SELECT optkey FROM $lo WHERE optkey NOT IN $rn ORDER BY optkey; -- [] +SELECT optkey FROM $ln WHERE optkey NOT IN $rn ORDER BY optkey; -- [] + + +-- 2, 4, 6, null +$extraDict = ( + SELECT 2 AS key UNION ALL + SELECT 4 AS key UNION ALL + SELECT 6 AS key UNION ALL + SELECT NULL AS key +); + +SELECT optkey FROM $lo WHERE optkey != 10 AND optkey NOT IN $ro AND optkey IN $extraDict AND optkey != 4 ORDER BY optkey; -- [2,6] +SELECT optkey FROM $ln WHERE optkey != 10 AND optkey NOT IN $rn AND optkey IN $extraDict AND optkey != 4 ORDER BY optkey; -- [] + + +-- Empty dict +SELECT optkey FROM $ln WHERE optkey NOT IN (SELECT * FROM $rn LIMIT 0) ORDER BY optkey; -- [1-10,null] + diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_list.sql b/yql/essentials/tests/sql/suites/in/in_ansi_list.sql new file mode 100644 index 0000000000..d1d9f74a5c --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_list.sql @@ -0,0 +1,22 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN AsList(2, 3, null), -- Nothing<Bool?> + null IN ListCreate(Int32), -- false? + null IN AsList(null), -- Nothing<Bool?> + null IN AsList(1), -- Nothing<Bool?> + (1, null) IN AsList((1, 1), (2, 2)), -- Nothing<Bool?> + (1, null) IN AsList((2, 2), (3, 3)), -- false? + (1, 2) IN AsList((1, null), (2, 2)), -- Nothing<Bool?> + (1, 2) IN AsList((null, 1), (2, 1)), -- false? + (1, 2) IN AsList((1, null), (2, 1)), -- Nothing<Bool?> +; + +SELECT + Just(1) IN AsList(1, 2, 3), -- true? + 1 IN AsList(Just(2), Just(3)), -- false? +; + diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_list1.sql b/yql/essentials/tests/sql/suites/in/in_ansi_list1.sql new file mode 100644 index 0000000000..36d5a3f05f --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_list1.sql @@ -0,0 +1,12 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN [2, 3, null], -- Nothing<Bool?> + 2 IN [2, 3, null], -- true? + (1, 2) IN [(1, null), (2, 1)], -- Nothing<Bool?> + (1, 2) IN [(1, null), (1, 2)], -- true? +; + diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_set.sql b/yql/essentials/tests/sql/suites/in/in_ansi_set.sql new file mode 100644 index 0000000000..e1871507de --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_set.sql @@ -0,0 +1,22 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN AsSet(2, 3, null), -- Nothing<Bool?> + null IN SetCreate(Int32), -- false? + null IN AsSet(null), -- Nothing<Bool?> + null IN AsSet(1), -- Nothing<Bool?> + (1, null) IN AsSet((1, 1), (2, 2)), -- Nothing<Bool?> + (1, null) IN AsSet((2, 2), (3, 3)), -- false? + (1, 2) IN AsSet((1, null), (2, 2)), -- Nothing<Bool?> + (1, 2) IN AsSet((null, 1), (2, 1)), -- false? + (1, 2) IN AsSet((1, null), (2, 1)), -- Nothing<Bool?> +; + +SELECT + Just(1) IN AsSet(1, 2, 3), -- true? + 1 IN AsSet(Just(2), Just(3)), -- false? +; + diff --git a/yql/essentials/tests/sql/suites/in/in_ansi_variant.sql b/yql/essentials/tests/sql/suites/in/in_ansi_variant.sql new file mode 100644 index 0000000000..86b2a2dbfa --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_ansi_variant.sql @@ -0,0 +1,25 @@ +/* postgres can not */ +/* syntax version 1 */ +PRAGMA AnsiInForEmptyOrNullableItemsCollections; +Select Enum("foo",Enum<"foo","bar">) in ( + AsEnum("foo") + ), + Enum("foo",Enum<"foo","bar">) in ( + AsEnum("bar") + ), + Enum("foo",Enum<"foo","bar">) in ( + AsEnum("foo"), + AsEnum("bar") + ), + Enum("foo",Enum<"foo","bar">) in ( + AsEnum("bar"), + AsEnum("baz") + ), + Enum("foo",Enum<"foo","bar">) in [ + AsEnum("foo"), + AsEnum("bar") + ], + Enum("foo",Enum<"foo","bar">) in { + AsEnum("bar"), + AsEnum("baz") + };
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/in/in_compact_distinct-empty.cfg b/yql/essentials/tests/sql/suites/in/in_compact_distinct-empty.cfg new file mode 100644 index 0000000000..6fe36b7db3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_compact_distinct-empty.cfg @@ -0,0 +1,2 @@ +in Input input.txt +in Input1 empty.txt diff --git a/yql/essentials/tests/sql/suites/in/in_compact_distinct.cfg b/yql/essentials/tests/sql/suites/in/in_compact_distinct.cfg new file mode 100644 index 0000000000..50ebbf3511 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_compact_distinct.cfg @@ -0,0 +1,2 @@ +in Input input.txt +in Input1 input.txt diff --git a/yql/essentials/tests/sql/suites/in/in_compact_distinct.sql b/yql/essentials/tests/sql/suites/in/in_compact_distinct.sql new file mode 100644 index 0000000000..f941a8facd --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_compact_distinct.sql @@ -0,0 +1,6 @@ +/* postgres can not */ +use plato; + +select * from Input +where key in compact (select distinct key from Input1) +order by key; diff --git a/yql/essentials/tests/sql/suites/in/in_enum_single0.sql b/yql/essentials/tests/sql/suites/in/in_enum_single0.sql new file mode 100644 index 0000000000..f29aa9092e --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_enum_single0.sql @@ -0,0 +1 @@ +select * from plato.Input where key in ("023") diff --git a/yql/essentials/tests/sql/suites/in/in_enum_single1.sql b/yql/essentials/tests/sql/suites/in/in_enum_single1.sql new file mode 100644 index 0000000000..33d6f33878 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_enum_single1.sql @@ -0,0 +1,2 @@ +/* postgres can not */ +select * from plato.Input where cast(key as uint32) not in (150,) diff --git a/yql/essentials/tests/sql/suites/in/in_exists_immediate_nested_subq.cfg b/yql/essentials/tests/sql/suites/in/in_exists_immediate_nested_subq.cfg new file mode 100644 index 0000000000..a6d8867ac9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_exists_immediate_nested_subq.cfg @@ -0,0 +1,6 @@ +in Input input.txt +in Input2 input2.txt +in Input3 input3.txt +in Input4 input4.txt +providers yt + diff --git a/yql/essentials/tests/sql/suites/in/in_exists_immediate_nested_subq.sql b/yql/essentials/tests/sql/suites/in/in_exists_immediate_nested_subq.sql new file mode 100644 index 0000000000..44928dec83 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_exists_immediate_nested_subq.sql @@ -0,0 +1,14 @@ +/* postgres can not */ +/* ignore runonopt plan diff */ + +use plato; + +$q = (select key from Input order by key limit 100); +$q1 = (select * from $q order by key limit 100); + +select * from Input where key in (select * from $q order by key limit 100) order by key; +select * from Input where key in $q1 order by key; + +SELECT EXISTS (select key from $q) from Input; + +SELECT $q; diff --git a/yql/essentials/tests/sql/suites/in/in_immediate_subquery.sql b/yql/essentials/tests/sql/suites/in/in_immediate_subquery.sql new file mode 100644 index 0000000000..e3a7202fc5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_immediate_subquery.sql @@ -0,0 +1,6 @@ +/* postgres can not */ +use plato; + +select * from Input4 where subkey not in (select key || "0" from Input4) order by key,subkey; + +select * from Input4 where subkey in compact(select key || "0" from Input4) order by key,subkey; diff --git a/yql/essentials/tests/sql/suites/in/in_noansi.sql b/yql/essentials/tests/sql/suites/in/in_noansi.sql new file mode 100644 index 0000000000..43836c9f60 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_noansi.sql @@ -0,0 +1,23 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA DisableAnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN (2, 3, null), -- false + null IN (), -- Nothing<Bool?> + null IN (null), -- Nothing<Bool?> + null IN (1), -- Nothing<Bool?> + (1, null) IN ((1, 1), (2, 2)), -- Nothing<Bool?> + (1, null) IN ((2, 2), (3, 3)), -- Nothing<Bool?> + (1, 2) IN ((1, null), (2, 2)), -- false + (1, 2) IN ((null, 1), (2, 1)), -- false + (1, 2) IN ((1, null), (2, 1)), -- false + 128 IN (128ut, 1t), -- true +; + +SELECT + Just(1) IN (1, 2, 3), -- true? + 1 IN (Just(2), Just(3)), -- false +; + diff --git a/yql/essentials/tests/sql/suites/in/in_noansi_empty.sql b/yql/essentials/tests/sql/suites/in/in_noansi_empty.sql new file mode 100644 index 0000000000..87c50a0fb9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_noansi_empty.sql @@ -0,0 +1,17 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA DisableAnsiInForEmptyOrNullableItemsCollections; + +SELECT + null IN EmptyList(), -- Nothing<Bool?> + null IN EmptyDict(), -- Nothing<Bool?> + null IN (), -- Nothing<Bool?> + 1 IN EmptyList(), -- false + 1 IN EmptyDict(), -- false + 1 IN (), -- false + null IN Nothing(EmptyList?), -- Nothing<Bool?> + null IN Nothing(EmptyDict?), -- Nothing<Bool?> + null IN Nothing(ParseType("Tuple<>?")), -- Nothing<Bool?> +; + diff --git a/yql/essentials/tests/sql/suites/in/in_noansi_join.cfg b/yql/essentials/tests/sql/suites/in/in_noansi_join.cfg new file mode 100644 index 0000000000..ebb9b67252 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_noansi_join.cfg @@ -0,0 +1,2 @@ +in Input input_optkey1.txt +in Dict optdict.txt diff --git a/yql/essentials/tests/sql/suites/in/in_noansi_join.sql b/yql/essentials/tests/sql/suites/in/in_noansi_join.sql new file mode 100644 index 0000000000..ee043447f3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_noansi_join.sql @@ -0,0 +1,52 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA DisableAnsiInForEmptyOrNullableItemsCollections; + +USE plato; + +-- Input: optkeys are 1-10,null +-- Dict: keys are 1,5,7,9,11,null + +-- Either side can be: non-optional (P), optional without nulls (O), optional with nulls (N) - we test each of possible combination + +$lp = (SELECT Unwrap(optkey) AS optkey FROM Input WHERE optkey IS NOT NULL); +$lo = (SELECT optkey FROM Input WHERE optkey IS NOT NULL); +$ln = (SELECT optkey FROM Input); + +$rp = (SELECT Unwrap(key) AS key FROM Dict WHERE key IS NOT NULL); +$ro = (SELECT key FROM Dict WHERE key IS NOT NULL); +$rn = (SELECT key FROM Dict); + + +-- Right is P +SELECT optkey FROM $lp WHERE optkey NOT IN $rp ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $lo WHERE optkey NOT IN $rp ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $ln WHERE optkey NOT IN $rp ORDER BY optkey; -- [null,2,3,4,6,8,10] + +-- Right is O +SELECT optkey FROM $lp WHERE optkey NOT IN $ro ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $lo WHERE optkey NOT IN $ro ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $ln WHERE optkey NOT IN $ro ORDER BY optkey; -- [null,2,3,4,6,8,10] + +-- Right is N +SELECT optkey FROM $lp WHERE optkey NOT IN $rn ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $lo WHERE optkey NOT IN $rn ORDER BY optkey; -- [2,3,4,6,8,10] +SELECT optkey FROM $ln WHERE optkey NOT IN $rn ORDER BY optkey; -- [null,2,3,4,6,8,10] + + +-- 2, 4, 6, null +$extraDict = ( + SELECT 2 AS key UNION ALL + SELECT 4 AS key UNION ALL + SELECT 6 AS key UNION ALL + SELECT NULL AS key +); + +SELECT optkey FROM $lo WHERE optkey != 10 AND optkey NOT IN $ro AND optkey IN $extraDict AND optkey != 4 ORDER BY optkey; -- [2,6] +SELECT optkey FROM $ln WHERE optkey != 10 AND optkey NOT IN $rn AND optkey IN $extraDict AND optkey != 4 ORDER BY optkey; -- [2,6] + + +-- Empty dict +SELECT optkey FROM $ln WHERE optkey NOT IN (SELECT * FROM $rn LIMIT 0) ORDER BY optkey; -- [1-10,null] + diff --git a/yql/essentials/tests/sql/suites/in/in_noansi_list_dict.sql b/yql/essentials/tests/sql/suites/in/in_noansi_list_dict.sql new file mode 100644 index 0000000000..0c75cd6bc9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_noansi_list_dict.sql @@ -0,0 +1,17 @@ +/* syntax version 1 */ +/* postgres can not */ + +PRAGMA DisableAnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN [2, 3, null], -- false + 2 IN [2, 3, null], -- true + (1, 2) IN [(1, null), (2, 1)], -- false + (1, 2) IN [(1, null), (1, 2)], -- true + + 1 IN {2, 3, null}, -- false + 2 IN {2, 3, null}, -- true + (1, 2) IN {(1, null), (2, 1)}, -- false + (1, 2) IN {(1, null), (1, 2)}, -- true +; + diff --git a/yql/essentials/tests/sql/suites/in/in_nonliteral_tuple.sql b/yql/essentials/tests/sql/suites/in/in_nonliteral_tuple.sql new file mode 100644 index 0000000000..9a3e1994c9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_nonliteral_tuple.sql @@ -0,0 +1,3 @@ +PRAGMA DisableAnsiInForEmptyOrNullableItemsCollections; + +select 1 in if(1 > 0, (1, 10, 301, 310,), (311,)) diff --git a/yql/essentials/tests/sql/suites/in/in_nonliteral_tuple_ansi.sql b/yql/essentials/tests/sql/suites/in/in_nonliteral_tuple_ansi.sql new file mode 100644 index 0000000000..ff5b32e4cb --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_nonliteral_tuple_ansi.sql @@ -0,0 +1,3 @@ +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +select 1 in if(1 > 0, (1, 10, 301, 310,), (311,)) diff --git a/yql/essentials/tests/sql/suites/in/in_scalar_vector_subquery.sql b/yql/essentials/tests/sql/suites/in/in_scalar_vector_subquery.sql new file mode 100644 index 0000000000..b92955efde --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_scalar_vector_subquery.sql @@ -0,0 +1,29 @@ +/* postgres can not */ + +use plato; + +$bar = (select "1" union all select "2"); +$barr = (select "1" as subkey union all select "2" as subkey); + +select "1" in $bar, "2" in $bar; +select "3" in $bar; + +select "1" in AsList($barr), "2" in AsList($barr); +select "3" in AsList($barr); + +select * from Input where subkey in $bar order by subkey; +select * from Input where subkey in AsList($barr) order by subkey; + +-- same content as $bar +$baz = (select subkey from Input where subkey == "1" or subkey == "2"); +$bazz = (select subkey from Input where subkey < "3" order by subkey asc limit 1); + +select "1" in $baz, "2" in $baz; +select "3" in $baz; + +select "1" in AsList($bazz), "2" in AsList($bazz); +select "3" in AsList($bazz); + +select * from Input where subkey in $baz order by subkey; +select * from Input where subkey in AsList($bazz) order by subkey; + diff --git a/yql/essentials/tests/sql/suites/in/in_sorted.cfg b/yql/essentials/tests/sql/suites/in/in_sorted.cfg new file mode 100644 index 0000000000..1ab381f28d --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_sorted.cfg @@ -0,0 +1 @@ +in InputSorted sorted.txt diff --git a/yql/essentials/tests/sql/suites/in/in_sorted.sql b/yql/essentials/tests/sql/suites/in/in_sorted.sql new file mode 100644 index 0000000000..20907b1bee --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_sorted.sql @@ -0,0 +1,7 @@ +/* postgres can not */ +/* syntax version 1 */ +use plato; + +$in = select key from InputSorted where key < "100"; + +select * from InputSorted where key in $in; diff --git a/yql/essentials/tests/sql/suites/in/in_sorted_by_tuple.cfg b/yql/essentials/tests/sql/suites/in/in_sorted_by_tuple.cfg new file mode 100644 index 0000000000..8d8f865ecc --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_sorted_by_tuple.cfg @@ -0,0 +1,2 @@ +in InputSorted sorted.txt +in Input input.txt diff --git a/yql/essentials/tests/sql/suites/in/in_sorted_by_tuple.sql b/yql/essentials/tests/sql/suites/in/in_sorted_by_tuple.sql new file mode 100644 index 0000000000..ff3e72a710 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_sorted_by_tuple.sql @@ -0,0 +1,10 @@ +/* postgres can not */ +/* syntax version 1 */ +use plato; + +select value, AGG_LIST_DISTINCT(tpl) as tuples +from ( + select AsTuple(key, subkey, value) as tpl, value from InputSorted +) +where value in (select DISTINCT value from Input) +group by value; diff --git a/yql/essentials/tests/sql/suites/in/in_tablesource_on_raw_list.cfg b/yql/essentials/tests/sql/suites/in/in_tablesource_on_raw_list.cfg new file mode 100644 index 0000000000..a6d8867ac9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tablesource_on_raw_list.cfg @@ -0,0 +1,6 @@ +in Input input.txt +in Input2 input2.txt +in Input3 input3.txt +in Input4 input4.txt +providers yt + diff --git a/yql/essentials/tests/sql/suites/in/in_tablesource_on_raw_list.sql b/yql/essentials/tests/sql/suites/in/in_tablesource_on_raw_list.sql new file mode 100644 index 0000000000..07522e60f6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tablesource_on_raw_list.sql @@ -0,0 +1,7 @@ +/* syntax version 1 */ +use plato; +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +$src = (select cast(key as Int32) from Input); + +select ListFilter(ListFromRange(1, 100), ($i) -> { RETURN $i IN $src; }); diff --git a/yql/essentials/tests/sql/suites/in/in_tablesource_to_equijoin.cfg b/yql/essentials/tests/sql/suites/in/in_tablesource_to_equijoin.cfg new file mode 100644 index 0000000000..35c6d38395 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tablesource_to_equijoin.cfg @@ -0,0 +1 @@ +in Input input_optkey.txt diff --git a/yql/essentials/tests/sql/suites/in/in_tablesource_to_equijoin.sql b/yql/essentials/tests/sql/suites/in/in_tablesource_to_equijoin.sql new file mode 100644 index 0000000000..60ebfb97d9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tablesource_to_equijoin.sql @@ -0,0 +1,27 @@ +/* postgres can not */ + +USE plato; + +$r4_20 = (SELECT optkey FROM Input WHERE optkey BETWEEN 4 AND 20); +$r6_20 = (SELECT key FROM Input WHERE optkey BETWEEN 6 AND 20); +$r8_20 = (SELECT key FROM Input WHERE optkey BETWEEN 8 AND 20); +$r10_20 = (SELECT optkey FROM Input WHERE optkey BETWEEN 10 AND 20); + +$r1_16 = (SELECT optkey FROM Input WHERE optkey BETWEEN 1 AND 16); +$r1_12 = (SELECT key FROM Input WHERE optkey BETWEEN 1 AND 12); + +SELECT key FROM Input WHERE + (key + 1) IN $r4_20 AND -- key = [3, 19] -- 2 joinable + optkey IN $r6_20 AND -- key = [6, 19] + + key IN /*+ COMPACT() */ $r8_20 AND -- key = [8, 19] -- 1 nonjoinable (due to COMPACT) + + (optkey + 3) IN $r10_20 AND -- key = [8, 17] -- 3 joinable + (key + 4) NOT IN $r1_12 AND -- key = [9, 17] + key IN $r10_20 AND -- key = [10, 17] + + (optkey IN $r1_16 OR key IN $r1_16) AND -- key = [10, 16] -- 1 nonjoinable (not SqlIn) + + (key - 1) IN $r1_12 AND -- key = [10, 13] -- 2 joinable + (key - 3) NOT IN $r8_20 -- key = [10] + diff --git a/yql/essentials/tests/sql/suites/in/in_tuple_check0_fail.cfg b/yql/essentials/tests/sql/suites/in/in_tuple_check0_fail.cfg new file mode 100644 index 0000000000..eb2e5315d1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tuple_check0_fail.cfg @@ -0,0 +1 @@ +xfail
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/in/in_tuple_check0_fail.sql b/yql/essentials/tests/sql/suites/in/in_tuple_check0_fail.sql new file mode 100644 index 0000000000..6c8928c351 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tuple_check0_fail.sql @@ -0,0 +1,5 @@ +select AsTuple(1, 1) in ( + AsTuple(2, 1), + AsTuple(1, 2), + AsTuple(1, AsTuple(1, 2)), -- expect compatible tuple +) diff --git a/yql/essentials/tests/sql/suites/in/in_tuple_check1_fail.cfg b/yql/essentials/tests/sql/suites/in/in_tuple_check1_fail.cfg new file mode 100644 index 0000000000..eb2e5315d1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tuple_check1_fail.cfg @@ -0,0 +1 @@ +xfail
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/in/in_tuple_check1_fail.sql b/yql/essentials/tests/sql/suites/in/in_tuple_check1_fail.sql new file mode 100644 index 0000000000..ae352a79b6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tuple_check1_fail.sql @@ -0,0 +1,5 @@ +select AsTuple(1, 1) in ( + AsTuple(2, 1), + AsTuple(1, 2), + 42 -- expect tuple, not data +) diff --git a/yql/essentials/tests/sql/suites/in/in_tuple_table.sql b/yql/essentials/tests/sql/suites/in/in_tuple_table.sql new file mode 100644 index 0000000000..a36004f819 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_tuple_table.sql @@ -0,0 +1,4 @@ +USE Plato; +SELECT 'c' IN t +FROM InputWithTuples; + diff --git a/yql/essentials/tests/sql/suites/in/in_types_cast.sql b/yql/essentials/tests/sql/suites/in/in_types_cast.sql new file mode 100644 index 0000000000..8b3e5c71de --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_types_cast.sql @@ -0,0 +1,2 @@ +/* postgres can not */ +select * from plato.Input where cast(key as uint32) not in (150,150ul) diff --git a/yql/essentials/tests/sql/suites/in/in_types_cast_all.sql b/yql/essentials/tests/sql/suites/in/in_types_cast_all.sql new file mode 100644 index 0000000000..709882ae86 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_types_cast_all.sql @@ -0,0 +1,9 @@ +/* postgres can not */ +select * from plato.Input where cast(key as Uint8) in +( + 1u, + 3l, + 23ul, + 255, -- out of Uint8 + 0, +) diff --git a/yql/essentials/tests/sql/suites/in/in_with_cast.sql b/yql/essentials/tests/sql/suites/in/in_with_cast.sql new file mode 100644 index 0000000000..ca43785625 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_cast.sql @@ -0,0 +1,8 @@ +/* postgres can not */ +SELECT + Null in (100500) as `void`, + Just(cast(1 as Uint8)) in (23, Null, 32, Null, 255) as byte_wrap_match, + cast(5 as int64) in (1, 5, 42l) as different_types, + 3.14 in (1, 3, 4) as pi_not_exact, + 3.14 in (1, 3, 4, 3 + 0.14) as pi_in_expr, + 'end' as end diff --git a/yql/essentials/tests/sql/suites/in/in_with_list_dict.sql b/yql/essentials/tests/sql/suites/in/in_with_list_dict.sql new file mode 100644 index 0000000000..44993dd1d8 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_list_dict.sql @@ -0,0 +1,7 @@ +/* postgres can not */ + +$l = AsList(1, 2, 3, 800); +$d = AsDict(AsTuple(1, 0), AsTuple(2, 0), AsTuple(3, 0), AsTuple(800, 0)); + +SELECT key, CAST(key AS int32) IN $l, CAST(key AS int32) IN $d FROM plato.Input; + diff --git a/yql/essentials/tests/sql/suites/in/in_with_literal_list_of_structs.sql b/yql/essentials/tests/sql/suites/in/in_with_literal_list_of_structs.sql new file mode 100644 index 0000000000..330ee0e6f2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_literal_list_of_structs.sql @@ -0,0 +1,2 @@ +/* postgres can not */ +select AsStruct(1 as x) in AsList(AsStruct(1 as x), AsStruct(2 as x)); diff --git a/yql/essentials/tests/sql/suites/in/in_with_literal_list_of_structs_ansi.sql b/yql/essentials/tests/sql/suites/in/in_with_literal_list_of_structs_ansi.sql new file mode 100644 index 0000000000..74d30c1ed2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_literal_list_of_structs_ansi.sql @@ -0,0 +1,3 @@ +/* postgres can not */ +pragma AnsiInForEmptyOrNullableItemsCollections; +select AsStruct(1 as x) in AsList(AsStruct(1 as x), AsStruct(2 as x)); diff --git a/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals.sql b/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals.sql new file mode 100644 index 0000000000..69b840e559 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals.sql @@ -0,0 +1,29 @@ +/* postgres can not */ + +$pt = AsTuple(1, 2, 3); +$et = Nothing(ParseType("Tuple<Int32, Int32, Int32>?")); + +SELECT + 1 IN $pt, -- true + 100 IN $pt, -- false + 1/1 IN $pt, -- Just(true) + 1/0 IN $pt, -- Nothing(bool) + NULL IN $pt, -- Nothing(bool) + + 1 IN Just($pt), -- Just(true) + 100 IN Just($pt), -- Just(false) + 1/1 IN Just($pt), -- Just(true) + 1/0 IN Just($pt), -- Nothing(bool) + NULL IN Just($pt), -- Nothing(bool) + + 1 IN $et, -- Nothing(bool) starting from here + 100 IN $et, + 1/1 IN $et, + 1/0 IN $et, + NULL IN $et, + + 1 IN NULL, + 100 IN NULL, + 1/1 IN NULL, + 1/0 IN NULL, + NULL IN NULL; diff --git a/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals_extra.sql b/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals_extra.sql new file mode 100644 index 0000000000..2242c60ac6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals_extra.sql @@ -0,0 +1,12 @@ +/* postgres can not */ +PRAGMA DisableAnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN (2,3,null), -- false + 1 IN (null), -- false + (1, null) IN ((1,2), (1, 3), (1, null)), -- Nothing<Bool?> + (1, 1) IN ((1,null)), -- false + (1, 1) IN ((1,1),(2,null)), -- true + (1, null) IN ((1,2), (1,3)), -- Nothing<Bool?> + (2, null) IN ((1,2), (1,3)), -- Nothing<Bool?> + (1, null) IN (); -- Nothing<Bool?> diff --git a/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals_extra_ansi.sql b/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals_extra_ansi.sql new file mode 100644 index 0000000000..ae0b7e348f --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_nulls_and_optionals_extra_ansi.sql @@ -0,0 +1,12 @@ +/* postgres can not */ +PRAGMA AnsiInForEmptyOrNullableItemsCollections; + +SELECT + 1 IN (2,3,null), -- Nothing<Bool?> + 1 IN (null), -- Nothing<Bool?> + (1, null) IN ((1,2), (1, 3), (1, null)), -- Nothing<Bool?> + (1, 1) IN ((1,null)), -- Nothing<Bool?> + (1, 1) IN ((1,1),(2,null)), -- Just(true) + (1, null) IN ((1,2), (1,3)), -- Nothing<Bool?> + (2, null) IN ((1,2), (1,3)), -- Just(false) + (1, null) IN (); -- Just(false) diff --git a/yql/essentials/tests/sql/suites/in/in_with_opt_tuple.sql b/yql/essentials/tests/sql/suites/in/in_with_opt_tuple.sql new file mode 100644 index 0000000000..98735c8ead --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_opt_tuple.sql @@ -0,0 +1,8 @@ +/* postgres can not */ +SELECT * +FROM plato.Input +WHERE AsTuple(cast(key as int32), cast(subkey as int32)) in ( + AsTuple(42, 5), + AsTuple(75, 1), + AsTuple(20, 3), +); diff --git a/yql/essentials/tests/sql/suites/in/in_with_subquery_where.sqlx b/yql/essentials/tests/sql/suites/in/in_with_subquery_where.sqlx new file mode 100644 index 0000000000..3834cbca30 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_subquery_where.sqlx @@ -0,0 +1,14 @@ +/* postgres can not */ +USE plato; +pragma warning("error", "4501"); + +$subq = (SELECT subkey FROM Input WHERE value = "ddd"); + +--INSERT INTO Output +SELECT + key as key, + "" as subkey, + "value:" || value as value +FROM Input +WHERE subkey in ($subq) +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/in/in_with_table_of_tuples.sql b/yql/essentials/tests/sql/suites/in/in_with_table_of_tuples.sql new file mode 100644 index 0000000000..1e07ae5548 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_table_of_tuples.sql @@ -0,0 +1,16 @@ +/* postgres can not */ +use plato; + +$t1 = AsList( + AsStruct(75 as key, 1 as subkey), + AsStruct(800 as key, 2 as subkey)); + +insert into @t1 +select * from AS_TABLE($t1); + +commit; + +$tuples = (select AsTuple(key, subkey) from @t1); + +select * from Input +where AsTuple(cast(key as uint64), cast(subkey as uint64)) in $tuples diff --git a/yql/essentials/tests/sql/suites/in/in_with_tuple.sql b/yql/essentials/tests/sql/suites/in/in_with_tuple.sql new file mode 100644 index 0000000000..bb280827f9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_tuple.sql @@ -0,0 +1,9 @@ +/* postgres can not */ +SELECT * +FROM plato.Input +WHERE AsTuple(cast(key as int32) ?? 0, cast(subkey as int32) ?? 0) in ( + AsTuple(800, 1), + AsTuple(800, 2), + AsTuple(800, 3), + AsTuple(800, 4), +); diff --git a/yql/essentials/tests/sql/suites/in/in_with_tuple_simple.sql b/yql/essentials/tests/sql/suites/in/in_with_tuple_simple.sql new file mode 100644 index 0000000000..d6a7e7b10e --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/in_with_tuple_simple.sql @@ -0,0 +1,5 @@ +/* postgres can not */ +SELECT + AsTuple(1,1) -- tuple is unsupported +IN + (AsTuple(1, 1)) diff --git a/yql/essentials/tests/sql/suites/in/input.txt b/yql/essentials/tests/sql/suites/in/input.txt new file mode 100644 index 0000000000..65949ea745 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/input.txt @@ -0,0 +1,4 @@ +{"key"="075";"subkey"="1";"value"="abc"}; +{"key"="800";"subkey"="2";"value"="ddd"}; +{"key"="020";"subkey"="3";"value"="q"}; +{"key"="150";"subkey"="4";"value"="qzz"}; diff --git a/yql/essentials/tests/sql/suites/in/input4.txt b/yql/essentials/tests/sql/suites/in/input4.txt new file mode 100644 index 0000000000..65f33616b2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/input4.txt @@ -0,0 +1,9 @@ +{"key"="0";"subkey"="10";"value"="FOO"}; +{"key"="0";"subkey"="40";"value"="FOO"}; +{"key"="1";"subkey"="10";"value"="FOO"}; +{"key"="1";"subkey"="20";"value"="BAR"}; +{"key"="1";"subkey"="40";"value"="BAR"}; +{"key"="1";"subkey"="50";"value"="WAT"}; +{"key"="2";"subkey"="40";"value"="WAT"}; +{"key"="2";"subkey"="50";"value"="FOO"}; +{"key"="2";"subkey"="60";"value"="BAR"}; diff --git a/yql/essentials/tests/sql/suites/in/input_optkey.txt b/yql/essentials/tests/sql/suites/in/input_optkey.txt new file mode 100644 index 0000000000..eb67e7ff0b --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/input_optkey.txt @@ -0,0 +1,21 @@ +{"key"=1; "optkey"=1; value="1" }; +{"key"=2; "optkey"=2; value="2" }; +{"key"=3; "optkey"=3; value="3" }; +{"key"=4; "optkey"=4; value="4" }; +{"key"=5; "optkey"=5; value="5" }; +{"key"=6; "optkey"=6; value="6" }; +{"key"=7; "optkey"=7; value="7" }; +{"key"=8; "optkey"=8; value="8" }; +{"key"=9; "optkey"=9; value="9" }; +{"key"=10; "optkey"=10; value="10"}; +{"key"=11; "optkey"=11; value="11"}; +{"key"=12; "optkey"=12; value="12"}; +{"key"=13; "optkey"=13; value="13"}; +{"key"=14; "optkey"=14; value="14"}; +{"key"=15; "optkey"=15; value="15"}; +{"key"=16; "optkey"=16; value="16"}; +{"key"=17; "optkey"=17; value="17"}; +{"key"=18; "optkey"=18; value="18"}; +{"key"=19; "optkey"=19; value="19"}; +{"key"=20; "optkey"=20; value="20"}; +{"key"=21; "optkey"=#; value="null"}; diff --git a/yql/essentials/tests/sql/suites/in/input_optkey.txt.attr b/yql/essentials/tests/sql/suites/in/input_optkey.txt.attr new file mode 100644 index 0000000000..1ca6ee6155 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/input_optkey.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int32"]]; + ["optkey";["OptionalType";["DataType";"Int32"]]]; + ["value";["DataType";"String"]]] + ]; +}} diff --git a/yql/essentials/tests/sql/suites/in/input_optkey1.txt b/yql/essentials/tests/sql/suites/in/input_optkey1.txt new file mode 100644 index 0000000000..8b22cd7071 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/input_optkey1.txt @@ -0,0 +1,11 @@ +{"key"=1; "optkey"=1; value="1" }; +{"key"=2; "optkey"=2; value="2" }; +{"key"=3; "optkey"=3; value="3" }; +{"key"=4; "optkey"=4; value="4" }; +{"key"=5; "optkey"=5; value="5" }; +{"key"=6; "optkey"=6; value="6" }; +{"key"=7; "optkey"=7; value="7" }; +{"key"=8; "optkey"=8; value="8" }; +{"key"=9; "optkey"=9; value="9" }; +{"key"=10; "optkey"=10; value="10"}; +{"key"=11; "optkey"=#; value="null"}; diff --git a/yql/essentials/tests/sql/suites/in/input_optkey1.txt.attr b/yql/essentials/tests/sql/suites/in/input_optkey1.txt.attr new file mode 100644 index 0000000000..1ca6ee6155 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/input_optkey1.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int32"]]; + ["optkey";["OptionalType";["DataType";"Int32"]]]; + ["value";["DataType";"String"]]] + ]; +}} diff --git a/yql/essentials/tests/sql/suites/in/input_with_tuples.txt b/yql/essentials/tests/sql/suites/in/input_with_tuples.txt new file mode 100644 index 0000000000..6361ba135d --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/input_with_tuples.txt @@ -0,0 +1,3 @@ +{"t"=["a"; "b"; "c"]}; +{"t"=["a"; "b"; "d"]}; + diff --git a/yql/essentials/tests/sql/suites/in/input_with_tuples.txt.attr b/yql/essentials/tests/sql/suites/in/input_with_tuples.txt.attr new file mode 100644 index 0000000000..429fb94586 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/input_with_tuples.txt.attr @@ -0,0 +1,9 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["t"; ["TupleType"; [ + ["DataType"; "String"]; + ["DataType"; "String"]; + ["DataType"; "String"] + ]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/in/large_in_YQL-19183-ansi.cfg b/yql/essentials/tests/sql/suites/in/large_in_YQL-19183-ansi.cfg new file mode 100644 index 0000000000..1d3299a333 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/large_in_YQL-19183-ansi.cfg @@ -0,0 +1 @@ +pragma AnsiInForEmptyOrNullableItemsCollections diff --git a/yql/essentials/tests/sql/suites/in/large_in_YQL-19183.cfg b/yql/essentials/tests/sql/suites/in/large_in_YQL-19183.cfg new file mode 100644 index 0000000000..2ea925230e --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/large_in_YQL-19183.cfg @@ -0,0 +1 @@ +pragma warning("disable","1108") diff --git a/yql/essentials/tests/sql/suites/in/large_in_YQL-19183.sql b/yql/essentials/tests/sql/suites/in/large_in_YQL-19183.sql new file mode 100644 index 0000000000..fb9209fee0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/large_in_YQL-19183.sql @@ -0,0 +1,10 @@ +$a = ('x',); +$b1 = ('x','y1'); +$b2 = ('x','y2'); +$b3 = ('x','y3'); +$b4 = ('x','y4'); +$b5 = ('x','y5'); +$b6 = ('x','y6'); + +SELECT $a in ($a, $b1, $b2, $b3, $b4, $b5, $b6) + diff --git a/yql/essentials/tests/sql/suites/in/optdict.txt b/yql/essentials/tests/sql/suites/in/optdict.txt new file mode 100644 index 0000000000..15f55da049 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/optdict.txt @@ -0,0 +1,6 @@ +{"key"=1}; +{"key"=#}; +{"key"=5}; +{"key"=7}; +{"key"=9}; +{"key"=11}; diff --git a/yql/essentials/tests/sql/suites/in/optdict.txt.attr b/yql/essentials/tests/sql/suites/in/optdict.txt.attr new file mode 100644 index 0000000000..c57013cea5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/optdict.txt.attr @@ -0,0 +1,5 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["OptionalType";["DataType";"Int32"]]]] + ]; +}} diff --git a/yql/essentials/tests/sql/suites/in/small_in_YQL-19183-ansi.cfg b/yql/essentials/tests/sql/suites/in/small_in_YQL-19183-ansi.cfg new file mode 100644 index 0000000000..1d3299a333 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/small_in_YQL-19183-ansi.cfg @@ -0,0 +1 @@ +pragma AnsiInForEmptyOrNullableItemsCollections diff --git a/yql/essentials/tests/sql/suites/in/small_in_YQL-19183.cfg b/yql/essentials/tests/sql/suites/in/small_in_YQL-19183.cfg new file mode 100644 index 0000000000..2ea925230e --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/small_in_YQL-19183.cfg @@ -0,0 +1 @@ +pragma warning("disable","1108") diff --git a/yql/essentials/tests/sql/suites/in/small_in_YQL-19183.sql b/yql/essentials/tests/sql/suites/in/small_in_YQL-19183.sql new file mode 100644 index 0000000000..a351ad39bb --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/small_in_YQL-19183.sql @@ -0,0 +1,5 @@ +$a = ('x',); +$b = ('x','y'); + +SELECT $a in ($a, $b); + diff --git a/yql/essentials/tests/sql/suites/in/sorted.txt b/yql/essentials/tests/sql/suites/in/sorted.txt new file mode 100644 index 0000000000..2ede97b886 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/sorted.txt @@ -0,0 +1,6 @@ +{"key"="023";"subkey"="3";"value"="aaa"}; +{"key"="037";"subkey"="5";"value"="ddd"}; +{"key"="075";"subkey"="1";"value"="abc"}; +{"key"="150";"subkey"="1";"value"="aaa"}; +{"key"="150";"subkey"="3";"value"="iii"}; +{"key"="150";"subkey"="8";"value"="zzz"}; diff --git a/yql/essentials/tests/sql/suites/in/sorted.txt.attr b/yql/essentials/tests/sql/suites/in/sorted.txt.attr new file mode 100644 index 0000000000..ed13e20223 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/sorted.txt.attr @@ -0,0 +1,11 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"String"]]; + ["subkey";["DataType";"String"]]; + ["value";["DataType";"String"]] + ]]; + "SortDirections"=[1;1;]; + "SortedBy"=["key";"subkey";]; + "SortedByTypes"=[["DataType";"String";];["DataType";"String";];]; + "SortMembers"=["key";"subkey";]; +}} diff --git a/yql/essentials/tests/sql/suites/in/yql-10038.sql b/yql/essentials/tests/sql/suites/in/yql-10038.sql new file mode 100644 index 0000000000..f5f75a1990 --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/yql-10038.sql @@ -0,0 +1,18 @@ +/* postgres can not */ +use plato; + +insert into @input +select "foo" as reqid, "touch" as ui, AsList(1,2,236273) as test_ids; +commit; + +$dict = (select "foo" as reqid); + +select + * +from + @input +where + ui='touch' and + reqid in (select reqid from $dict) + and 236273 in test_ids + diff --git a/yql/essentials/tests/sql/suites/in/yql-14677.sql b/yql/essentials/tests/sql/suites/in/yql-14677.sql new file mode 100644 index 0000000000..abbe56ce7b --- /dev/null +++ b/yql/essentials/tests/sql/suites/in/yql-14677.sql @@ -0,0 +1,10 @@ +/* postgres can not */ +USE plato; +pragma yt.MapJoinLimit="1m"; + +$l1 = select key from `Input`; + +select * from Input +where true + and value != "" + and key in $l1 |