Hisoka-X commented on code in PR #8916: URL: https://github.com/apache/seatunnel/pull/8916#discussion_r1982975782
########## seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/source/ClickhouseSourceReader.java: ########## @@ -80,31 +75,27 @@ public void close() throws IOException { @Override public void pollNext(Collector<SeaTunnelRow> output) throws Exception { synchronized (output.getCheckpointLock()) { - if (!splits.isEmpty()) { - try (ClickHouseResponse response = this.request.query(sql).executeAndWait()) { - response.stream() - .forEach( - record -> { - Object[] values = - new Object[this.rowTypeInfo.getFieldNames().length]; - for (int i = 0; i < record.size(); i++) { - if (record.getValue(i).isNullOrEmpty()) { - values[i] = null; - } else { - values[i] = - TypeConvertUtil.valueUnwrap( - this.rowTypeInfo.getFieldType(i), - record.getValue(i)); - } + try (ClickHouseResponse response = this.request.query(sql).executeAndWait()) { + response.stream() + .forEach( + record -> { + Object[] values = + new Object[this.rowTypeInfo.getFieldNames().length]; + for (int i = 0; i < record.size(); i++) { + if (record.getValue(i).isNullOrEmpty()) { + values[i] = null; + } else { + values[i] = + TypeConvertUtil.valueUnwrap( + this.rowTypeInfo.getFieldType(i), + record.getValue(i)); } - output.collect(new SeaTunnelRow(values)); - }); - } - signalNoMoreElement(); + } + output.collect(new SeaTunnelRow(values)); + }); } - if (noMoreSplit - && splits.isEmpty() - && Boundedness.BOUNDED.equals(readerContext.getBoundedness())) { + signalNoMoreElement(); + if (Boundedness.BOUNDED.equals(readerContext.getBoundedness())) { signalNoMoreElement(); Review Comment: ```suggestion signalNoMoreElement(); ``` -- 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: commits-unsubscr...@seatunnel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org