You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "linliu-code (via GitHub)" <gi...@apache.org> on 2026/08/07 16:14:05 UTC

[PR] feat(core): name the behaviors the merge-on-read engine does not reproduce [hudi-rs]

linliu-code opened a new pull request, #673:
URL: https://github.com/apache/hudi-rs/pull/673

   Stacked on #672 — only the top commit is new here.
   
   ### The problem
   
   The v2 engine differs from Hudi's JVM reader in a handful of ways. Most are
   refused: a `CUSTOM` merge mode, schema-on-read, `skip_merge`, sorted output all
   raise an error that names what is missing, so nothing comes back looking
   correct when it isn't.
   
   Position-based merge is the exception. `should_merge_use_record_position` is
   hardcoded false in the resolver and the row-number column is dropped in the
   engine, so a read that asks to merge by position is merged by key instead. It
   succeeds. It returns the same rows in every case except a file group holding
   duplicate keys — and there, silently, different ones.
   
   ### The change
   
   `reader_v2::gaps` collects the list in one place, as data rather than as prose
   scattered across the modules that happen to not implement each thing. A gap
   knows which reader it differs from and what a caller would see. `read()`
   reports the applicable ones once, at warn level.
   
   Only *silent* gaps belong in the registry — anything already refused says so
   through its error, and repeating it as a warning would train callers to ignore
   warnings. `test_an_ordinary_read_has_no_gaps` pins that: a read that asks for
   nothing missing prints nothing.
   
   Also drops an import in `schema::delete`'s tests that no longer resolves to a
   used name.
   
   ### Testing
   
   Three unit tests: the quiet case, the gap requested through `ReaderParameters`,
   and the same requested through `ReaderContext` (the engine reads the context,
   so both paths have to count).
   
   Full workspace suite green.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(core): incremental reads, position merge, and the gold sweep that checks them [hudi-rs]

Posted by "linliu-code (via GitHub)" <gi...@apache.org>.
linliu-code commented on PR #673:
URL: https://github.com/apache/hudi-rs/pull/673#issuecomment-5302611328

   Superseded by #660, which merged as `75b188e`. This PR's content is in that commit — the ten PRs in this series were the reviewable decomposition of the port, and shipping went through the squashed #660 instead.
   
   Every review thread here was answered before that merge; the replies stay on the thread for the record. Closing to keep the queue honest about what is still in flight.


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(core): incremental reads, position merge, and the gold sweep that checks them [hudi-rs]

Posted by "linliu-code (via GitHub)" <gi...@apache.org>.
linliu-code closed pull request #673: feat(core): incremental reads, position merge, and the gold sweep that checks them
URL: https://github.com/apache/hudi-rs/pull/673


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(core): incremental reads, position merge, and the gold sweep that checks them [hudi-rs]

Posted by "hudi-agent (via GitHub)" <gi...@apache.org>.
hudi-agent commented on code in PR #673:
URL: https://github.com/apache/hudi-rs/pull/673#discussion_r3771637382


##########
crates/core/src/table/mod.rs:
##########
@@ -955,6 +1140,53 @@ impl Table {
 #[cfg(test)]
 mod tests {
     use super::*;
+
+    /// The only thing telling a caller their incremental range came back short.
+    ///
+    /// Archived commits are not enumerated unless
+    /// `hoodie.internal.timeline.archived.enabled` is set, so a window reaching
+    /// below the active timeline reports fewer changes than it covers. That is
+    /// silent except for this warning — and a warning nothing asserts is one
+    /// that can stop firing without anyone noticing.
+    ///
+    /// Both directions are asserted: a window inside the active timeline must
+    /// stay quiet, or the warning would be noise a caller learns to ignore.
+    #[tokio::test]
+    async fn test_window_predating_the_active_timeline_is_reported() -> Result<()> {
+        let base_url = SampleTable::V6Nonpartitioned.url_to_cow();
+        let hudi_table = Table::new(base_url.path()).await?;
+
+        let boundary = hudi_table
+            .timeline
+            .earliest_active_instant
+            .clone()
+            .expect("fixture has an active timeline");
+
+        // A start below the boundary: the window covers commits that are no
+        // longer enumerable.
+        let message = hudi_table
+            .window_predates_active_timeline("00000000000000")
+            .expect("a start below the active timeline must be reported");
+        assert!(
+            message.contains("00000000000000") && message.contains(&boundary),
+            "the warning must name both the requested start and the boundary, got: {message}"
+        );
+
+        // The boundary itself, and anything after it, is wholly inside the
+        // active timeline.
+        assert!(
+            hudi_table
+                .window_predates_active_timeline(&boundary)
+                .is_none(),
+            "a window starting exactly at the boundary covers no archived commit"
+        );
+        let after = format!("{boundary}9");

Review Comment:
   🤖 nit: the `"9"` suffix is a little magic here — could you add a short comment explaining that appending any character to the boundary string produces a string that sorts after it lexicographically, so the window lands inside the active timeline? Something like `// any suffix makes this sort after boundary in Hudi's lex comparison`.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag quality.</i></sub>



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(core): incremental reads, position merge, and the gold sweep that checks them [hudi-rs]

Posted by "linliu-code (via GitHub)" <gi...@apache.org>.
linliu-code commented on code in PR #673:
URL: https://github.com/apache/hudi-rs/pull/673#discussion_r3779928026


##########
crates/core/src/table/mod.rs:
##########
@@ -955,6 +1140,53 @@ impl Table {
 #[cfg(test)]
 mod tests {
     use super::*;
+
+    /// The only thing telling a caller their incremental range came back short.
+    ///
+    /// Archived commits are not enumerated unless
+    /// `hoodie.internal.timeline.archived.enabled` is set, so a window reaching
+    /// below the active timeline reports fewer changes than it covers. That is
+    /// silent except for this warning — and a warning nothing asserts is one
+    /// that can stop firing without anyone noticing.
+    ///
+    /// Both directions are asserted: a window inside the active timeline must
+    /// stay quiet, or the warning would be noise a caller learns to ignore.
+    #[tokio::test]
+    async fn test_window_predating_the_active_timeline_is_reported() -> Result<()> {
+        let base_url = SampleTable::V6Nonpartitioned.url_to_cow();
+        let hudi_table = Table::new(base_url.path()).await?;
+
+        let boundary = hudi_table
+            .timeline
+            .earliest_active_instant
+            .clone()
+            .expect("fixture has an active timeline");
+
+        // A start below the boundary: the window covers commits that are no
+        // longer enumerable.
+        let message = hudi_table
+            .window_predates_active_timeline("00000000000000")
+            .expect("a start below the active timeline must be reported");
+        assert!(
+            message.contains("00000000000000") && message.contains(&boundary),
+            "the warning must name both the requested start and the boundary, got: {message}"
+        );
+
+        // The boundary itself, and anything after it, is wholly inside the
+        // active timeline.
+        assert!(
+            hudi_table
+                .window_predates_active_timeline(&boundary)
+                .is_none(),
+            "a window starting exactly at the boundary covers no archived commit"
+        );
+        let after = format!("{boundary}9");

Review Comment:
   Fixed. Added, close to your wording:
   
   ```rust
   // Hudi compares instant times lexicographically, so appending any
   // character yields a string that sorts strictly after the boundary —
   // i.e. a window that opens inside the active timeline.
   ```



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org