This is an automated email from the ASF dual-hosted git repository.
ruifengz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new e839930abac [SPARK-41797][CONNECT][PYTHON][TESTS] Enable test for
`array_repeat`
e839930abac is described below
commit e839930abac208e6deba180a72292074be0f39a4
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Sat Dec 31 14:05:00 2022 +0800
[SPARK-41797][CONNECT][PYTHON][TESTS] Enable test for `array_repeat`
### What changes were proposed in this pull request?
Enable test for `array_repeat`, since the datatype mismatch issue had been
resolved
### Why are the changes needed?
for test coverage
### Does this PR introduce _any_ user-facing change?
no, test-only
### How was this patch tested?
enabled test
Closes #39319 from zhengruifeng/connect_function_array_repeat_test.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
---
python/pyspark/sql/tests/connect/test_connect_function.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/python/pyspark/sql/tests/connect/test_connect_function.py
b/python/pyspark/sql/tests/connect/test_connect_function.py
index cc60e1263b7..38f7492e019 100644
--- a/python/pyspark/sql/tests/connect/test_connect_function.py
+++ b/python/pyspark/sql/tests/connect/test_connect_function.py
@@ -1020,13 +1020,10 @@ class
SparkConnectFunctionTests(SparkConnectFuncTestCase):
cdf.select(CF.array_repeat("f", cdf.d)).toPandas(),
sdf.select(SF.array_repeat("f", sdf.d)).toPandas(),
)
- # TODO: Make Literal contains DataType
- # Cannot resolve "array_repeat(f, 3)" due to data type mismatch:
- # Parameter 2 requires the "INT" type, however "3" has the type
"BIGINT".
- # self.assert_eq(
- # cdf.select(CF.array_repeat("f", 3)).toPandas(),
- # sdf.select(SF.array_repeat("f", 3)).toPandas(),
- # )
+ self.assert_eq(
+ cdf.select(CF.array_repeat("f", 3)).toPandas(),
+ sdf.select(SF.array_repeat("f", 3)).toPandas(),
+ )
# test arrays_zip
# TODO: Make toPandas support complex nested types like Array<Struct>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]