thswlsqls opened a new pull request, #16920:
URL: https://github.com/apache/iceberg/pull/16920

   ## Summary
   
   - `JdbcSnowflakeClient.snowflakeExceptionToIcebergException` builds the 
fallback `UncheckedSQLException` from `"Exception Message: %s"` and only the 
static `defaultExceptionMessage`, leaving the SQL driver message 
(`ex.getMessage()`) out of the top-level message.
   - The sibling branches in the same method (`NoSuchNamespaceException`, 
`NoSuchTableException`) already append `"Underlying exception: '%s'"` with 
`ex.getMessage()`. This aligns the fallback with them.
   - The cause (`ex`) is still passed through, so exception type and cause 
behavior are unchanged — only the message text changes. The fallback is reached 
by `listDatabases`/`listSchemas`/`listIcebergTables`/`loadTableMetadata` on any 
non-not-found `SQLException`.
   
   ## Testing done
   
   - Extended 
`TestJdbcSnowflakeClient#testListDatabasesSQLExceptionAtRootLevel` and 
`#testListDatabasesSQLExceptionWithoutErrorCode` to assert the SQL message now 
appears in the thrown message; both fail on the old message and pass after the 
change.
   - `./gradlew :iceberg-snowflake:check` — passed (no Docker required).
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 4.8
   - Platform/Tool: Claude Code
   - Human Oversight: fully reviewed
   - Prompt Summary: Find and fix a contribution candidate in the 
`:iceberg-snowflake` module; align the fallback exception message with sibling 
branches and add regression assertions.
   
   
   


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