hudi-agent commented on code in PR #19503:
URL: https://github.com/apache/hudi/pull/19503#discussion_r3717726212
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/lookup/HoodieLookupTableReader.java:
##########
@@ -77,12 +86,21 @@ public RowData read(RowData reuse) throws IOException {
return null;
}
+ @Override
public void close() throws IOException {
- if (this.inputFormat != null) {
- inputFormat.close();
+ InputFormat format = this.inputFormat;
+ this.inputFormat = null;
+ this.inputSplits = null;
+ if (format == null) {
+ return;
}
Review Comment:
🤖 nit: `ignored` reads like the variable is inconsequential, but it's
actually the vehicle that guarantees `closeInputFormat` is called even when
`format.close()` throws. Something like `formatCloser` would signal that the
`Closeable` itself is the mechanism, not an accident.
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]