Skip to content

Commit

Permalink
[MINOR][TESTS] Remove mistakenly added style off for "assume"
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

This PR removes the scalastyle off/on from two test recent suites which is not used by Apache Spark.

### Why are the changes needed?

Some of test suites turn on and off for style rule which Apache Spark does not use.

### Does this PR introduce _any_ user-facing change?

No

### How was this patch tested?

N/A

Closes apache#38125 from HeartSaVioR/MINOR-remove-unnecessary-assume-style-off.

Authored-by: Jungtaek Lim <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
  • Loading branch information
HeartSaVioR authored and HyukjinKwon committed Oct 6, 2022
1 parent a36bf4e commit 71bc4ad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ class FlatMapGroupsInPandasWithStateDistributionSuite extends StreamTest

test("applyInPandasWithState should require StatefulOpClusteredDistribution " +
"from children - without initial state") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

// Function to maintain running count up to 2, and then remove the count
// Returns the data and the count if state is defined, otherwise does not return anything
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {
import testImplicits._

test("applyInPandasWithState - streaming") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

// Function to maintain running count up to 2, and then remove the count
// Returns the data and the count if state is defined, otherwise does not return anything
Expand Down Expand Up @@ -116,9 +114,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {

test("applyInPandasWithState - streaming, multiple groups in partition, " +
"multiple outputs per grouping key") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

val pythonScript =
"""
Expand Down Expand Up @@ -190,9 +186,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {
}

test("applyInPandasWithState - streaming + aggregation") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

// Function to maintain running count up to 2, and then remove the count
// Returns the data and the count (-1 if count reached beyond 2 and state was just removed)
Expand Down Expand Up @@ -268,9 +262,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {
}

test("applyInPandasWithState - streaming with processing time timeout") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

// Function to maintain the count as state and set the proc. time timeout delay of 10 seconds.
// It returns the count if changed, or -1 if the state was removed by timeout.
Expand Down Expand Up @@ -373,9 +365,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {
}

test("applyInPandasWithState - streaming w/ event time timeout + watermark") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

// timestamp_seconds assumes the base timezone is UTC. However, the provided function
// localizes it. Therefore, this test assumes the timezone is in UTC
Expand Down Expand Up @@ -464,9 +454,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {

def testWithTimeout(timeoutConf: GroupStateTimeout): Unit = {
test("SPARK-20714: watermark does not fail query when timeout = " + timeoutConf) {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

// timestamp_seconds assumes the base timezone is UTC. However, the provided function
// localizes it. Therefore, this test assumes the timezone is in UTC
Expand Down Expand Up @@ -538,9 +526,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {
testWithTimeout(ProcessingTimeTimeout)

test("applyInPandasWithState - uses state format version 2 by default") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

// Function to maintain running count up to 2, and then remove the count
// Returns the data and the count if state is defined, otherwise does not return anything
Expand Down Expand Up @@ -613,9 +599,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {
}

test("applyInPandasWithState - streaming - arrow RecordBatch size with chunking") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

val pythonScript =
"""
Expand Down Expand Up @@ -675,9 +659,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {
}

test("applyInPandasWithState - streaming - partial consume of iterator in user function") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

val pythonScript =
"""
Expand Down Expand Up @@ -740,9 +722,7 @@ class FlatMapGroupsInPandasWithStateSuite extends StateStoreMetricsTest {
}

test("SPARK-40670: applyInPandasWithState - streaming having non-null columns") {
// scalastyle:off assume
assume(shouldTestPandasUDFs)
// scalastyle:on assume

// Function to maintain the count as state and set the proc. time timeout delay of 10 seconds.
// It returns the count if changed, or -1 if the state was removed by timeout.
Expand Down

0 comments on commit 71bc4ad

Please sign in to comment.