ajantha-bhat commented on issue #9450: URL: https://github.com/apache/iceberg/issues/9450#issuecomment-1884075832
@wooyeong: Nice catch. Yeah, Optimizer thinks they both are identical query and merged it (as it is not aware of snapshot id/reference info). > I confirmed that the query works after changing to `SparkTable#equals` to compare `branch` and `snapshotId` as well as name, to have unique canonical form for each ref. I think this will miss an edge case. For example, if two time travel queries on same table, one with branch name and one with snapshot, both mapping to the same snapshot id should considered same. But in above case, it will be considered as different. I think the fix should be to find an effective snapshot id, `icebergTable.snapshot(branch)` if `branch` not null or `snapshotId` if not null and compare effective snapshot id in the `equals()`. Would you like to contribute the fix? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org