Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-35385][SQL][TESTS] Skip duplicate queries in the TPCDS-related tests #32520

Closed
wants to merge 2 commits into from

Conversation

maropu
Copy link
Member

@maropu maropu commented May 12, 2021

What changes were proposed in this pull request?

This PR proposes to skip the "q6", "q34", "q64", "q74", "q75", "q78" queries in the TPCDS-related tests because the TPCDS v2.7 queries have almost the same ones; the only differences in these queries are ORDER BY columns.

Why are the changes needed?

To improve test performance.

Does this PR introduce any user-facing change?

No, dev only.

How was this patch tested?

Existing tests.

// we skip them in the TPCDS-related tests.
private val excludedTpcdsQueries: Set[String] = Set("q6", "q34", "q64", "q74", "q75", "q78")

val tpcdsQueries: Seq[String] = tpcdsAllQueries.filterNot(excludedTpcdsQueries.contains)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another idea:

val tpcdsQueries: Seq[String] = 1.to(99).map("q" + _).flatMap { q => 
  if (Seq("q14", "q23", "q24", "q39").contains(q)) Seq(q + "a", q + "b") else Seq(q)
}.filterNot { q =>
  // ...
  Seq("q6", "q34", "q64", "q74", "q75", "q78").contains(q)
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel the if part looks a bit tricky, so I prefer to keep it as it is.

@SparkQA
Copy link

SparkQA commented May 12, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42975/

@SparkQA
Copy link

SparkQA commented May 12, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42975/

@@ -36,6 +36,12 @@ trait TPCDSBase extends SharedSparkSession with TPCDSSchema {
"q81", "q82", "q83", "q84", "q85", "q86", "q87", "q88", "q89", "q90",
"q91", "q92", "q93", "q94", "q95", "q96", "q97", "q98", "q99")

// Since `tpcdsQueriesV2_7_0` has almost the same queries with these oens below,
// we skip them in the TPCDS-related tests.
Copy link
Member

@dongjoon-hyun dongjoon-hyun May 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hides the previous reasoning. I believe it's worth to keep SPARK-35327 comment explicitly.

SPARK-35327: Filters out the TPC-DS queries that can cause flaky test results

Copy link
Member Author

@maropu maropu May 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, updated.

@@ -83,12 +83,6 @@ class TPCDSQueryTestSuite extends QueryTest with TPCDSBase with SQLQueryTestHelp
.toFile.getAbsolutePath
}

override val tpcdsQueries = {
// SPARK-35327: Filters out the TPC-DS queries that can cause flaky test results
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to the new location too.

@SparkQA
Copy link

SparkQA commented May 12, 2021

Test build #138454 has finished for PR 32520 at commit 9fe4b42.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu maropu closed this in 3241aeb May 13, 2021
@maropu
Copy link
Member Author

maropu commented May 13, 2021

The last commit is only for the comment update, so I merged to master. Thank you, @cloud-fan @dongjoon-hyun

@SparkQA
Copy link

SparkQA commented May 13, 2021

Test build #138479 has finished for PR 32520 at commit 299abb5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu maropu deleted the SkipDupQueries branch June 23, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants