PDGGK commented on PR #17364: URL: https://github.com/apache/iotdb/pull/17364#issuecomment-5010908955
Hi @Adam-chengzhuo, thanks for fixing this -- I ran into the same findColumn issue recently. One thing that might be useful: the unknown-column NPE actually originates one layer down, in `IoTDBRpcDataSet.findColumn` (which this method delegates to) -- it does `return columnOrdinalMap.get(columnName)`, so `get()` returning null on an unknown column is what auto-unboxes into the NPE. The same pattern is also in `IoTDBJDBCDataSet.findColumn`, and `SessionDataSet.DataIterator.findColumn` reaches it too (a non-JDBC path). Guarding the null at that source -- the way the sibling `findColumnNameByIndex` already does -- would cover all of those callers, not just the JDBC ResultSet path, and the boundary could then just convert the resulting exception to SQLException. It'd be a small addition (the rpc-layer guard plus the two extra call sites, with a test). Happy to help with that here or as a follow-up if you think it's worth covering. Thanks again! -- 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]
