@@ -209,19 +209,19 @@ public static void createNationWithFormat(QueryRunner queryRunner, String storag
209
209
public static void createNationWithFormat (Session session , QueryRunner queryRunner , String storageFormat )
210
210
{
211
211
queryRunner .execute (session , "DROP TABLE IF EXISTS nation" );
212
- if (storageFormat .equals ("PARQUET" ) && !queryRunner .tableExists (queryRunner . getDefaultSession () , "nation" )) {
212
+ if (storageFormat .equals ("PARQUET" ) && !queryRunner .tableExists (session , "nation" )) {
213
213
queryRunner .execute (session , "CREATE TABLE nation AS SELECT * FROM tpch.tiny.nation" );
214
214
}
215
215
216
- if (storageFormat .equals ("ORC" ) && !queryRunner .tableExists (queryRunner . getDefaultSession () , "nation" )) {
216
+ if (storageFormat .equals ("ORC" ) && !queryRunner .tableExists (session , "nation" )) {
217
217
queryRunner .execute (session , "CREATE TABLE nation AS SELECT * FROM tpch.tiny.nation" );
218
218
}
219
219
220
- if (storageFormat .equals ("JSON" ) && !queryRunner .tableExists (queryRunner . getDefaultSession () , "nation_json" )) {
220
+ if (storageFormat .equals ("JSON" ) && !queryRunner .tableExists (session , "nation_json" )) {
221
221
queryRunner .execute (session , "CREATE TABLE nation_json WITH (FORMAT = 'JSON') AS SELECT * FROM tpch.tiny.nation" );
222
222
}
223
223
224
- if (storageFormat .equals ("TEXTFILE" ) && !queryRunner .tableExists (queryRunner . getDefaultSession () , "nation_text" )) {
224
+ if (storageFormat .equals ("TEXTFILE" ) && !queryRunner .tableExists (session , "nation_text" )) {
225
225
queryRunner .execute (session , "CREATE TABLE nation_text WITH (FORMAT = 'TEXTFILE') AS SELECT * FROM tpch.tiny.nation" );
226
226
}
227
227
}
@@ -272,7 +272,7 @@ public static void createCustomer(QueryRunner queryRunner)
272
272
273
273
public static void createCustomer (Session session , QueryRunner queryRunner )
274
274
{
275
- if (!queryRunner .tableExists (queryRunner . getDefaultSession () , "customer" )) {
275
+ if (!queryRunner .tableExists (session , "customer" )) {
276
276
queryRunner .execute (session , "CREATE TABLE customer AS " +
277
277
"SELECT custkey, name, address, nationkey, phone, acctbal, comment, mktsegment " +
278
278
"FROM tpch.tiny.customer" );
@@ -394,7 +394,7 @@ public static void createPart(QueryRunner queryRunner)
394
394
395
395
public static void createPart (Session session , QueryRunner queryRunner )
396
396
{
397
- if (!queryRunner .tableExists (queryRunner . getDefaultSession () , "part" )) {
397
+ if (!queryRunner .tableExists (session , "part" )) {
398
398
queryRunner .execute (session , "CREATE TABLE part AS SELECT * FROM tpch.tiny.part" );
399
399
}
400
400
}
@@ -406,7 +406,7 @@ public static void createPartSupp(QueryRunner queryRunner)
406
406
407
407
public static void createPartSupp (Session session , QueryRunner queryRunner )
408
408
{
409
- if (!queryRunner .tableExists (queryRunner . getDefaultSession () , "partsupp" )) {
409
+ if (!queryRunner .tableExists (session , "partsupp" )) {
410
410
queryRunner .execute (session , "CREATE TABLE partsupp AS SELECT * FROM tpch.tiny.partsupp" );
411
411
}
412
412
}
0 commit comments