gengliangwang commented on PR #59520: URL: https://github.com/apache/spark/pull/59520#issuecomment-6930795063
Thanks, @viirya. On the three points: - **Contract wording:** it has its own JIRA now, SPARK-61820, and the description describes it in a paragraph of its own (see https://github.com/apache/spark/pull/59520#discussion_r4591604511). - **Description:** updated: the test counts (101 at 4ce568b0245, in the `rust-sdk` job and locally with Rust 1.85 and 1.89), `infer_schema` in the snippet, byte vectors as MessagePack sequences, the write-side validation, and `partition_index`/`partition_id`. - **Where the SDK lives:** I'd keep it in apache/spark, next to the header and the JVM host: - The contract is defined here and is still moving. Since #59424 merged, SPARK-61200 (`push_domains`), SPARK-61284 (when the JVM closes stream writers), SPARK-60753 (late releases of arrays) and SPARK-61820 each changed the header or the host, and the SDK had to follow. Here, one PR changes both sides, and the layout test fails the `rust-sdk` job when they drift apart. A separate repository would find out after the Spark change lands. - I see the SDKs as the counterpart of the Python Data Source API, which lives here, more than of spark-connect-go or spark-connect-swift. Those talk to a versioned wire protocol from outside the cluster, while a native library runs in the executor JVM and depends on the call order, ownership and threading of the host. - The end-to-end check that you asked about is also easier here: it can build the host and the SDK from the same commit, where a separate repository could only test against released or nightly builds of Spark. The cost that I see is Arrow: the API uses arrow-rs types, and arrow-rs releases majors more often than Spark releases features, so connectors get an Arrow upgrade only with a Spark release. I think that is acceptable while the SDK is experimental. The same reasoning applies to the C++ SDK (#59726). @sarutak, I updated the description for both points of your review: `latest_offset` gets the end of the run only with `Trigger.AvailableNow` and a `ReadLimit::MaxRows` limit, and the description now says that this change does not change the behavior of JVM classes, with a paragraph on the offset wording of the header, the guide and those doc comments, under SPARK-61820. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
