package org.verdictdb.core.scramblingquerying;

import static org.junit.Assert.*;

import org.junit.BeforeClass;
import org.junit.Test;

public class MySqlTpchUniformScramblingQueryingTest {
  
  final int blockSize = 100;
  
  @BeforeClass
  public void setupMySqlDatabase() {
    // create uniform scrambled table of lineitem and orders.
    
  }

  @Test
  public void testTpch1() {
    
    // assert that the number of the returned result set is 10.
    
    // assert that the final answers are the same.
  }

}

@@ -216,19 +216,17 @@
  = 100;%0A
-  
 %0A
+
   @Befor
@@ -331,21 +331,17 @@
 orders.%0A
-    
 %0A
+
   %7D%0A%0A  @
@@ -375,134 +375,1979 @@
 1() 
-%7B%0A    %0A    // assert that the number of the returned result set is 10.%0A    %0A    // assert that the final answers are the same.
+throws VerdictDBException %7B%0A    RelationStandardizer.resetItemID();%0A    String sql = %22select %22 +%0A        %22 l_returnflag, %22 +%0A        %22 l_linestatus, %22 +%0A        %22 sum(l_quantity) as sum_qty, %22 +%0A        %22 sum(l_extendedprice) as sum_base_price, %22 +%0A        %22 sum(l_extendedprice * (1 - l_discount)) as sum_disc_price, %22 +%0A        %22 sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge, %22 +%0A        %22 avg(l_quantity) as avg_qty, %22 +%0A        %22 avg(l_extendedprice) as avg_price, %22 +%0A        %22 avg(l_discount) as avg_disc, %22 +%0A        %22 count(*) as count_order %22 +%0A        %22from %22 +%0A        %22 lineitem_scrambled %22 +%0A        %22where %22 +%0A        %22 l_shipdate %3C= date '1998-12-01'%22 +%0A        %22group by %22 +%0A        %22 l_returnflag, %22 +%0A        %22 l_linestatus %22 +%0A        %22order by %22 +%0A        %22 l_returnflag, %22 +%0A        %22 l_linestatus %22 +%0A        %22LIMIT 1 %22;%0A    NonValidatingSQLParser sqlToRelation = new NonValidatingSQLParser();%0A    AbstractRelation relation = sqlToRelation.toRelation(sql);%0A    RelationStandardizer gen = new RelationStandardizer(staticMetaData);%0A    relation = gen.standardize((SelectQuery) relation);%0A%0A    QueryExecutionPlan queryExecutionPlan = new QueryExecutionPlan(%22verdictdb_temp%22, meta, (SelectQuery) relation);%0A    queryExecutionPlan.cleanUp();%0A    queryExecutionPlan = AsyncQueryExecutionPlan.create(queryExecutionPlan);%0A  %7D%0A%0A  @AfterClass%0A  public static void tearDown() throws SQLException %7B%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60region%60%22);%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60nation%60%22);%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60lineitem%60%22);%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60customer%60%22);%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60supplier%60%22);%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60partsupp%60%22);%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60part%60%22);%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60orders%60%22);%0A    stmt.execute(%22DROP TABLE IF EXISTS %60test%60.%60lineitem_scrambled%60%22);
 %0A  %7D

Create mysql tpch uniform scramble test