szehon-ho commented on PR #59520:
URL: https://github.com/apache/spark/pull/59520#issuecomment-6867152891
Thanks for putting this PR together!
Would it make sense to split this into smaller PRs—for example, batch reads
with the shared SDK infrastructure first, followed by batch writes, streaming
reads, and streaming writes? That would let us review each API and lifecycle
individually.
A couple of high-level API questions:
- **Arrow dependency:** The public API exposes Arrow 58 Rust types. What is
the expected integration path for a connector whose dependencies use a
different Arrow major version? Is coupling connectors to the SDK’s Arrow
version an intentional tradeoff, given that the binary boundary uses the Arrow
C interface?
- **Read API structure and extensibility:** My understanding of the three
API shapes is:
- **Python:** `DataSource.reader()` returns a `DataSourceReader`,
combining driver-side `partitions()` and executor-side `read(partition)` in one
class.
- **This SDK:** `DataSource::new_scan()` returns a `ScanBuilder`. Its
consuming `plan()` returns partitions and a serializable reader factory
together in a `ScanPlan`. The factory opens live readers on executors.
- **Java DSv2:** `ScanBuilder.build()` returns a logical `Scan`, whose
`toBatch()` returns a `Batch`. The `Batch` separately exposes partition
planning and reader-factory creation.
What motivated keeping planning and executor reading separate while
collapsing Java’s intermediate `Scan`/`Batch` layers? Is that driven by C ABI
constraints or an SDK design choice? In particular, where would statistics and
partitioning/ordering reports fit, and how would the consuming `plan()` model
accommodate runtime filtering that requires replanning?
---
<!-- GITHUB_MCP_FOOTER: This attribution is automatically appended by GitHub
MCP. -->
_This comment was generated with [GitHub MCP](http://go/mcps)._
--
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]