muttakin2301/ccr_train_1000 huggingface dataset:
Code review comment: ```suggestion         if (inPredicate.getOptions().size() != 1) { ```

Code before review:
public Expression visitInPredicate(InPredicate inPredicate, ExpressionRewriteContext context) {
if (inPredicate.getOptions().size() > 1) {
return inPredicate;
}
Expression left = inPredicate.getCompareExpr();
Expression right = inPredicate.getOptions().get(0);
return new EqualTo(left, right);
}

Line under review: if (inPredicate.getOptions().size() > 1) {

Code after addressing the review:
public Expression visitInPredicate(InPredicate inPredicate, ExpressionRewriteContext context) {
Expression left = inPredicate.getCompareExpr();
List<Expression> right = inPredicate.getOptions();
if (right.size() != 1) {
return new InPredicate(left.accept(this, context), right);
}
return new EqualTo(left.accept(this, context), right.get(0).accept(this, context));
}
Code review comment: added the null check. setters are idiomatic in java, facilitates fluency.

Code before review:
public Secret setProperties(SecretProperties properties) {
properties.name = this.properties.name;
this.properties = properties;
return this;
}

Line under review: return this;

Code after addressing the review:
public Secret setProperties(SecretProperties properties) {
Objects.requireNonNull(properties);
properties.name = this.properties.name;
this.properties = properties;
return this;
}
Code review comment: Ok, I add unit test now

Code before review:
public List<Record> fetchRecords(final int batchSize, final int timeout, final TimeUnit timeUnit) {
List<Record> result = new LinkedList<>();
long start = System.currentTimeMillis();
int recordsCount = 0;
while (batchSize > recordsCount) {
List<Record> records = queue.poll();
if (null == records || records.isEmpty()) {
TimeUnit.MILLISECONDS.sleep(100L);
} else {
recordsCount += records.size();
result.addAll(records);
}
if (timeUnit.toMillis(timeout) <= System.currentTimeMillis() - start) {
break;
}
}
return result;
}

Line under review: TimeUnit.MILLISECONDS.sleep(100L);

Code after addressing the review:
public List<Record> fetchRecords(final int batchSize, final int timeout, final TimeUnit timeUnit) {
List<Record> result = new LinkedList<>();
long start = System.currentTimeMillis();
int recordsCount = 0;
while (batchSize > recordsCount) {
List<Record> records = queue.poll();
if (null == records || records.isEmpty()) {
TimeUnit.MILLISECONDS.sleep(Math.min(100, timeUnit.toMillis(timeout)));
} else {
recordsCount += records.size();
result.addAll(records);
}
if (timeUnit.toMillis(timeout) <= System.currentTimeMillis() - start) {
break;
}
}
return result;
}
Code review comment: > or disposes existing ones  Is that a typo from copying/pasting? Users shouldn't be allowed to dispose checkpoints 🤔  

Code before review:
public static void printHelpForCheckpoint(Collection<CustomCommandLine> customCommandLines) {
HelpFormatter formatter = new HelpFormatter();
formatter.setLeftPadding(5);
formatter.setWidth(80);
System.out.println(
"\nAction \"checkpoint\" triggers checkpoints for a running job or disposes existing ones.");
System.out.println("\n  Syntax: checkpoint [OPTIONS] <Job ID>");
formatter.setSyntaxPrefix("  \"checkpoint\" action options:");
formatter.printHelp(" ", getCheckpointOptionsWithoutDeprecatedOptions(new Options()));
printCustomCliOptions(customCommandLines, formatter, false);
System.out.println();
}

Line under review: "\nAction \"checkpoint\" triggers checkpoints for a running job or disposes existing ones.");

Code after addressing the review:
public static void printHelpForCheckpoint(Collection<CustomCommandLine> customCommandLines) {
HelpFormatter formatter = new HelpFormatter();
formatter.setLeftPadding(5);
formatter.setWidth(80);
System.out.println("\nAction \"checkpoint\" triggers checkpoints for a running job.");
System.out.println("\n  Syntax: checkpoint [OPTIONS] <Job ID>");
formatter.setSyntaxPrefix("  \"checkpoint\" action options:");
formatter.printHelp(" ", getCheckpointOptionsWithoutDeprecatedOptions(new Options()));
printCustomCliOptions(customCommandLines, formatter, false);
System.out.println();
}
Code review comment: Can extract `errorBindingPattern.errorMessageBindingPattern` out to a variable. Applies to the cause and field patterns too. 

Code before review:
public void visit(BLangSimpleBindingPattern simpleBindingPattern) {
if (simpleBindingPattern.wildCardBindingPattern != null) {
analyzeNode(simpleBindingPattern.wildCardBindingPattern, env);
return;
}
if (simpleBindingPattern.captureBindingPattern != null) {
analyzeNode(simpleBindingPattern.captureBindingPattern, env);
simpleBindingPattern.declaredVars.putAll(simpleBindingPattern.captureBindingPattern.declaredVars);
}
}

Line under review: }

Code after addressing the review:
public void visit(BLangSimpleBindingPattern simpleBindingPattern) {
if (simpleBindingPattern.wildCardBindingPattern != null) {
analyzeNode(simpleBindingPattern.wildCardBindingPattern, env);
return;
}
if (simpleBindingPattern.captureBindingPattern != null) {
analyzeNode(simpleBindingPattern.captureBindingPattern, env);
simpleBindingPattern.declaredVars.putAll(simpleBindingPattern.captureBindingPattern.declaredVars);
}
}
Code review comment: In some situation, the tablet may not be dropped in BE because of high load. So the drop task will be send repeatedly until the replica is deleted on BE. 

Code before review:
public void deleteTablet(long tabletId) {
if (GlobalStateMgr.isCheckpointThread()) {
return;
}
writeLock();
try {
Map<Long, Replica> replicas = replicaMetaTable.rowMap().remove(tabletId);
if (replicas != null) {
for (Replica replica : replicas.values()) {
replicaToTabletMap.remove(replica.getId());
}
for (long backendId : replicas.keySet()) {
backingReplicaMetaTable.remove(backendId, tabletId);
}
}
tabletMetaMap.remove(tabletId);
LOG.debug("delete tablet: {}", tabletId);
} finally {
writeUnlock();
}
}

