You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/12/19 23:39:18 UTC

Re: [PR] [WIP][SS] Python streaming source [spark]

HyukjinKwon commented on code in PR #44416:
URL: https://github.com/apache/spark/pull/44416#discussion_r1432038903


##########
python/pyspark/sql/datasource.py:
##########
@@ -357,6 +363,30 @@ def abort(self, messages: List["WriterCommitMessage"]) -> None:
         ...
 
 
+class DataStreamOffset:
+    def __init__(self, value: Any) -> None:
+        self.value = value
+
+    def set_value(self, json_str: str) -> None:
+        self.value = self.from_json(json_str)
+
+class DataStreamReader(ABC):
+    def latest_offset(self) -> DataStreamOffset:

Review Comment:
   By design, all Python API follows `camelCase` naming rule. If we could make it one word like `latestoffset`, that's an option too (to make it more Pythonic)



-- 
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