void query() {

  hash0.init_global_DHT( &hash0, cores()*16*1024 );


  {
    V1.data = readTuples<MaterializedTupleRef_V1_0_1_2>( "test1", FLAGS_nt);
    V1.numtuples = FLAGS_nt;
    auto l_V1 = V1;
    on_all_cores([=]{ V1 = l_V1; });
  }

  {
    V2.data = readTuples<MaterializedTupleRef_V2_0_1_2>( "test2", FLAGS_nt);
    V2.numtuples = FLAGS_nt;
    auto l_V2 = V2;
    on_all_cores([=]{ V2 = l_V2; });
  }

  CompletionEvent ce1;
  spawn(&ce1, [=] {
    forall<&loop1>( V1.data, V1.numtuples, [=](int64_t i, MaterializedTupleRef_V1_0_1_2& t_000) {
      hash0.insert_lookup_iter_left<&loop1>(t_000.get(0), t_000, [=](MaterializedTupleRef_V2_0_1_2& t_001) {
        LOG(INFO) << "V1(" << i <<") : (" << t_000 << ") -> " << t_001;
        });
      }); // end  scan over V1
  });

  CompletionEvent ce2;
  spawn(&ce2, [=] {
    forall<&loop2>( V2.data, V2.numtuples, [=](int64_t i, MaterializedTupleRef_V2_0_1_2& t_000) {
      hash0.insert_lookup_iter_right<&loop2>(t_000.get(0), t_000, [=](MaterializedTupleRef_V1_0_1_2& t_001) {
        LOG(INFO) << "V2(" << i << ") : (" << t_000 << ") -> " << t_001;
        });
      }); // end  scan over V2
  });

  ce1.wait();
  ce2.wait();

}