thswlsqls opened a new issue, #16923:
URL: https://github.com/apache/iceberg/issues/16923

   ### What happens
   
   `SparkValueConverter.convertToSpark(Type, Object)` returns `new 
UnsupportedOperationException(...)` for the `STRUCT`, `LIST`, and `MAP` cases 
instead of throwing it 
(`spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/SparkValueConverter.java:132`).
 Because the method returns `Object`, the exception object is handed back as a 
value rather than raised.
   
   ### Expected
   
   It should throw, like the same method's `default` branch (line 154).
   
   ### Impact
   
   The only caller, `SparkRewritePositionDeleteRunner.dataFiles()`, passes 
partition-field types, which are always primitive, so this branch is not 
reached today — this is a latent correctness fix. If reached, the exception 
would flow into `lit(...)` and fail in a confusing place instead of surfacing 
the intended error.
   
   ### Affected versions
   
   The same code exists in Spark v3.5, v4.0, and v4.1.
   


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