XiaoHongbo-Hope commented on code in PR #455:
URL: https://github.com/apache/paimon-rust/pull/455#discussion_r3540962165
##########
crates/paimon/src/table/source.rs:
##########
@@ -596,6 +596,131 @@ impl DataSplit {
pub fn builder() -> DataSplitBuilder {
DataSplitBuilder::new()
}
+
+ /// Serialize to Java `DataSplit#serialize` (version 8) binary so any
Paimon reader
+ /// (pypaimon, Java) can rebuild this split. Byte-compatible with
`compatibility/datasplit-v8`.
+ ///
+ /// Errors on a split carrying row ranges (row-id / global-index / vector
/ full-text plans):
+ /// v8 has no field for them, so silently dropping them would widen the
split and read extra rows.
+ pub fn serialize(&self) -> crate::Result<Vec<u8>> {
+ if self.row_ranges.is_some() {
+ return Err(crate::Error::DataInvalid {
Review Comment:
> Maybe it is the time to create `IndexedSplit`.
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]