PDGGK opened a new pull request, #18242: URL: https://github.com/apache/iotdb/pull/18242
## Description `IoTDBResultMetadata.getCatalogName` read `columnInfoList.get(column - 1)` before its range check, so an out-of-range column index threw a raw `IndexOutOfBoundsException` instead of the `SQLException` required by the `ResultSetMetaData` contract (the range check was therefore unreachable). This calls `checkColumnIndex(column)` first — as the seven sibling accessors in the class already do — and removes the now-redundant inline range check. `checkColumnIndex` is a strict superset of that check (it also rejects an empty column list) and throws a proper `SQLException`. A test is added asserting that an out-of-range column throws `SQLException` rather than `IndexOutOfBoundsException`, and that a valid column is unaffected. This closes #18241. -- 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]
