kfaraz commented on code in PR #13259:
URL: https://github.com/apache/druid/pull/13259#discussion_r1004034050
##########
sql/src/main/java/org/apache/druid/sql/DirectStatement.java:
##########
@@ -301,6 +302,7 @@ public void cancel()
public void close()
{
if (state != State.START && state != State.CLOSED) {
+ // super.close calls closeQuietly, which removes us from the
sqlLifecycleManager.
Review Comment:
Nit: should we rely on `close`/`closeQuietly` to do the right thing?
Since we are anyway doing an explicit remove in `closeWithError`, I suppose
we could do the same here too. Then we can just not override `closeQuietly`.
Alternatively,
I think `closeWithQuietly`, `close`, `closeWithError` should all internally
call a cleanup method. This new method should be abstract in
`AbstractStatement` so that all impls provide a concrete cleanup method.
--
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]