Line under review: if (GlobalStateMgr.isCheckpointThread()) {

Code after addressing the review:
public void deleteTablet(long tabletId) {
if (GlobalStateMgr.isCheckpointThread()) {
return;
}
writeLock();
try {
Map<Long, Replica> replicas = replicaMetaTable.rowMap().remove(tabletId);
if (replicas != null) {
for (Replica replica : replicas.values()) {
replicaToTabletMap.remove(replica.getId());
}
for (long backendId : replicas.keySet()) {
backingReplicaMetaTable.remove(backendId, tabletId);
}
}
tabletMetaMap.remove(tabletId);
LOG.debug("delete tablet: {}", tabletId);
} finally {
writeUnlock();
}
}
Code review comment: nit: ```suggestion         assertThat(jobVertex).isNotNull();         assertThat(jobVertex.getParallelism()).isEqualTo(JOB_VERTEX.getParallelism());         // JOB_VERTEX.maxP == -1, but we want the actual maxP determined by the scheduler         assertThat(jobVertex.getMaxParallelism()).isEqualTo(128); ```

Code before review:
void testArchivedJobVerticesPresent() throws Exception {
final JobGraph jobGraph = createJobGraph();
jobGraph.setSnapshotSettings(
new JobCheckpointingSettings(
CheckpointCoordinatorConfiguration.builder().build(), null));
final ArchivedExecutionGraph archivedExecutionGraph =
new AdaptiveSchedulerBuilder(jobGraph, mainThreadExecutor)
.build(EXECUTOR_RESOURCE.getExecutor())
.getArchivedExecutionGraph(JobStatus.INITIALIZING, null);
ArchivedExecutionJobVertex jobVertex =
archivedExecutionGraph.getJobVertex(JOB_VERTEX.getID());
assertThat(jobVertex)
.isNotNull()
.satisfies(
archived -> {
assertThat(archived.getParallelism())
.isEqualTo(JOB_VERTEX.getParallelism());
assertThat(archived.getMaxParallelism()).isEqualTo(128);
});
ArchivedExecutionGraphTest.assertContainsCheckpointSettings(archivedExecutionGraph);
}

Line under review: });

Code after addressing the review:
void testArchivedJobVerticesPresent() throws Exception {
final JobGraph jobGraph = createJobGraph();
jobGraph.setSnapshotSettings(
new JobCheckpointingSettings(
CheckpointCoordinatorConfiguration.builder().build(), null));
final ArchivedExecutionGraph archivedExecutionGraph =
new AdaptiveSchedulerBuilder(jobGraph, mainThreadExecutor)
.build(EXECUTOR_RESOURCE.getExecutor())
.getArchivedExecutionGraph(JobStatus.INITIALIZING, null);
ArchivedExecutionJobVertex jobVertex =
archivedExecutionGraph.getJobVertex(JOB_VERTEX.getID());
assertThat(jobVertex)
.isNotNull()
.satisfies(
archived -> {
assertThat(archived.getParallelism())
.isEqualTo(JOB_VERTEX.getParallelism());
assertThat(archived.getMaxParallelism()).isEqualTo(128);
});
ArchivedExecutionGraphTest.assertContainsCheckpointSettings(archivedExecutionGraph);
}
Code review comment: What happens service side if it receives an empty `clientFilters` list? The other option would be to defer this instantiation and only perform it when `addFilter` is called and `clientFilters == null`

Code before review:
public FeatureFlagConfigurationSetting(String featureId, boolean isEnabled) {
this.featureId = featureId;
this.isEnabled = isEnabled;
super.setKey(KEY_PREFIX + featureId);
super.setContentType(FEATURE_FLAG_CONTENT_TYPE);
clientFilters = new ArrayList<>();
}

Line under review: clientFilters = new ArrayList<>();

Code after addressing the review:
public FeatureFlagConfigurationSetting(String featureId, boolean isEnabled) {
this.featureId = featureId;
this.isEnabled = isEnabled;
super.setKey(KEY_PREFIX + featureId);
super.setContentType(FEATURE_FLAG_CONTENT_TYPE);
}
Code review comment: Hmm, I did want to implement this because it might cause problems for the `KafkaCommitter` because closing with ZERO does **not** ensure all pending messages for the producer are emitted. For the committer, this means if the network connection is slow it can never commit because we do not call `flush()` explicitly and rather use the close mechanism to do so. Before this change, it waited indefinitely.

Code before review:
public long getProducerId() {
Object transactionManager = getTransactionManager();
Object producerIdAndEpoch = getField(transactionManager, PRODUCER_ID_AND_EPOCH_FIELD_NAME);
return (long) getField(producerIdAndEpoch, "producerId");
}

Line under review: Object transactionManager = getTransactionManager();

Code after addressing the review:
public long getProducerId() {
Object transactionManager = getTransactionManager();
Object producerIdAndEpoch = getField(transactionManager, PRODUCER_ID_AND_EPOCH_FIELD_NAME);
return (long) getField(producerIdAndEpoch, "producerId");
}
Code review comment: I think this extension should be marked as _critical_.

Code before review:
X509Certificate generateX509Certificate(PKCS10CertificationRequest certReq, String remoteHostname) {
assertCertificateCommonName(certReq.getSubject(), remoteHostname);
assertCertificateExtensions(certReq);
Date notBefore = Date.from(clock.instant());
Date notAfter = Date.from(clock.instant().plus(CERTIIFICATE_DURATION));
try {
PublicKey publicKey = new JcaPKCS10CertificationRequest(certReq).getPublicKey();
X509v3CertificateBuilder caBuilder = new JcaX509v3CertificateBuilder(
issuer, BigInteger.valueOf(clock.millis()), notBefore, notAfter, certReq.getSubject(), publicKey)
.addExtension(Extension.basicConstraints, false, new BasicConstraints(false));
ContentSigner caSigner = new JcaContentSignerBuilder(SIGNER_ALGORITHM).build(caPrivateKey);
return new JcaX509CertificateConverter()
.setProvider(new BouncyCastleProvider())
.getCertificate(caBuilder.build(caSigner));
} catch (Exception ex) {
log.log(LogLevel.ERROR, "Failed to generate X509 Certificate", ex);
throw new RuntimeException("Failed to generate X509 Certificate");
}
}

Line under review: .addExtension(Extension.basicConstraints, false, new BasicConstraints(false));

