TheR1sing3un opened a new pull request, #7942:
URL: https://github.com/apache/paimon/pull/7942

   ## Problem
   
   After #6778 landed, `paimon-core` no longer compiles on master:
   
   ```
   
paimon-core/src/test/java/org/apache/paimon/catalog/RenamingSnapshotCommitTest.java:[124,17]
     incompatible types: possible lossy conversion from long to int
   ```
   
   `createSnapshot()` builds the `Snapshot` via:
   
   ```java
   Map<Integer, Long> logOffsets = new HashMap<>();
   ...
   return new Snapshot(
           id, schemaId, baseManifestList, baseManifestListSize, ...,
           timeMillis,
           logOffsets,          // ← stray 14th arg
           totalRecordCount, deltaRecordCount,
           null, null, null, null, null);
   ```
   
   `Snapshot` (`paimon-api/src/main/java/org/apache/paimon/Snapshot.java`) has 
two public constructors — 20 args and 22 args — and neither contains a 
`logOffsets` parameter. With the extra arg the call is 21-wide; javac picks the 
closest 22-arg overload and the type system then reports a misleading "long → 
int" mismatch on the first arg.
   
   Every PR opened against master right now hits this.
   
   ## Fix
   
   Drop the stray `logOffsets` declaration and the corresponding constructor 
argument (plus the two now-unused `java.util.Map` / `java.util.HashMap` 
imports). The remaining 20 args line up positionally with the 20-arg `Snapshot` 
ctor.
   
   This assumes `logOffsets` was an accidental leftover — `Snapshot` is not 
intended to carry a per-bucket log-offset map. If the intent of #6778 was 
actually to extend `Snapshot` with a `logOffsets` field, that's a larger change 
that should land in `Snapshot.java` itself (with serialization, 
equals/hashCode, etc.); flag this PR and we can switch direction.
   
   ## Test
   
   `mvn -pl paimon-core -am compile test-compile` succeeds locally on this 
branch. Existing tests in `RenamingSnapshotCommitTest` continue to exercise the 
same scenarios — only the unused local + arg are dropped.


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

Reply via email to