[fix](test) resolve load in tpch_sf100_unique_p2 and tpch_sf10_unique_p2 (#13208)

This commit is contained in:
Yongqiang YANG
2022-10-09 20:30:00 +08:00
committed by GitHub
parent b9516b50c1
commit 581494dea8
8 changed files with 30 additions and 30 deletions

View File

@ -39,10 +39,10 @@ suite("load_four_step") {
tables.each { table, rows ->
sql """ DROP TABLE IF EXISTS $table """
// create table if not exists
sql new File("""${context.parentFile.parent}/ddl/${table}_sequence.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_sequence.sql""").text
def loadLabel1 = table + "_" + uniqueID1
// load data from cos
def loadSql1 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql1 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql1 = loadSql1.replaceAll("\\\$\\{loadLabel\\}", loadLabel1) + s3WithProperties
sql loadSql1
// check load state
@ -59,7 +59,7 @@ suite("load_four_step") {
assertTrue(loadRowCount[0][0] == rows[0])
}
def loadLabel2 = table + "_" + uniqueID2
def loadSql2 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql2 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql2 = loadSql2.replaceAll("\\\$\\{loadLabel\\}", loadLabel2) + s3WithProperties
sql loadSql2
@ -80,7 +80,7 @@ suite("load_four_step") {
sleep(5000)
}
sql new File("""${context.parentFile.parent}/ddl/${table}_part_delete.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_part_delete.sql""").text
sql 'sync'
for (int i = 1; i <= 5; i++) {
def loadRowCount = sql "select count(1) from ${table}"
@ -89,7 +89,7 @@ suite("load_four_step") {
}
def loadLabel3 = table + "_" + uniqueID3
def loadSql3 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql3 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql3 = loadSql3.replaceAll("\\\$\\{loadLabel\\}", loadLabel3) + s3WithProperties
sql loadSql3

View File

@ -36,10 +36,10 @@ suite("load_one_step") {
tables.each { table, rows ->
sql """ DROP TABLE IF EXISTS $table """
// create table if not exists
sql new File("""${context.parentFile.parent}/ddl/${table}.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}.sql""").text
def loadLabel = table + "_" + uniqueID
// load data from cos
def loadSql = new File("""${context.parentFile.parent}/ddl/${table}_load.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql = new File("""${context.file.parentFile.parent}/ddl/${table}_load.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql = loadSql.replaceAll("\\\$\\{loadLabel\\}", loadLabel) + s3WithProperties
sql loadSql
@ -56,7 +56,7 @@ suite("load_one_step") {
logger.info("select ${table} numbers: ${loadRowCount[0][0]}".toString())
assertTrue(loadRowCount[0][0] == rows)
}
sql new File("""${context.parentFile.parent}/ddl/${table}_delete.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_delete.sql""").text
for (int i = 1; i <= 5; i++) {
def loadRowCount = sql "select count(1) from ${table}"
logger.info("select ${table} numbers: ${loadRowCount[0][0]}".toString())

View File

@ -38,10 +38,10 @@ suite("load_three_step") {
tables.each { table, rows ->
sql """ DROP TABLE IF EXISTS $table """
// create table if not exists
sql new File("""${context.parentFile.parent}/ddl/${table}_sequence.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_sequence.sql""").text
def loadLabel1 = table + "_" + uniqueID1
// load data from cos
def loadSql1 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql1 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql1 = loadSql1.replaceAll("\\\$\\{loadLabel\\}", loadLabel1) + s3WithProperties
sql loadSql1
// check load state
@ -58,7 +58,7 @@ suite("load_three_step") {
assertTrue(loadRowCount[0][0] == rows)
}
def loadLabel2 = table + "_" + uniqueID2
def loadSql2 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql2 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql2 = loadSql2.replaceAll("\\\$\\{loadLabel\\}", loadLabel2) + s3WithProperties
sql loadSql2
@ -79,7 +79,7 @@ suite("load_three_step") {
sleep(5000)
}
sql new File("""${context.parentFile.parent}/ddl/${table}_delete.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_delete.sql""").text
sql 'sync'
for (int i = 1; i <= 5; i++) {
def loadRowCount = sql "select count(1) from ${table}"

View File

@ -36,11 +36,11 @@ suite("load_two_step") {
tables.each { table, rows ->
sql """ DROP TABLE IF EXISTS $table """
// create table if not exists
sql new File("""${context.parentFile.parent}/ddl/${table}_sequence.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_sequence.sql""").text
def loadLabel = table + "_" + uniqueID
// load data from cos
def loadSql = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql = loadSql.replaceAll("\\\$\\{loadLabel\\}", loadLabel) + s3WithProperties
sql loadSql
@ -57,7 +57,7 @@ suite("load_two_step") {
logger.info("select ${table} numbers: ${loadRowCount[0][0]}".toString())
assertTrue(loadRowCount[0][0] == rows)
}
sql new File("""${context.parentFile.parent}/ddl/${table}_delete.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_delete.sql""").text
sql 'sync'
for (int i = 1; i <= 5; i++) {
def loadRowCount = sql "select count(1) from ${table}"

View File

@ -39,10 +39,10 @@ suite("load_four_step") {
tables.each { table, rows ->
// create table if not exists
try{
sql new File("""${context.parentFile.parent}/ddl/${table}_sequence.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_sequence.sql""").text
def loadLabel1 = table + "_" + uniqueID1
// load data from cos
def loadSql1 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql1 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql1 = loadSql1.replaceAll("\\\$\\{loadLabel\\}", loadLabel1) + s3WithProperties
sql loadSql1
// check load state
@ -59,7 +59,7 @@ suite("load_four_step") {
assertTrue(loadRowCount[0][0] == rows[0])
}
def loadLabel2 = table + "_" + uniqueID2
def loadSql2 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql2 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql2 = loadSql2.replaceAll("\\\$\\{loadLabel\\}", loadLabel2) + s3WithProperties
sql loadSql2
@ -80,7 +80,7 @@ suite("load_four_step") {
sleep(5000)
}
sql new File("""${context.parentFile.parent}/ddl/${table}_part_delete.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_part_delete.sql""").text
for (int i = 1; i <= 5; i++) {
def loadRowCount = sql "select count(1) from ${table}"
logger.info("select ${table} numbers: ${loadRowCount[0][0]}".toString())
@ -88,7 +88,7 @@ suite("load_four_step") {
}
def loadLabel3 = table + "_" + uniqueID3
def loadSql3 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql3 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql3 = loadSql3.replaceAll("\\\$\\{loadLabel\\}", loadLabel3) + s3WithProperties
sql loadSql3

View File

@ -36,10 +36,10 @@ suite("load_one_step") {
tables.each { table, rows ->
// create table if not exists
try{
sql new File("""${context.parentFile.parent}/ddl/${table}.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}.sql""").text
def loadLabel = table + "_" + uniqueID
// load data from cos
def loadSql = new File("""${context.parentFile.parent}/ddl/${table}_load.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql = new File("""${context.file.parentFile.parent}/ddl/${table}_load.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql = loadSql.replaceAll("\\\$\\{loadLabel\\}", loadLabel) + s3WithProperties
sql loadSql
@ -56,7 +56,7 @@ suite("load_one_step") {
logger.info("select ${table} numbers: ${loadRowCount[0][0]}".toString())
assertTrue(loadRowCount[0][0] == rows)
}
sql new File("""${context.parentFile.parent}/ddl/${table}_delete.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_delete.sql""").text
for (int i = 1; i <= 5; i++) {
def loadRowCount = sql "select count(1) from ${table}"
logger.info("select ${table} numbers: ${loadRowCount[0][0]}".toString())

View File

@ -38,10 +38,10 @@ suite("load_three_step") {
tables.each { table, rows ->
// create table if not exists
try{
sql new File("""${context.parentFile.parent}/ddl/${table}_sequence.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_sequence.sql""").text
def loadLabel1 = table + "_" + uniqueID1
// load data from cos
def loadSql1 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql1 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql1 = loadSql1.replaceAll("\\\$\\{loadLabel\\}", loadLabel1) + s3WithProperties
sql loadSql1
// check load state
@ -58,7 +58,7 @@ suite("load_three_step") {
assertTrue(loadRowCount[0][0] == rows)
}
def loadLabel2 = table + "_" + uniqueID2
def loadSql2 = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql2 = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql2 = loadSql2.replaceAll("\\\$\\{loadLabel\\}", loadLabel2) + s3WithProperties
sql loadSql2
@ -79,7 +79,7 @@ suite("load_three_step") {
sleep(5000)
}
sql new File("""${context.parentFile.parent}/ddl/${table}_delete.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_delete.sql""").text
for (int i = 1; i <= 5; i++) {
sql 'sync'
def loadRowCount = sql "select count(1) from ${table}"

View File

@ -36,11 +36,11 @@ suite("load_two_step") {
tables.each { table, rows ->
// create table if not exists
try{
sql new File("""${context.parentFile.parent}/ddl/${table}_sequence.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_sequence.sql""").text
def loadLabel = table + "_" + uniqueID
// load data from cos
def loadSql = new File("""${context.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
def loadSql = new File("""${context.file.parentFile.parent}/ddl/${table}_load_sequence.sql""").text.replaceAll("\\\$\\{s3BucketName\\}", s3BucketName)
loadSql = loadSql.replaceAll("\\\$\\{loadLabel\\}", loadLabel) + s3WithProperties
sql loadSql
@ -57,7 +57,7 @@ suite("load_two_step") {
logger.info("select ${table} numbers: ${loadRowCount[0][0]}".toString())
assertTrue(loadRowCount[0][0] == rows)
}
sql new File("""${context.parentFile.parent}/ddl/${table}_delete.sql""").text
sql new File("""${context.file.parentFile.parent}/ddl/${table}_delete.sql""").text
for (int i = 1; i <= 5; i++) {
def loadRowCount = sql "select count(1) from ${table}"
logger.info("select ${table} numbers: ${loadRowCount[0][0]}".toString())