Code after addressing the review:
X509Certificate generateX509Certificate(PKCS10CertificationRequest certReq, String remoteHostname) {
verifyCertificateCommonName(certReq.getSubject(), remoteHostname);
verifyCertificateExtensions(certReq);
Date notBefore = Date.from(clock.instant());
Date notAfter = Date.from(clock.instant().plus(CERTIFICATE_EXPIRATION));
try {
PublicKey publicKey = new JcaPKCS10CertificationRequest(certReq).getPublicKey();
X509v3CertificateBuilder caBuilder = new JcaX509v3CertificateBuilder(
issuer, BigInteger.valueOf(clock.millis()), notBefore, notAfter, certReq.getSubject(), publicKey)
.addExtension(Extension.basicConstraints, true, new BasicConstraints(false));
ContentSigner caSigner = new JcaContentSignerBuilder(SIGNER_ALGORITHM).build(caPrivateKey);
return certificateConverter
.setProvider(provider)
.getCertificate(caBuilder.build(caSigner));
} catch (Exception ex) {
log.log(LogLevel.ERROR, "Failed to generate X509 Certificate", ex);
throw new RuntimeException("Failed to generate X509 Certificate");
}
}
Code review comment: Findbugs and I have a mild feud over this one, as I care more about the usual properties of equality than the usual properties of inheritance. One is much older and more clearly timeless than the other... :-)  Your change is g2g though. This is a corner case with no right answer, so making findbugs happy by calling a getter is just fine with me.

Code before review:
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GameActionInfo gameActionInfo = (GameActionInfo) o;
if (!user.equals(gameActionInfo.getUser())) {
return false;
}
if (!team.equals(gameActionInfo.getTeam())) {
return false;
}
if (!score.equals(gameActionInfo.getScore())) {
return false;
}
return timestamp.equals(gameActionInfo.getTimestamp());
}

Line under review: if (o == null || getClass() != o.getClass()) {

Code after addressing the review:
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || o.getClass() != this.getClass()) {
return false;
}
GameActionInfo gameActionInfo = (GameActionInfo) o;
if (!this.getUser().equals(gameActionInfo.getUser())) {
return false;
}
if (!this.getTeam().equals(gameActionInfo.getTeam())) {
return false;
}
if (!this.getScore().equals(gameActionInfo.getScore())) {
return false;
}
return this.getTimestamp().equals(gameActionInfo.getTimestamp());
}
Code review comment: All tests that verifying the `SentenceSentiment` has verifying the offset and length. See https://github.com/Azure/azure-sdk-for-java/pull/14599/files/8f914029e29ac9d387803cc94f8db120ed7fcaba#diff-6152e7741d610810c960c85cfc56fbc2R361

Code before review:
public int getLength() {
return length;
}

Line under review: return length;

Code after addressing the review:
public int getLength() {
return length;
}
Code review comment: The Precondition check should go before the cast

Code before review:
public void writeSchema(Schema schema, OutputStream out) throws IOException {
byte[] data = ((ByteArrayOutputStream) out).toByteArray();
((ByteArrayOutputStream) out).reset();
glueSchemaRegistryOutputStreamSerializer.registerSchemaAndSerializeStream(
schema, out, data);
}

Line under review: ((ByteArrayOutputStream) out).reset();

Code after addressing the review:
public void writeSchema(Schema schema, OutputStream out) throws IOException {
Preconditions.checkArgument(
out instanceof ByteArrayOutputStream, "The stream is not supported.");
byte[] data = ((ByteArrayOutputStream) out).toByteArray();
((ByteArrayOutputStream) out).reset();
glueSchemaRegistryOutputStreamSerializer.registerSchemaAndSerializeStream(
schema, out, data);
}
Code review comment: It's a safe assumption to fail the component (graph) construction if config is invalid.

Code before review:
private void extractGlobalPhaseData(RankProfilesConfig rankProfilesConfig) {
for (var rp : rankProfilesConfig.rankprofile()) {
String name = rp.name();
Supplier<FunctionEvaluator> functionEvaluatorSource = null;
int rerankCount = -1;
List<String> needInputs = null;
for (var prop : rp.fef().property()) {
if (prop.name().equals("vespa.globalphase.rerankcount")) {
try {
rerankCount = Integer.valueOf(prop.value());
} catch (NumberFormatException e) {
logger.warning("bad vespa.globalphase.rerankcount '" + prop.value() +
"' for rank profile " + name + ": " + e.getMessage());
}
}
if (prop.name().equals("vespa.rank.globalphase")) {
try {
var model = modelForRankProfile(name);
functionEvaluatorSource = () -> model.evaluatorOf("globalphase");
var evaluator = functionEvaluatorSource.get();
needInputs = List.copyOf(evaluator.function().arguments());
} catch (IllegalArgumentException e) {
logger.warning("failed setting up global-phase for " + name + " because: " + e.getMessage());
functionEvaluatorSource = null;
}
}
}
if (functionEvaluatorSource != null && needInputs != null) {
profilesWithGlobalPhase.put(name, new GlobalPhaseData(functionEvaluatorSource, rerankCount, needInputs));
}
}
}

