Yibo-Dong opened a new issue, #19193:
URL: https://github.com/apache/iceberg/issues/19193

   ### Apache Iceberg version
   
   1.12.0 (latest release)
   
   ### Query engine
   
   Spark
   
   ### Please describe the bug 🐞
   
   Two changelog views of the same table over different 
`start-timestamp`/`end-timestamp` windows return the wrong rows when used in 
one query: Spark reuses one scan for both. Each view alone is correct. 
Reproduced on `main` (9d4f6c7, 2026-11-28) and 1.12.0, Spark 3.5.5.
   
   ### Reproduction
   
   ```sql
   CREATE TABLE local.db.t (id INT) USING iceberg;
   INSERT INTO local.db.t VALUES (1);
   -- window 1: year 2025 (no commits); window 2: since 2026-01-01 (the insert)
   CALL local.system.create_changelog_view(table => 'db.t', changelog_view => 
'v2025', options => map('start-timestamp', '1735689600000', 'end-timestamp', 
'1767225600000'));
   CALL local.system.create_changelog_view(table => 'db.t', changelog_view => 
'v2026', options => map('start-timestamp', '1767225600000'));
   
   -- control: each view alone
   SELECT 'v2025 alone', count(*) FROM v2025;
   SELECT 'v2026 alone', count(*) FROM v2026;
   -- both views in one query
   SELECT 'union', count_if(w = 2025), count_if(w = 2026) FROM (
     SELECT 2025 AS w FROM v2025 UNION ALL SELECT 2026 AS w FROM v2026);
   ```
   
   ### Expected
   
   | Query | Result |
   |---|---|
   | `v2025 alone` / `v2026 alone` (control) | `0` / `1` |
   | `union` | `0 1` |
   
   ### Actual
   
   | Query | Result |
   |---|---|
   | `v2025 alone` / `v2026 alone` (control) | `0` / `1` |
   | `union` | `0 0` |
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [x] I cannot contribute a fix for this bug at this time


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

Reply via email to