Skip to content

Commit

Permalink
Clarify test name, use multi-line string.
Browse files Browse the repository at this point in the history
Signed-off-by: currantw <taylor.curran@improving.com>
  • Loading branch information
currantw committed Jan 6, 2025
1 parent 0b36545 commit e7e8785
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,16 @@ class FlintSparkPPLParseITSuite
comparePlans(expectedPlan, logicalPlan, checkAnalysis = false)
}

test("test parse email & host expressions including cast and sort commands") {
test("test parse street number & street expressions including cast and sort commands") {

// TODO #963: Implement 'num', 'str', and 'ip' sort syntax
val frame = sql(s"""
| source=$testTable | parse address '(?<streetNumber>\\d+) (?<street>.+)' | eval streetNumberInt = cast(streetNumber as integer) | where streetNumberInt > 500 | sort streetNumberInt | fields streetNumber, street
| source = $testTable |
| parse address '(?<streetNumber>\\d+) (?<street>.+)' |
| eval streetNumberInt = cast(streetNumber as integer) |
| where streetNumberInt > 500 |
| sort streetNumberInt |
| fields streetNumber, street
| """.stripMargin)
// Retrieve the results
val results: Array[Row] = frame.collect()
Expand Down Expand Up @@ -264,5 +269,4 @@ class FlintSparkPPLParseITSuite

assert(compareByString(expectedPlan) === compareByString(logicalPlan))
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class PPLLogicalPlanParseTranslatorTestSuite
assert(compareByString(expectedPlan) === compareByString(logPlan))
}

test("test parse email & host expressions including cast and sort commands") {
test("test parse street number & street expressions including cast and sort commands") {
val context = new CatalystPlanContext

// TODO #963: Implement 'num', 'str', and 'ip' sort syntax
Expand Down

0 comments on commit e7e8785

Please sign in to comment.