forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-47224][PS][TESTS] Split
test_split_apply_basic
and `test_spl…
…it_apply_adv` ### What changes were proposed in this pull request? Split `test_split_apply_basic`/`test_split_apply_adv` and their parity tests ### Why are the changes needed? it is still slow, split it for testing parallelism ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? ci ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#45332 from zhengruifeng/ps_test_split_apply_basic. Authored-by: Ruifeng Zheng <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
- Loading branch information
1 parent
b0a027c
commit 944a00d
Showing
13 changed files
with
389 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
python/pyspark/pandas/tests/connect/groupby/test_parity_split_apply_first.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
import unittest | ||
|
||
from pyspark.pandas.tests.groupby.test_split_apply_first import GroupbySplitApplyFirstMixin | ||
from pyspark.testing.connectutils import ReusedConnectTestCase | ||
from pyspark.testing.pandasutils import PandasOnSparkTestUtils | ||
|
||
|
||
class GroupbySplitApplyFirstParityTests( | ||
GroupbySplitApplyFirstMixin, | ||
PandasOnSparkTestUtils, | ||
ReusedConnectTestCase, | ||
): | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
from pyspark.pandas.tests.connect.groupby.test_parity_split_apply_first import * # noqa | ||
|
||
try: | ||
import xmlrunner # type: ignore[import] | ||
|
||
testRunner = xmlrunner.XMLTestRunner(output="target/test-reports", verbosity=2) | ||
except ImportError: | ||
testRunner = None | ||
unittest.main(testRunner=testRunner, verbosity=2) |
41 changes: 41 additions & 0 deletions
41
python/pyspark/pandas/tests/connect/groupby/test_parity_split_apply_last.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
import unittest | ||
|
||
from pyspark.pandas.tests.groupby.test_split_apply_last import GroupbySplitApplyLastMixin | ||
from pyspark.testing.connectutils import ReusedConnectTestCase | ||
from pyspark.testing.pandasutils import PandasOnSparkTestUtils | ||
|
||
|
||
class GroupbySplitApplyLastParityTests( | ||
GroupbySplitApplyLastMixin, | ||
PandasOnSparkTestUtils, | ||
ReusedConnectTestCase, | ||
): | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
from pyspark.pandas.tests.connect.groupby.test_parity_split_apply_last import * # noqa | ||
|
||
try: | ||
import xmlrunner # type: ignore[import] | ||
|
||
testRunner = xmlrunner.XMLTestRunner(output="target/test-reports", verbosity=2) | ||
except ImportError: | ||
testRunner = None | ||
unittest.main(testRunner=testRunner, verbosity=2) |
41 changes: 41 additions & 0 deletions
41
python/pyspark/pandas/tests/connect/groupby/test_parity_split_apply_skew.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
import unittest | ||
|
||
from pyspark.pandas.tests.groupby.test_split_apply_skew import GroupbySplitApplySkewMixin | ||
from pyspark.testing.connectutils import ReusedConnectTestCase | ||
from pyspark.testing.pandasutils import PandasOnSparkTestUtils | ||
|
||
|
||
class GroupbySplitApplySkewParityTests( | ||
GroupbySplitApplySkewMixin, | ||
PandasOnSparkTestUtils, | ||
ReusedConnectTestCase, | ||
): | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
from pyspark.pandas.tests.connect.groupby.test_parity_split_apply_skew import * # noqa | ||
|
||
try: | ||
import xmlrunner # type: ignore[import] | ||
|
||
testRunner = xmlrunner.XMLTestRunner(output="target/test-reports", verbosity=2) | ||
except ImportError: | ||
testRunner = None | ||
unittest.main(testRunner=testRunner, verbosity=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
python/pyspark/pandas/tests/connect/groupby/test_parity_split_apply_var.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
import unittest | ||
|
||
from pyspark.pandas.tests.groupby.test_split_apply_var import GroupbySplitApplyVarMixin | ||
from pyspark.testing.connectutils import ReusedConnectTestCase | ||
from pyspark.testing.pandasutils import PandasOnSparkTestUtils | ||
|
||
|
||
class GroupbySplitApplyVarParityTests( | ||
GroupbySplitApplyVarMixin, | ||
PandasOnSparkTestUtils, | ||
ReusedConnectTestCase, | ||
): | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
from pyspark.pandas.tests.connect.groupby.test_parity_split_apply_var import * # noqa | ||
|
||
try: | ||
import xmlrunner # type: ignore[import] | ||
|
||
testRunner = xmlrunner.XMLTestRunner(output="target/test-reports", verbosity=2) | ||
except ImportError: | ||
testRunner = None | ||
unittest.main(testRunner=testRunner, verbosity=2) |
49 changes: 49 additions & 0 deletions
49
python/pyspark/pandas/tests/groupby/test_split_apply_count.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
import unittest | ||
|
||
from pyspark.testing.pandasutils import PandasOnSparkTestCase | ||
from pyspark.testing.sqlutils import SQLTestUtils | ||
from pyspark.pandas.tests.groupby.test_split_apply import GroupbySplitApplyTestingFuncMixin | ||
|
||
|
||
class GroupbySplitApplyCountMixin(GroupbySplitApplyTestingFuncMixin): | ||
def test_split_apply_combine_on_series(self): | ||
funcs = [ | ||
((True, False), ["count"]), | ||
] | ||
self._test_split_apply_func(funcs) | ||
|
||
|
||
class GroupbySplitApplyCountTests( | ||
GroupbySplitApplyCountMixin, | ||
PandasOnSparkTestCase, | ||
SQLTestUtils, | ||
): | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
from pyspark.pandas.tests.groupby.test_split_apply_count import * # noqa: F401 | ||
|
||
try: | ||
import xmlrunner | ||
|
||
testRunner = xmlrunner.XMLTestRunner(output="target/test-reports", verbosity=2) | ||
except ImportError: | ||
testRunner = None | ||
unittest.main(testRunner=testRunner, verbosity=2) |
49 changes: 49 additions & 0 deletions
49
python/pyspark/pandas/tests/groupby/test_split_apply_first.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
import unittest | ||
|
||
from pyspark.testing.pandasutils import PandasOnSparkTestCase | ||
from pyspark.testing.sqlutils import SQLTestUtils | ||
from pyspark.pandas.tests.groupby.test_split_apply import GroupbySplitApplyTestingFuncMixin | ||
|
||
|
||
class GroupbySplitApplyFirstMixin(GroupbySplitApplyTestingFuncMixin): | ||
def test_split_apply_combine_on_series(self): | ||
funcs = [ | ||
((True, False), ["first"]), | ||
] | ||
self._test_split_apply_func(funcs) | ||
|
||
|
||
class GroupbySplitApplyFirstTests( | ||
GroupbySplitApplyFirstMixin, | ||
PandasOnSparkTestCase, | ||
SQLTestUtils, | ||
): | ||
pass | ||
|
||
|
||
if __name__ == "__main__": | ||
from pyspark.pandas.tests.groupby.test_split_apply_first import * # noqa: F401 | ||
|
||
try: | ||
import xmlrunner | ||
|
||
testRunner = xmlrunner.XMLTestRunner(output="target/test-reports", verbosity=2) | ||
except ImportError: | ||
testRunner = None | ||
unittest.main(testRunner=testRunner, verbosity=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.