Line under review: logger.warning("bad vespa.globalphase.rerankcount '" + prop.value() +

Code after addressing the review:
private void extractGlobalPhaseData(RankProfilesConfig rankProfilesConfig) {
for (var rp : rankProfilesConfig.rankprofile()) {
String name = rp.name();
Supplier<FunctionEvaluator> functionEvaluatorSource = null;
int rerankCount = -1;
List<String> needInputs = null;
for (var prop : rp.fef().property()) {
if (prop.name().equals("vespa.globalphase.rerankcount")) {
rerankCount = Integer.valueOf(prop.value());
}
if (prop.name().equals("vespa.rank.globalphase")) {
var model = modelForRankProfile(name);
functionEvaluatorSource = () -> model.evaluatorOf("globalphase");
var evaluator = functionEvaluatorSource.get();
needInputs = List.copyOf(evaluator.function().arguments());
}
}
if (functionEvaluatorSource != null && needInputs != null) {
profilesWithGlobalPhase.put(name, new GlobalPhaseData(functionEvaluatorSource, rerankCount, needInputs));
}
}
}
Code review comment: ```java assertThatThrownBy(autoCloseableRegistry::close)                 .hasMessage("1")                 .satisfies(                         e -> assertThat(e.getSuppressed()[0]).hasMessage("2"),                         e -> assertThat(e.getSuppressed()[1]).hasMessage("java.lang.AssertionError: 3")); ```

Code before review:
void testSuppressedExceptions() throws Exception {
AutoCloseableRegistry autoCloseableRegistry = new AutoCloseableRegistry();
autoCloseableRegistry.registerCloseable(
() -> {
throw new AssertionError("3");
});
autoCloseableRegistry.registerCloseable(
() -> {
throw new Exception("2");
});
autoCloseableRegistry.registerCloseable(
() -> {
throw new Exception("1");
});
try {
autoCloseableRegistry.close();
fail("Close should throw exception");
} catch (Exception ex) {
assertThat(ex.getMessage()).isEqualTo("1");
assertThat(ex.getSuppressed()[0].getMessage()).isEqualTo("2");
assertThat(ex.getSuppressed()[1].getMessage()).isEqualTo("java.lang.AssertionError: 3");
}
}

Line under review: assertThat(ex.getSuppressed()[1].getMessage()).isEqualTo("java.lang.AssertionError: 3");

Code after addressing the review:
void testSuppressedExceptions() throws Exception {
AutoCloseableRegistry autoCloseableRegistry = new AutoCloseableRegistry();
autoCloseableRegistry.registerCloseable(
() -> {
throw new AssertionError("3");
});
autoCloseableRegistry.registerCloseable(
() -> {
throw new Exception("2");
});
autoCloseableRegistry.registerCloseable(
() -> {
throw new Exception("1");
});
try {
autoCloseableRegistry.close();
fail("Close should throw exception");
} catch (Exception ex) {
assertThatThrownBy(
() -> {
throw ex;
})
.hasMessage("1")
.satisfies(
e -> assertThat(e.getSuppressed()[0]).hasMessage("2"),
e ->
assertThat(e.getSuppressed()[1])
.hasMessage("java.lang.AssertionError: 3"));
}
}
Code review comment: `copyStatsAndGroupIdFrom` only if `super.visit(plan, context)) != plan`?

Code before review:
public Plan visit(Plan plan, CascadesContext context) {
return ((AbstractPhysicalPlan) super.visit(plan, context)).copyStatsAndGroupIdFrom((AbstractPhysicalPlan) plan);
}

Line under review: return ((AbstractPhysicalPlan) super.visit(plan, context)).copyStatsAndGroupIdFrom((AbstractPhysicalPlan) plan);

Code after addressing the review:
public Plan visit(Plan plan, CascadesContext context) {
AbstractPhysicalPlan newPlan = (AbstractPhysicalPlan) super.visit(plan, context);
return newPlan == plan ? plan : newPlan.copyStatsAndGroupIdFrom((AbstractPhysicalPlan) plan);
}
Code review comment: Perhaps change the parameter name from "string" to something like "stringAndWindow" or something better.

Code before review:
public static Write<String> writeStrings() {
return Write.newBuilder(
(ValueInSingleWindow<String> string) ->
new PubsubMessage(
string.getValue().getBytes(StandardCharsets.UTF_8), ImmutableMap.of()))
.setDynamicDestinations(false)
.build();
}

Line under review: (ValueInSingleWindow<String> string) ->

Code after addressing the review:
public static Write<String> writeStrings() {
return Write.newBuilder(
(ValueInSingleWindow<String> stringAndWindow) ->
new PubsubMessage(
stringAndWindow.getValue().getBytes(StandardCharsets.UTF_8), ImmutableMap.of()))
.setDynamicDestinations(false)
.build();
}
Code review comment: You should be able to simplify - I don't think you need the readConverter.  .apply("AvroIORead", AvroIO.readGenericRecords(...).withBeamSchemas(true)) .apply("GenericRecordToRow", Convert.toRows());

Code before review:
public PCollection<Row> buildIOReader(PBegin begin) {
PTransform<PCollection<GenericRecord>, PCollection<Row>> readConverter =
GenericRecordReadConverter.builder().beamSchema(schema).build();
return begin
.apply(
"AvroIORead",
AvroIO.readGenericRecords(AvroUtils.toAvroSchema(schema, tableName, null))
.from(filePattern))
.apply("GenericRecordToRow", readConverter);
}

Line under review: .from(filePattern))

Code after addressing the review:
public PCollection<Row> buildIOReader(PBegin begin) {
return begin
.apply(
"AvroIORead",
AvroIO.readGenericRecords(AvroUtils.toAvroSchema(schema, tableName, null))
.withBeamSchemas(true)
.from(filePattern))
.apply("GenericRecordToRow", Convert.toRows());
}
Code review comment: Likely dev just calls it to ensure the object is synced with server. In common use case this is not required.

Code before review:
public void canUpdateCname() {
final Region region = Region.US_EAST;
final String topLevelDomain = "www.contoso" + generateRandomResourceName("z", 10) + ".com";
PrivateDnsZone dnsZone =
privateZoneManager
.privateZones()
.define(topLevelDomain)
.withNewResourceGroup(rgName, region)
.defineCnameRecordSet("www")
.withAlias("cname.contoso.com")
.withTimeToLive(7200)
.attach()
.create();
dnsZone.refresh();
PagedIterable<CnameRecordSet> cnameRecordSets = dnsZone.cnameRecordSets().list();
Assertions.assertEquals(1, TestUtilities.getSize(cnameRecordSets));
CnameRecordSet cnameRecordSet = cnameRecordSets.iterator().next();
Assertions.assertEquals("www", cnameRecordSet.name());
Assertions.assertEquals(7200, cnameRecordSet.timeToLive());
Assertions.assertEquals("cname.contoso.com", cnameRecordSet.canonicalName());
dnsZone
.update()
.updateCnameRecordSet("www")
.withAlias("new.contoso.com")
.withTimeToLive(1234)
.parent()
.apply();
dnsZone.refresh();
PagedIterable<CnameRecordSet> updatedCnameRecordSets = dnsZone.cnameRecordSets().list();
Assertions.assertEquals(1, TestUtilities.getSize(updatedCnameRecordSets));
CnameRecordSet updatedCnameRecordSet = updatedCnameRecordSets.iterator().next();
Assertions.assertEquals(1234, updatedCnameRecordSet.timeToLive());
Assertions.assertEquals("new.contoso.com", updatedCnameRecordSet.canonicalName());
}

Line under review: dnsZone.refresh();

