You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/17 05:01:09 UTC
[GitHub] [spark] amaliujia commented on a diff in pull request #38278: [SPARK-40809][SPARK-40780][FOLLOW-UP] Improve filter and alias testing coverage in python client
amaliujia commented on code in PR #38278:
URL: https://github.com/apache/spark/pull/38278#discussion_r996614296
##########
python/pyspark/testing/connectutils.py:
##########
@@ -58,7 +60,18 @@ class PlanOnlyTestFixture(unittest.TestCase):
connect: "MockRemoteSession"
+ @classmethod
+ def _read_table(cls, table_name: str) -> "DataFrame":
+ return DataFrame.withPlan(Read(table_name), cls.connect)
+
+ @classmethod
+ def _udf_mock(cls, *args, **kwargs):
+ return "internal_name"
+
@classmethod
def setUpClass(cls: Any) -> None:
cls.connect = MockRemoteSession()
cls.tbl_name = f"tbl{uuid.uuid4()}".replace("-", "")
+
+ cls.connect.set_hook("register_udf", cls._udf_mock)
+ cls.connect.set_hook("readTable", cls._read_table)
Review Comment:
makes sense. done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org