cccs-jc opened a new issue, #7340:
URL: https://github.com/apache/iceberg/issues/7340

   ### Feature Request / Improvement
   
   When doing a spark `readStream` on a table where the snapshots have been 
removed. A streaming job might refer to an old snapshot ID which is no longer 
available. Under these conditions the current code throws a null pointer 
exception here
   
   
https://github.com/apache/iceberg/blob/e7df8c1a5ce53c9d2b3bfd7720441be0c85d18bc/spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkMicroBatchStream.java#L234
   
   It would be better to throw an exception here when obtaining the snapshot 
from the table. If it returns null we could throw an exception saying `snapshot 
ID 1234 could not be found in table`. 
   
   
https://github.com/apache/iceberg/blob/e7df8c1a5ce53c9d2b3bfd7720441be0c85d18bc/spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkMicroBatchStream.java#L215
   
   
   ### Query engine
   
   None


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