Code after addressing the review:
public void canUpdateCname() {
final Region region = Region.US_EAST;
final String topLevelDomain = "www.contoso" + generateRandomResourceName("z", 10) + ".com";
PrivateDnsZone dnsZone =
privateZoneManager
.privateZones()
.define(topLevelDomain)
.withNewResourceGroup(rgName, region)
.defineCnameRecordSet("www")
.withAlias("cname.contoso.com")
.withTimeToLive(7200)
.attach()
.create();
dnsZone.refresh();
PagedIterable<CnameRecordSet> cnameRecordSets = dnsZone.cnameRecordSets().list();
Assertions.assertEquals(1, TestUtilities.getSize(cnameRecordSets));
CnameRecordSet cnameRecordSet = cnameRecordSets.iterator().next();
Assertions.assertEquals("www", cnameRecordSet.name());
Assertions.assertEquals(7200, cnameRecordSet.timeToLive());
Assertions.assertEquals("cname.contoso.com", cnameRecordSet.canonicalName());
dnsZone
.update()
.updateCnameRecordSet("www")
.withAlias("new.contoso.com")
.withTimeToLive(1234)
.parent()
.apply();
dnsZone.refresh();
PagedIterable<CnameRecordSet> updatedCnameRecordSets = dnsZone.cnameRecordSets().list();
Assertions.assertEquals(1, TestUtilities.getSize(updatedCnameRecordSets));
CnameRecordSet updatedCnameRecordSet = updatedCnameRecordSets.iterator().next();
Assertions.assertEquals(1234, updatedCnameRecordSet.timeToLive());
Assertions.assertEquals("new.contoso.com", updatedCnameRecordSet.canonicalName());
}
Code review comment: In Reactor, void return types won't have `onNext()`. So, this message will have to be printed in `onComplete()` consumer. Update other samples too.  ```java .subscribe(ignored -> {},        error -> logger.error("...", error),        () -> logger.info("Delete Entity Successful.")); ```

Code before review:
private void deleteEntity() {
TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder()
.connectionString("connectionString")
.buildAsyncClient();
TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies");
QueryOptions queryOptions = new QueryOptions();
queryOptions.setFilter("RowKey eq crayolaMarkers");
tableAsyncClient.queryEntity(queryOptions).flatMap(tableEntity -> {
logger.info("Table Entity: " + tableEntity);
Mono<Void> deleteEntityMono = tableAsyncClient.deleteEntity(tableEntity);
return deleteEntityMono;
}).subscribe(Void -> {
logger.info("Delete Entity Successful.");
}, error -> {
logger.error("There was an error deleting the Entity. Error: " + error);
});
}

Line under review: logger.info("Delete Entity Successful.");

Code after addressing the review:
private void deleteEntity() {
TableServiceAsyncClient tableServiceAsyncClient = new TableServiceClientBuilder()
.connectionString("connectionString")
.buildAsyncClient();
TableAsyncClient tableAsyncClient = tableServiceAsyncClient.getTableAsyncClient("OfficeSupplies");
String rowKey = "crayolaMarkers";
String partitionKey = "markers";
tableAsyncClient.get(rowKey, partitionKey).flatMap(tableEntity -> {
System.out.println("Table Entity: " + tableEntity);
return tableAsyncClient.deleteEntity(tableEntity);
}).subscribe(
Void -> { },
error -> System.err.println("There was an error deleting the Entity. Error: " + error),
() -> System.out.println("Delete Entity Successful."));
}
Code review comment: I would expect symbolic container names with _ to be considered canonical by the docker dns proxy. I have not tested this, so I do not know.

Code before review:
private void checkName(HostSystem parent, String hostname) {
try {
Object address = java.net.InetAddress.getByName(hostname);
} catch (UnknownHostException e) {
deployLogger().log(Level.WARNING, "Unable to lookup IP address of host: " + hostname);
}
if (! hostname.contains(".")) {
deployLogger().log(Level.WARNING, "Host named '" + hostname + "' may not receive any config " +
"since it is not a canonical hostname");
}
}

