Skip to content

Commit

Permalink
update scala fmt
Browse files Browse the repository at this point in the history
Signed-off-by: YANGDB <[email protected]>
  • Loading branch information
YANG-DB committed Nov 7, 2024
1 parent a4992e8 commit 870d434
Showing 1 changed file with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class FlintSparkPPLTopAndRareITSuite
val expectedPlan = Project(projectList, sortedPlan)
comparePlans(expectedPlan, logicalPlan, checkAnalysis = false)
}

test("create ppl rare address field query test sample 75 %") {
val frame = sql(s"""
| source = $testTable| rare address sample(75 percent)
Expand Down Expand Up @@ -159,10 +159,7 @@ class FlintSparkPPLTopAndRareITSuite
val aggregateExpressions = Seq(countExpr, addressField, ageAlias)
val table = UnresolvedRelation(Seq("spark_catalog", "default", "flint_ppl_test"))
val aggregatePlan =
Aggregate(
Seq(addressField, ageAlias),
aggregateExpressions,
table)
Aggregate(Seq(addressField, ageAlias), aggregateExpressions, table)

val sortedPlan: LogicalPlan =
Sort(
Expand All @@ -178,7 +175,7 @@ class FlintSparkPPLTopAndRareITSuite
val expectedPlan = Project(projectList, sortedPlan)
comparePlans(expectedPlan, logicalPlan, false)
}

test("create ppl rare address by age field query test sample 75 %") {
val frame = sql(s"""
| source = $testTable| rare address by age sample(75 percent)
Expand Down Expand Up @@ -321,7 +318,7 @@ class FlintSparkPPLTopAndRareITSuite
val expectedPlan = Project(Seq(UnresolvedStar(None)), planWithLimit)
comparePlans(expectedPlan, logicalPlan, checkAnalysis = false)
}

test("create ppl top 3 countries query test sample 75 %") {
val frame = sql(s"""
| source = $newTestTable| top 3 country sample(75 percent)
Expand Down Expand Up @@ -392,10 +389,7 @@ class FlintSparkPPLTopAndRareITSuite
val aggregateExpressions = Seq(countExpr, countryField, occupationFieldAlias)
val table = UnresolvedRelation(Seq("spark_catalog", "default", "new_flint_ppl_test"))
val aggregatePlan =
Aggregate(
Seq(countryField, occupationFieldAlias),
aggregateExpressions,
table)
Aggregate(Seq(countryField, occupationFieldAlias), aggregateExpressions, table)

val sortedPlan: LogicalPlan =
Sort(
Expand All @@ -414,7 +408,7 @@ class FlintSparkPPLTopAndRareITSuite
comparePlans(expectedPlan, logicalPlan, checkAnalysis = false)

}

test("create ppl top 2 countries by occupation field query test sample 85 %") {
val frame = sql(s"""
| source = $newTestTable| top 3 country by occupation sample(85 percent)
Expand All @@ -423,7 +417,7 @@ class FlintSparkPPLTopAndRareITSuite
// Retrieve the results
val results: Array[Row] = frame.collect()
assert(results.length == 3)

// Retrieve the logical plan
val logicalPlan: LogicalPlan = frame.queryExecution.logical
val countryField = UnresolvedAttribute("country")
Expand Down

0 comments on commit 870d434

Please sign in to comment.