xuchuanyin / workbench

0 stars 0 forks source link

bloom in operator #52

Open xuchuanyin opened 6 years ago

xuchuanyin commented 6 years ago
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where id in (1)", dataMapName, shouldHit),
  sql(s"select * from $normalTable where id in (1)"))
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where id in (999)", dataMapName, shouldHit),
  sql(s"select * from $normalTable where id in (999)"))
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where city in( 'city_1')", dataMapName, shouldHit),
  sql(s"select * from $normalTable where city in( 'city_1')"))
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where city in ('city_999')", dataMapName, shouldHit),
  sql(s"select * from $normalTable where city in ('city_999')"))
// query with two index_columns
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where id in (1) and city in ('city_1')", dataMapName, shouldHit),
  sql(s"select * from $normalTable where id in (1) and city in ('city_1')"))
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where id in (999) and city in ('city_999')", dataMapName, shouldHit),
  sql(s"select * from $normalTable where id in (999) and city in ('city_999')"))
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where city in ('city_1') and id in (0)", dataMapName, shouldHit),
  sql(s"select * from $normalTable where city in ('city_1') and id in (0)"))
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where city in ('city_999') and name in ('n999')", dataMapName, shouldHit),
  sql(s"select * from $normalTable where city in ('city_999') and name in ('n999')"))
checkAnswer(
  checkSqlHitDataMap(s"select * from $bloomDMSampleTable where city in ('city_999') and name in ('n1')", dataMapName, shouldHit),
  sql(s"select * from $normalTable where city in ('city_999') and name in ('n1')"))