Line under review: if (! hostname.contains(".")) {

Code after addressing the review:
private void checkName(HostSystem parent, String hostname) {
try {
Object address = java.net.InetAddress.getByName(hostname);
} catch (UnknownHostException e) {
deployLogger().log(Level.WARNING, "Unable to lookup IP address of host: " + hostname);
}
if (! hostname.contains(".")) {
deployLogger().log(Level.WARNING, "Host named '" + hostname + "' may not receive any config " +
"since it is not a canonical hostname");
}
}
Code review comment: Should be better for perf since we don't create new flux every iteration.

Code before review:
public Mono<Void> runAsync() {
return blobAsyncClient.upload(randomByteBufferFlux, null, true).then();
}

Line under review: return blobAsyncClient.upload(randomByteBufferFlux, null, true).then();

Code after addressing the review:
public Mono<Void> runAsync() {
return blobAsyncClient.upload(randomByteBufferFlux, null, true).then();
}
Code review comment: So I guess we have two cases: - bulk addition of initial splits before first `emitNext` - bulk addition of initial splits after first `emitNext`  You should ensure that both cases are covered by tests. I'd also recommend to add inline (java)docs that spell out the cases explicitly. For that I'd probably extract this `forEach` to a private method (e.g., `setupInitialSplit` or find a better name).

Code before review:
public void handleOperatorEvent(OperatorEvent event) {
if (event instanceof WatermarkAlignmentEvent) {
updateMaxDesiredWatermark((WatermarkAlignmentEvent) event);
checkWatermarkAlignment();
} else if (event instanceof AddSplitEvent) {
try {
List<SplitT> newSplits = ((AddSplitEvent<SplitT>) event).splits(splitSerializer);
if (operatingMode == OperatingMode.OUTPUT_NOT_INITIALIZED) {
outputPendingSplits.addAll(newSplits);
} else {
newSplits.forEach(
split -> currentMainOutput.createOutputForSplit(split.splitId()));
}
sourceReader.addSplits(newSplits);
} catch (IOException e) {
throw new FlinkRuntimeException("Failed to deserialize the splits.", e);
}
} else if (event instanceof SourceEventWrapper) {
sourceReader.handleSourceEvents(((SourceEventWrapper) event).getSourceEvent());
} else if (event instanceof NoMoreSplitsEvent) {
sourceReader.notifyNoMoreSplits();
} else {
throw new IllegalStateException("Received unexpected operator event " + event);
}
}

Line under review: newSplits.forEach(

Code after addressing the review:
public void handleOperatorEvent(OperatorEvent event) {
if (event instanceof WatermarkAlignmentEvent) {
updateMaxDesiredWatermark((WatermarkAlignmentEvent) event);
checkWatermarkAlignment();
} else if (event instanceof AddSplitEvent) {
handleAddSplitsEvent(((AddSplitEvent<SplitT>) event));
} else if (event instanceof SourceEventWrapper) {
sourceReader.handleSourceEvents(((SourceEventWrapper) event).getSourceEvent());
} else if (event instanceof NoMoreSplitsEvent) {
sourceReader.notifyNoMoreSplits();
} else {
throw new IllegalStateException("Received unexpected operator event " + event);
}
}
Code review comment: Looks like this is now failing code formatting checks, could you please run: `./gradlew :sdks:java:io:google-cloud-platform:spotlessApply` from the root of the project to fix?

Code before review:
public static void tearDownTempBucket() throws IOException {
GoogleCredentials credentials = GoogleCredentials.getApplicationDefault();
HttpRequestInitializer requestInitializer =
request -> {
HttpHeaders requestHeaders = request.getHeaders();
if (!credentials.hasRequestMetadata()) {
return;
}
URI uri = null;
if (request.getUrl() != null) {
uri = request.getUrl().toURI();
}
Map<String, List<String>> credentialHeaders = credentials.getRequestMetadata(uri);
if (credentialHeaders == null) {
return;
}
for (Map.Entry<String, List<String>> entry : credentialHeaders.entrySet()) {
String headerName = entry.getKey();
List<String> requestValues = new ArrayList<>(entry.getValue());
requestHeaders.put(headerName, requestValues);
}
request.setConnectTimeout(60000);
request.setReadTimeout(60000);
};
Storage storage =
new Storage.Builder(new NetHttpTransport(), new GsonFactory(), requestInitializer)
.build();
List<StorageObject> blobs = storage.objects().list(DEFAULT_TEMP_BUCKET).execute().getItems();
if (blobs != null) {
for (StorageObject blob : blobs) {
storage.objects().delete(DEFAULT_TEMP_BUCKET, blob.getId());
}
}
}

Line under review: new Storage.Builder(new NetHttpTransport(), new GsonFactory(), requestInitializer)

Code after addressing the review:
public static void tearDownTempBucket() throws IOException {
GoogleCredentials credentials = GoogleCredentials.getApplicationDefault();
HttpRequestInitializer requestInitializer =
request -> {
HttpHeaders requestHeaders = request.getHeaders();
if (!credentials.hasRequestMetadata()) {
return;
}
URI uri = null;
if (request.getUrl() != null) {
uri = request.getUrl().toURI();
}
Map<String, List<String>> credentialHeaders = credentials.getRequestMetadata(uri);
if (credentialHeaders == null) {
return;
}
for (Map.Entry<String, List<String>> entry : credentialHeaders.entrySet()) {
String headerName = entry.getKey();
List<String> requestValues = new ArrayList<>(entry.getValue());
requestHeaders.put(headerName, requestValues);
}
request.setConnectTimeout(60000);
request.setReadTimeout(60000);
};
Storage storage =
new Storage.Builder(new NetHttpTransport(), new GsonFactory(), requestInitializer).build();
List<StorageObject> blobs = storage.objects().list(DEFAULT_TEMP_BUCKET).execute().getItems();
if (blobs != null) {
for (StorageObject blob : blobs) {
storage.objects().delete(DEFAULT_TEMP_BUCKET, blob.getId());
}
}
}
Code review comment: This add-check-reset logic seems like it could belong in a single call, or belong to a single object.

Code before review:
public void onNext(T value) {
numberOfMessagesBeforeReadyCheck += 1;
if (numberOfMessagesBeforeReadyCheck >= maxMessagesBeforeCheck) {
numberOfMessagesBeforeReadyCheck = 0;
int waitTime = 1;
int totalTimeWaited = 0;
int phase = phaser.getPhase();
while (!outboundObserver.isReady()) {
try {
phaser.awaitAdvanceInterruptibly(phase, waitTime, TimeUnit.SECONDS);
} catch (TimeoutException e) {
totalTimeWaited += waitTime;
waitTime = waitTime * 2;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
if (totalTimeWaited > 0) {
if (phase == phaser.getPhase()) {
LOGGER.info(
"Output channel stalled for {}s, outbound thread {}. gRPC requires that outbound "
+ "channel be on a non gRPC inbound channel thread for the channel readiness "
+ "callback to function.",
totalTimeWaited,
Thread.currentThread().getName());
} else {
LOGGER.debug(
"Output channel stalled for {}s, outbound thread {}.",
totalTimeWaited,
Thread.currentThread().getName());
}
}
}
synchronized (outboundObserver) {
outboundObserver.onNext(value);
}
}

Line under review: if (numberOfMessagesBeforeReadyCheck >= maxMessagesBeforeCheck) {

Code after addressing the review:
public void onNext(T value) {
numberOfMessagesBeforeReadyCheck += 1;
if (numberOfMessagesBeforeReadyCheck >= maxMessagesBeforeCheck) {
numberOfMessagesBeforeReadyCheck = 0;
int waitTime = 1;
int totalTimeWaited = 0;
int phase = phaser.getPhase();
while (!outboundObserver.isReady()) {
try {
phaser.awaitAdvanceInterruptibly(phase, waitTime, TimeUnit.SECONDS);
} catch (TimeoutException e) {
totalTimeWaited += waitTime;
waitTime = waitTime * 2;
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
if (totalTimeWaited > 0) {
if (phase == phaser.getPhase()) {
LOGGER.info(
"Output channel stalled for {}s, outbound thread {}. See: "
+ "https:
+ "this issue.",
totalTimeWaited,
Thread.currentThread().getName());
} else {
LOGGER.debug(
"Output channel stalled for {}s, outbound thread {}.",
totalTimeWaited,
Thread.currentThread().getName());
}
}
}
synchronized (outboundObserver) {
outboundObserver.onNext(value);
}
}
Code review comment: Yeah sure +1 for suggestions. 

Code before review:
private static List<StatementNode> getStringArrayReturnStatements(JMethod jMethod) {
return List.of(
getExternalFunctionCallStatement(HANDLE, jMethod),
createReturnIfHandleIsNullStatement(jMethod.getEnv(), "externalObj"),
createReturnStatementNode(createTypeCastExpressionNode("string[]",
createCheckExpressionNode(createFunctionCallExpressionNode("jarrays:fromHandle",
new LinkedList<>(Arrays.asList("externalObj", "\"string\""))
)
)
))
);
}


Code after addressing the review:
private static List<StatementNode> getStringArrayReturnStatements(JMethod jMethod) {
return List.of(
getExternalFunctionCallStatement(HANDLE, jMethod),
createReturnIfHandleIsNullStatement(jMethod.getEnv(), "externalObj"),
createReturnStatementNode(createTypeCastExpressionNode("string[]",
createCheckExpressionNode(createFunctionCallExpressionNode("jarrays:fromHandle",
new LinkedList<>(Arrays.asList("externalObj", "\"string\""))
)
)
))
);
}
Code review comment: Why don't you use `Iterator` here? This feels "unnecessarily hacky"...

Code before review:
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(name);
if (bounds.size() > 0) {
sb.append(" extends ");
for (Type bound : bounds) {
if (bound instanceof Class) {
sb.append(((Class<?>) bound).getName());
} else {
sb.append(bound);
}
sb.append(" & ");
}
sb.delete(sb.length() - 3, sb.length());
}
return sb.toString();
}

Line under review: sb.delete(sb.length() - 3, sb.length());

Code after addressing the review:
public String toString() {
StringJoiner joiner = new StringJoiner(" & ", " extends ", "");
joiner.setEmptyValue("");
for (Type bound : bounds) {
if (bound instanceof Class) {
joiner.add(((Class<?>) bound).getName());
} else {
joiner.add(bound.toString());
}
}
return name + joiner;
}
Code review comment: During upgrade this will write a value with combined id that other instances that are not upgraded yet will not be able to read. Shouldn't we handle strings with combined id first and in a later version start writing it?

Code before review:
protected String toStringValue() {
return cluster.type().name() +
"/" + cluster.id().value() +
(cluster.group().isPresent() ? "/" + cluster.group().get().index() : "") +
"/" + index +
( cluster.isExclusive() ? "/exclusive" : "") +
( retired ? "/retired" : "") +
( cluster.combinedId().isPresent() ? "/" + cluster.combinedId().get().value() : "");
}

Line under review: ( cluster.combinedId().isPresent() ? "/" + cluster.combinedId().get().value() : "");

Code after addressing the review:
protected String toStringValue() {
return cluster.type().name() +
"/" + cluster.id().value() +
(cluster.group().isPresent() ? "/" + cluster.group().get().index() : "") +
"/" + index +
( cluster.isExclusive() ? "/exclusive" : "") +
( retired ? "/retired" : "") +
( cluster.combinedId().isPresent() ? "/" + cluster.combinedId().get().value() : "");
}
Code review comment: The most risky bug in this code is: Conversion and validation logic for `taskInterval` may assume `IntLiteral` while allowing broader `Expr` types in parsing.  You can modify the code like this: ```java if (desc.taskInterval() != null) {     var intervalLiteral = (IntervalLiteral) visit(desc.taskInterval());     // Ensure that the visited expression indeed results in an IntervalLiteral     if (!(intervalLiteral.getValue() instanceof IntLiteral)) {         String exprSql = intervalLiteral.getValue().toSql();         throw new ParsingException(PARSER_ERROR_MSG.unsupportedExprWithInfo(exprSql, "INTERVAL"),                     createPos(desc.taskInterval()));     }          long period = ((IntLiteral) intervalLiteral.getValue()).getLongValue();     // Other parts of the modified segment remain unchanged... } ``` Also, make sure that the method `visitTaskInterval(StarRocksParser.TaskIntervalContext context)` properly enforces or checks that the resulting `Expr` from `context.value` is of the expected type if required elsewhere in the application's logic. This would guard against cases where the input does not match expected formats leading to runtime errors or unexpected behavior.

Code before review:
public ParseNode visitUnitIdentifier(StarRocksParser.UnitIdentifierContext context) {
return new UnitIdentifier(context.getText(), createPos(context));
}

Line under review: return new UnitIdentifier(context.getText(), createPos(context));

Code after addressing the review:
public ParseNode visitUnitIdentifier(StarRocksParser.UnitIdentifierContext context) {
return new UnitIdentifier(context.getText(), createPos(context));
}
Code review comment: 1. done 2. now it have

Code before review:
private void runWithCleanUpOnFail(RunnableWithException run) throws Exception {
try {
run.run();
} catch (Throwable invokeException) {
failing = !canceled;
try {
if (!canceled) {
try {
cancelTask();
} catch (Throwable ex) {
invokeException = firstOrSuppressed(ex, invokeException);
}
}
cleanUpInvoke();
}
catch (Throwable cleanUpException) {
rethrowException(firstOrSuppressed(cleanUpException, invokeException));
}
rethrowException(invokeException);
}
}

Line under review: }

Code after addressing the review:
private void runWithCleanUpOnFail(RunnableWithException run) throws Exception {
try {
run.run();
} catch (Throwable invokeException) {
failing = !canceled;
try {
if (!canceled) {
try {
cancelTask();
} catch (Throwable ex) {
invokeException = firstOrSuppressed(ex, invokeException);
}
}
cleanUpInvoke();
}
catch (Throwable cleanUpException) {
rethrowException(firstOrSuppressed(cleanUpException, invokeException));
}
rethrowException(invokeException);
}
}
Code review comment: Any particular reason to swap the order of the two checks?

Code before review:
private static String getPackageAlias(SymbolEnv env, String compUnitName, PackageID typePkgId) {
for (BLangImportPackage importStmt : env.enclPkg.imports) {
if (!importStmt.compUnit.value.equals(compUnitName)) {
continue;
}
if (importStmt.symbol != null && typePkgId.equals(importStmt.symbol.pkgID)) {
return importStmt.alias.value;
}
}
return "";
}

Line under review: if (importStmt.symbol != null && typePkgId.equals(importStmt.symbol.pkgID)) {

Code after addressing the review:
private static String getPackageAlias(SymbolEnv env, String compUnitName, PackageID typePkgId) {
for (BLangImportPackage importStmt : env.enclPkg.imports) {
if (!importStmt.compUnit.value.equals(compUnitName)) {
continue;
}
if (importStmt.symbol != null && typePkgId.equals(importStmt.symbol.pkgID)) {
return importStmt.alias.value;
}
}
return "";
}
Code review comment: Ok. Tested on a project with the jar and the native image does not make the difference, I suppose because we do the initialization immediately after loading the class. 

Code before review:
private List<CommandListener> getCommandListeners(List<String> classNames) {
List<CommandListener> listeners = new ArrayList<>();
for (String name : classNames) {
try {
Class<?> clazz = Thread.currentThread().getContextClassLoader().loadClass(name);
Constructor clazzConstructor = clazz.getConstructor();
listeners.add((CommandListener) clazzConstructor.newInstance());
} catch (Exception e) {
LOGGER.warnf(e, "Unable to load the command listener class %s", name);
}
}
return listeners;
}

Line under review: }

Code after addressing the review:
private List<CommandListener> getCommandListeners(List<String> classNames) {
List<CommandListener> listeners = new ArrayList<>();
for (String name : classNames) {
try {
Class<?> clazz = Class.forName(name, true, Thread.currentThread().getContextClassLoader());
Constructor<?> clazzConstructor = clazz.getConstructor();
listeners.add((CommandListener) clazzConstructor.newInstance());
} catch (Exception e) {
LOGGER.warnf(e, "Unable to load the command listener class %s", name);
}
}
return listeners;
}
Code review comment: Moved to a class variable and assigned in constructor with 5aa13c7

Code before review:
private void run() {
while (true) {
SchedulerItem item;
ItemGroup group;
try {
group = runnableList.take();
} catch (InterruptedException ignored) {
continue;
}
if (group == POISON_PILL) {
this.mainBlockSem.release();
break;
}
while (!group.items.empty()) {
Object result = null;
Throwable panic = null;
item = group.get();
Strand previousStrand = numThreads == 1 ?  strandHolder.get().strand : null;
try {
strandHolder.get().strand = item.future.strand;
result = item.execute();
} catch (Throwable e) {
panic = createError(e);
notifyChannels(item, panic);
if (!(panic instanceof BError)) {
RuntimeUtils.printCrashLog(panic);
}
if (item.isYielded()) {
RuntimeUtils.printCrashLog(panic);
}
} finally {
strandHolder.get().strand = previousStrand;
}
postProcess(item, result, panic);
if (group.items.empty()) {
group.scheduled.set(false);
}
}
}
}

Line under review: Strand previousStrand = numThreads == 1 ?  strandHolder.get().strand : null;

Code after addressing the review:
private void run() {
while (true) {
SchedulerItem item;
ItemGroup group;
try {
group = runnableList.take();
} catch (InterruptedException ignored) {
continue;
}
if (group == POISON_PILL) {
this.mainBlockSem.release();
break;
}
while (!group.items.empty()) {
Object result = null;
Throwable panic = null;
item = group.get();
try {
strandHolder.get().strand = item.future.strand;
result = item.execute();
} catch (Throwable e) {
panic = createError(e);
notifyChannels(item, panic);
if (!(panic instanceof BError)) {
RuntimeUtils.printCrashLog(panic);
}
if (item.isYielded()) {
RuntimeUtils.printCrashLog(panic);
}
} finally {
strandHolder.get().strand = previousStrand;
}
postProcess(item, result, panic);
if (group.items.empty()) {
group.scheduled.set(false);
}
}
}
}
Code review comment: When partition is specified, the if {} block assembles a JdbcIO.ReadWithPartitions; otherwise  else {} block assembles a JdbcIO.readRows when partition is not specified (current behavior).

Code before review:
public PCollection<Row> expand(PBegin input) {
@Nullable
String partitionColumn =
config.getSchema().hasField("partitionColumn")
? config.getString("partitionColumn")
: null;
if (partitionColumn != null) {
JdbcIO.ReadWithPartitions<Row, ?> readRows =
JdbcIO.<Row>readWithPartitions()
.withDataSourceConfiguration(getDataSourceConfiguration())
.withTable(location)
.withPartitionColumn(partitionColumn)
.withRowOutput();
@Nullable Short partitions = config.getInt16("partitions");
if (partitions != null) {
readRows = readRows.withNumPartitions(partitions);
}
return input.apply(readRows);
} else {
@Nullable String readQuery = config.getString("readQuery");
if (readQuery == null) {
readQuery = String.format("SELECT * FROM %s", location);
}
JdbcIO.ReadRows readRows =
JdbcIO.readRows()
.withDataSourceConfiguration(getDataSourceConfiguration())
.withQuery(readQuery);
@Nullable Short fetchSize = config.getInt16("fetchSize");
if (fetchSize != null) {
readRows = readRows.withFetchSize(fetchSize);
}
@Nullable Boolean outputParallelization = config.getBoolean("outputParallelization");
if (outputParallelization != null) {
readRows = readRows.withOutputParallelization(outputParallelization);
}
return input.apply(readRows);
}
}

Line under review: } else {

Code after addressing the review:
public PCollection<Row> expand(PBegin input) {
@Nullable
String partitionColumn =
config.getSchema().hasField("partitionColumn")
? config.getString("partitionColumn")
: null;
if (partitionColumn != null) {
JdbcIO.ReadWithPartitions<Row, ?> readRows =
JdbcIO.<Row>readWithPartitions()
.withDataSourceConfiguration(getDataSourceConfiguration())
.withTable(location)
.withPartitionColumn(partitionColumn)
.withRowOutput();
@Nullable Short partitions = config.getInt16("partitions");
if (partitions != null) {
readRows = readRows.withNumPartitions(partitions);
}
return input.apply(readRows);
} else {
@Nullable String readQuery = config.getString("readQuery");
if (readQuery == null) {
readQuery = String.format("SELECT * FROM %s", location);
}
JdbcIO.ReadRows readRows =
JdbcIO.readRows()
.withDataSourceConfiguration(getDataSourceConfiguration())
.withQuery(readQuery);
@Nullable Short fetchSize = config.getInt16("fetchSize");
if (fetchSize != null) {
readRows = readRows.withFetchSize(fetchSize);
}
@Nullable Boolean outputParallelization = config.getBoolean("outputParallelization");
if (outputParallelization != null) {
readRows = readRows.withOutputParallelization(outputParallelization);
}
return input.apply(readRows);
}
}
Code review comment: The `HybridJacksonPool` will be available if there is the vertx-core capability, which is the thing that I'm testing here https://github.com/quarkusio/quarkus/pull/38196/files#diff-6565aad037315afaf46e89a1d2d5255711b128a5ea228721b9e1b0e340b706a6R114

Code before review:
public void customize(ObjectMapper objectMapper) {
objectMapper.getFactory().setRecyclerPool(HybridJacksonPool.getInstance());
}

Line under review: objectMapper.getFactory().setRecyclerPool(HybridJacksonPool.getInstance());

Code after addressing the review:
public void customize(ObjectMapper objectMapper) {
if (objectMapper.getFactory()._getRecyclerPool() == JsonRecyclerPools.defaultPool()) {
objectMapper.getFactory().setRecyclerPool(HybridJacksonPool.getInstance());
}
}