PDGGK opened a new pull request, #18251:
URL: https://github.com/apache/iotdb/pull/18251

   ## Description
   
   `IoTDBRpcDataSet.findColumn(String)` returned 
`columnOrdinalMap.get(columnName)` directly, so an unknown column name unboxed 
a `null` `Integer` into a `NullPointerException` instead of the `SQLException` 
that the `ResultSet.findColumn` contract requires. This guards the lookup and 
throws a checked `StatementExecutionException` (reusing the existing 
`UNKNOWN_COLUMN_NAME` message), mirroring the sibling `findColumnNameByIndex`. 
The JDBC boundary `IoTDBJDBCResultSet.findColumn` converts it to `SQLException` 
(like the existing `getBigDecimal` path), and 
`SessionDataSet.DataIterator.findColumn` propagates the checked exception, 
consistent with its sibling accessors. The identical NPE in the public 
`IoTDBJDBCDataSet.findColumn` is fixed the same way.
   
   A test asserts that an unknown column name throws `SQLException` rather than 
`NullPointerException`, and that a valid column name still resolves.
   
   This closes #18250.
   


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

Reply via email to