Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
loneylee committed Jun 11, 2024
1 parent 85866a0 commit 955778b
Showing 1 changed file with 32 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -663,42 +663,39 @@ class GlutenClickHouseMergeTreeWriteOnS3Suite
test("test mergetree with primary keys pruning by driver") {
val tableName = "lineitem_mergetree_pk_pruning_by_driver_s3"
val dataPath = s"s3a://$BUCKET_NAME/$tableName"
spark.sql(
s"""
|DROP TABLE IF EXISTS $tableName;
|""".stripMargin)
spark.sql(s"""
|DROP TABLE IF EXISTS $tableName;
|""".stripMargin)

spark.sql(
s"""
|CREATE TABLE IF NOT EXISTS $tableName
|(
| l_orderkey bigint,
| l_partkey bigint,
| l_suppkey bigint,
| l_linenumber bigint,
| l_quantity double,
| l_extendedprice double,
| l_discount double,
| l_tax double,
| l_returnflag string,
| l_linestatus string,
| l_shipdate date,
| l_commitdate date,
| l_receiptdate date,
| l_shipinstruct string,
| l_shipmode string,
| l_comment string
|)
|USING clickhouse
|TBLPROPERTIES (storage_policy='__s3_main', orderByKey='l_shipdate')
|LOCATION '$dataPath'
|""".stripMargin)

spark.sql(
s"""
| insert into table $tableName
| select * from lineitem
|""".stripMargin)
spark.sql(s"""
|CREATE TABLE IF NOT EXISTS $tableName
|(
| l_orderkey bigint,
| l_partkey bigint,
| l_suppkey bigint,
| l_linenumber bigint,
| l_quantity double,
| l_extendedprice double,
| l_discount double,
| l_tax double,
| l_returnflag string,
| l_linestatus string,
| l_shipdate date,
| l_commitdate date,
| l_receiptdate date,
| l_shipinstruct string,
| l_shipmode string,
| l_comment string
|)
|USING clickhouse
|TBLPROPERTIES (storage_policy='__s3_main', orderByKey='l_shipdate')
|LOCATION '$dataPath'
|""".stripMargin)

spark.sql(s"""
| insert into table $tableName
| select * from lineitem
|""".stripMargin)

FileUtils.forceDelete(new File(S3_METADATA_PATH))

Expand Down

0 comments on commit 955778b

Please sign in to comment.