Skip to content

Commit

Permalink
fix the message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu Zhang committed Nov 9, 2023
1 parent 7574b0e commit 8510f58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ import filodb.query.exec._
} else {
atModifierTimestampsWithOffset.isEmpty
}
require(isAtModifierValid, s"@modifier $atModifierTimestampsWithOffset is not supported because it queries data" +
s" from both downsample and raw cluster. Please adjust the start and end time if you want to use @modifier.")
require(isAtModifierValid, s"@modifier $atModifierTimestampsWithOffset is not supported because it queries" +
s"both down sampled and raw data. Please adjust the start and end time if you want to use @modifier.")

if (maxOffset != minOffset
&& startWithOffsetMs - lookbackMs < earliestRawTime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,7 @@ class PlannerHierarchySpec extends AnyFunSpec with Matchers with PlanValidationS
val thrown = the[IllegalArgumentException] thrownBy
rootPlanner.materialize(lp, QueryContext(origQueryParams = queryParams))
thrown.toString
.contains("both downsample and raw cluster. Please adjust the start and end time if you want to use @modifier") shouldEqual true
.contains("both down sampled and raw data. Please adjust the start and end time if you want to use @modifier") shouldEqual true
}

it("should thrown IllegalArgumentException because topk needs both raw and downsample cluster with @modifier") {
Expand All @@ -1905,7 +1905,7 @@ class PlannerHierarchySpec extends AnyFunSpec with Matchers with PlanValidationS
val thrown = the[IllegalArgumentException] thrownBy
rootPlanner.materialize(lp, QueryContext(origQueryParams = queryParams))
thrown.toString
.contains("both downsample and raw cluster. Please adjust the start and end time if you want to use @modifier") shouldEqual true
.contains("both down sampled and raw data. Please adjust the start and end time if you want to use @modifier") shouldEqual true
}

it("should thrown IllegalArgumentException because @modifier and offset reads from downsample cluster, and the query range reads from raw cluster") {
Expand All @@ -1916,7 +1916,7 @@ class PlannerHierarchySpec extends AnyFunSpec with Matchers with PlanValidationS
val thrown = the[IllegalArgumentException] thrownBy
rootPlanner.materialize(lp, QueryContext(origQueryParams = queryParams))
thrown.toString
.contains("both downsample and raw cluster. Please adjust the start and end time if you want to use @modifier") shouldEqual true
.contains("both down sampled and raw data. Please adjust the start and end time if you want to use @modifier") shouldEqual true
}

it("should thrown IllegalArgumentException because while @modifier needs data from downsample cluster, the plan is dispatched to raw cluster") {
Expand All @@ -1926,7 +1926,7 @@ class PlannerHierarchySpec extends AnyFunSpec with Matchers with PlanValidationS
val thrown = the[IllegalArgumentException] thrownBy
rootPlanner.materialize(lp, QueryContext(origQueryParams = queryParams))
thrown.toString
.contains("both downsample and raw cluster. Please adjust the start and end time if you want to use @modifier") shouldEqual true
.contains("both down sampled and raw data. Please adjust the start and end time if you want to use @modifier") shouldEqual true
}

it("should thrown IllegalArgumentException because while @modifier needs data from raw cluster, the plan is dispatched to downsample cluster") {
Expand All @@ -1936,7 +1936,7 @@ class PlannerHierarchySpec extends AnyFunSpec with Matchers with PlanValidationS
val thrown = the[IllegalArgumentException] thrownBy
rootPlanner.materialize(lp, QueryContext(origQueryParams = queryParams))
thrown.toString
.contains("both downsample and raw cluster. Please adjust the start and end time if you want to use @modifier") shouldEqual true
.contains("both down sampled and raw data. Please adjust the start and end time if you want to use @modifier") shouldEqual true
}

it("both modifier and query range require the data from downsample cluster.") {
Expand Down

0 comments on commit 8510f58

Please sign in to comment.