diff --git a/modules/apm/src/main/java/org/elasticsearch/telemetry/apm/AbstractInstrument.java b/modules/apm/src/main/java/org/elasticsearch/telemetry/apm/AbstractInstrument.java index 01f65eb60aa74..61b53f2087f6e 100644 --- a/modules/apm/src/main/java/org/elasticsearch/telemetry/apm/AbstractInstrument.java +++ b/modules/apm/src/main/java/org/elasticsearch/telemetry/apm/AbstractInstrument.java @@ -30,6 +30,7 @@ public abstract class AbstractInstrument implements Instrument { private final String description; private final String unit; + @SuppressWarnings("this-escape") public AbstractInstrument(Meter meter, String name, String description, String unit) { this.name = Objects.requireNonNull(name); this.description = Objects.requireNonNull(description); diff --git a/modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceIT.java b/modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceIT.java index e3128fd1b904b..e4f4f88254977 100644 --- a/modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceIT.java +++ b/modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceIT.java @@ -27,6 +27,7 @@ import org.elasticsearch.action.datastreams.CreateDataStreamAction; import org.elasticsearch.action.datastreams.GetDataStreamAction; import org.elasticsearch.action.datastreams.ModifyDataStreamsAction; +import org.elasticsearch.action.datastreams.lifecycle.ErrorEntry; import org.elasticsearch.action.datastreams.lifecycle.ExplainIndexDataStreamLifecycle; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.cluster.metadata.ComposableIndexTemplate; @@ -405,7 +406,7 @@ public void testErrorRecordingOnRollover() throws Exception { assertBusy(() -> { String writeIndexName = getBackingIndices(dataStreamName).get(1); - String writeIndexRolloverError = null; + ErrorEntry writeIndexRolloverError = null; Iterable lifecycleServices = internalCluster().getInstances(DataStreamLifecycleService.class); for (DataStreamLifecycleService lifecycleService : lifecycleServices) { @@ -416,7 +417,7 @@ public void testErrorRecordingOnRollover() throws Exception { } assertThat(writeIndexRolloverError, is(notNullValue())); - assertThat(writeIndexRolloverError, containsString("maximum normal shards open")); + assertThat(writeIndexRolloverError.error(), containsString("maximum normal shards open")); }); // let's reset the cluster max shards per node limit to allow rollover to proceed and check the error store is empty @@ -497,7 +498,7 @@ public void testErrorRecordingOnRetention() throws Exception { String writeIndex = backingIndices.get(1).getName(); assertThat(writeIndex, backingIndexEqualTo(dataStreamName, 2)); - String recordedRetentionExecutionError = null; + ErrorEntry recordedRetentionExecutionError = null; Iterable lifecycleServices = internalCluster().getInstances(DataStreamLifecycleService.class); for (DataStreamLifecycleService lifecycleService : lifecycleServices) { @@ -508,7 +509,7 @@ public void testErrorRecordingOnRetention() throws Exception { } assertThat(recordedRetentionExecutionError, is(notNullValue())); - assertThat(recordedRetentionExecutionError, containsString("blocked by: [FORBIDDEN/5/index read-only (api)")); + assertThat(recordedRetentionExecutionError.error(), containsString("blocked by: [FORBIDDEN/5/index read-only (api)")); }); // let's mark the index as writeable and make sure it's deleted and the error store is empty diff --git a/modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/ExplainDataStreamLifecycleIT.java b/modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/ExplainDataStreamLifecycleIT.java index b3156849c148a..6ff50d88aeb05 100644 --- a/modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/ExplainDataStreamLifecycleIT.java +++ b/modules/data-streams/src/internalClusterTest/java/org/elasticsearch/datastreams/lifecycle/ExplainDataStreamLifecycleIT.java @@ -49,6 +49,7 @@ import static org.elasticsearch.indices.ShardLimitValidator.SETTING_CLUSTER_MAX_SHARDS_PER_NODE; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; @@ -252,7 +253,9 @@ public void testExplainLifecycleForIndicesWithErrors() throws Exception { // index has not been rolled over yet assertThat(explainIndex.getGenerationTime(System::currentTimeMillis), nullValue()); - assertThat(explainIndex.getError(), containsString("maximum normal shards open")); + assertThat(explainIndex.getError(), notNullValue()); + assertThat(explainIndex.getError().error(), containsString("maximum normal shards open")); + assertThat(explainIndex.getError().retryCount(), greaterThanOrEqualTo(1)); } }); diff --git a/modules/data-streams/src/main/java/org/elasticsearch/datastreams/DataStreamsPlugin.java b/modules/data-streams/src/main/java/org/elasticsearch/datastreams/DataStreamsPlugin.java index a845b75450366..2cf44dc0e3218 100644 --- a/modules/data-streams/src/main/java/org/elasticsearch/datastreams/DataStreamsPlugin.java +++ b/modules/data-streams/src/main/java/org/elasticsearch/datastreams/DataStreamsPlugin.java @@ -141,6 +141,7 @@ public List> getSettings() { pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_LIFECYCLE_POLL_INTERVAL_SETTING); pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_MERGE_POLICY_TARGET_FLOOR_SEGMENT_SETTING); pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_MERGE_POLICY_TARGET_FACTOR_SETTING); + pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING); return pluginSettings; } @@ -155,7 +156,7 @@ public Collection createComponents(PluginServices services) { ); this.updateTimeSeriesRangeService.set(updateTimeSeriesRangeService); components.add(this.updateTimeSeriesRangeService.get()); - errorStoreInitialisationService.set(new DataStreamLifecycleErrorStore()); + errorStoreInitialisationService.set(new DataStreamLifecycleErrorStore(services.threadPool()::absoluteTimeInMillis)); dataLifecycleInitialisationService.set( new DataStreamLifecycleService( settings, diff --git a/modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStore.java b/modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStore.java index c0b517fa2ca9c..47589fd7276f4 100644 --- a/modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStore.java +++ b/modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStore.java @@ -9,12 +9,14 @@ package org.elasticsearch.datastreams.lifecycle; import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.action.datastreams.lifecycle.ErrorEntry; import org.elasticsearch.common.Strings; import org.elasticsearch.core.Nullable; import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import java.util.function.LongSupplier; import static org.elasticsearch.xcontent.ToXContent.EMPTY_PARAMS; @@ -26,7 +28,12 @@ public class DataStreamLifecycleErrorStore { public static final int MAX_ERROR_MESSAGE_LENGTH = 1000; - private final ConcurrentMap indexNameToError = new ConcurrentHashMap<>(); + private final ConcurrentMap indexNameToError = new ConcurrentHashMap<>(); + private final LongSupplier nowSupplier; + + public DataStreamLifecycleErrorStore(LongSupplier nowSupplier) { + this.nowSupplier = nowSupplier; + } /** * Records a string representation of the provided exception for the provided index. @@ -35,13 +42,24 @@ public class DataStreamLifecycleErrorStore { * Returns the previously recorded error for the provided index, or null otherwise. */ @Nullable - public String recordError(String indexName, Exception e) { + public ErrorEntry recordError(String indexName, Exception e) { String exceptionToString = Strings.toString((builder, params) -> { ElasticsearchException.generateThrowableXContent(builder, EMPTY_PARAMS, e); return builder; }); - String recordedError = Strings.substring(exceptionToString, 0, MAX_ERROR_MESSAGE_LENGTH); - return indexNameToError.put(indexName, recordedError); + String newError = Strings.substring(exceptionToString, 0, MAX_ERROR_MESSAGE_LENGTH); + ErrorEntry existingError = indexNameToError.get(indexName); + long recordedTimestamp = nowSupplier.getAsLong(); + if (existingError == null) { + indexNameToError.put(indexName, new ErrorEntry(recordedTimestamp, newError, recordedTimestamp, 0)); + } else { + if (existingError.error().equals(newError)) { + indexNameToError.put(indexName, ErrorEntry.incrementRetryCount(existingError, nowSupplier)); + } else { + indexNameToError.put(indexName, new ErrorEntry(recordedTimestamp, newError, recordedTimestamp, 0)); + } + } + return existingError; } /** @@ -62,7 +80,7 @@ public void clearStore() { * Retrieves the recorded error for the provided index. */ @Nullable - public String getError(String indexName) { + public ErrorEntry getError(String indexName) { return indexNameToError.get(indexName); } diff --git a/modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleService.java b/modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleService.java index 5d2d95a3dc954..03d1340c14dbb 100644 --- a/modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleService.java +++ b/modules/data-streams/src/main/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleService.java @@ -29,6 +29,7 @@ import org.elasticsearch.action.admin.indices.rollover.RolloverResponse; import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsAction; import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest; +import org.elasticsearch.action.datastreams.lifecycle.ErrorEntry; import org.elasticsearch.action.downsample.DownsampleAction; import org.elasticsearch.action.downsample.DownsampleConfig; import org.elasticsearch.action.support.DefaultShardOperationFailedException; @@ -127,6 +128,19 @@ public class DataStreamLifecycleService implements ClusterStateListener, Closeab Setting.Property.Dynamic, Setting.Property.NodeScope ); + /** + * This setting controls how often we signal that an index is in the error state when it comes to its data stream lifecycle + * progression. + * The signalling is currently logging at the `error` level but in the future it can signify other types of signalling. + */ + public static final Setting DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING = Setting.intSetting( + "data_streams.lifecycle.signalling.error_retry_interval", + 10, + 1, + Setting.Property.Dynamic, + Setting.Property.NodeScope + ); + public static final String DOWNSAMPLED_INDEX_PREFIX = "downsample-"; private static final Logger logger = LogManager.getLogger(DataStreamLifecycleService.class); @@ -156,6 +170,10 @@ public class DataStreamLifecycleService implements ClusterStateListener, Closeab private final MasterServiceTaskQueue swapSourceWithDownsampleIndexQueue; private volatile ByteSizeValue targetMergePolicyFloorSegment; private volatile int targetMergePolicyFactor; + /** + * The number of retries for a particular index and error after which DSL will emmit a signal (e.g. log statement) + */ + private volatile int signallingErrorRetryInterval; private static final SimpleBatchedExecutor FORCE_MERGE_STATE_UPDATE_TASK_EXECUTOR = new SimpleBatchedExecutor<>() { @@ -194,6 +212,7 @@ public DataStreamLifecycleService( this.pollInterval = DATA_STREAM_LIFECYCLE_POLL_INTERVAL_SETTING.get(settings); this.targetMergePolicyFloorSegment = DATA_STREAM_MERGE_POLICY_TARGET_FLOOR_SEGMENT_SETTING.get(settings); this.targetMergePolicyFactor = DATA_STREAM_MERGE_POLICY_TARGET_FACTOR_SETTING.get(settings); + this.signallingErrorRetryInterval = DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING.get(settings); this.rolloverConfiguration = clusterService.getClusterSettings() .get(DataStreamLifecycle.CLUSTER_LIFECYCLE_DEFAULT_ROLLOVER_SETTING); this.forceMergeClusterStateUpdateTaskQueue = clusterService.createTaskQueue( @@ -221,6 +240,8 @@ public void init() { .addSettingsUpdateConsumer(DATA_STREAM_MERGE_POLICY_TARGET_FACTOR_SETTING, this::updateMergePolicyFactor); clusterService.getClusterSettings() .addSettingsUpdateConsumer(DATA_STREAM_MERGE_POLICY_TARGET_FLOOR_SEGMENT_SETTING, this::updateMergePolicyFloorSegment); + clusterService.getClusterSettings() + .addSettingsUpdateConsumer(DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING, this::updateSignallingRetryThreshold); } @Override @@ -526,7 +547,8 @@ private void downsampleIndexOnce(DataStreamLifecycle.Downsampling.Round round, S "Data stream lifecycle encountered an error trying to downsample index [%s]. Data stream lifecycle will " + "attempt to downsample the index on its next run.", sourceIndex - ) + ), + signallingErrorRetryInterval ), (req, reqListener) -> downsampleIndex(request, reqListener) ); @@ -553,20 +575,22 @@ private Set evaluateDownsampleStatus( if (currentRound.equals(lastRound)) { // target downsampling index exists and is not a downsampling index (name clash?) // we fail now but perhaps we should just randomise the name? - String previousError = errorStore.getError(indexName); - - errorStore.recordError(indexName, new ResourceAlreadyExistsException(downsampleIndexName)); - // To avoid spamming our logs, we only want to log the error once. - if (previousError == null || previousError.equals(errorStore.getError(indexName)) == false) { - logger.error( - "Data stream lifecycle service is unable to downsample backing index [{}] for data stream [{}] and " - + "donwsampling round [{}] because the target downsample index [{}] already exists", + + recordAndLogError( + indexName, + errorStore, + new ResourceAlreadyExistsException(downsampleIndexName), + String.format( + Locale.ROOT, + "Data stream lifecycle service is unable to downsample backing index [%s] for data " + + "stream [%s] and donwsampling round [%s] because the target downsample index [%s] already exists", indexName, dataStream.getName(), currentRound, downsampleIndexName - ); - } + ), + signallingErrorRetryInterval + ); } yield affectedIndices; } @@ -625,7 +649,8 @@ private void replaceBackingIndexWithDownsampleIndexOnce(DataStream dataStream, S backingIndexName, downsampleIndexName, dataStream - ) + ), + signallingErrorRetryInterval ), (req, reqListener) -> { logger.trace( @@ -660,7 +685,8 @@ private void deleteIndexOnce(String indexName, String reason) { DeleteIndexAction.NAME, indexName, errorStore, - Strings.format("Data stream lifecycle encountered an error trying to delete index [%s]", indexName) + Strings.format("Data stream lifecycle encountered an error trying to delete index [%s]", indexName), + signallingErrorRetryInterval ), (req, reqListener) -> deleteIndex(deleteIndexRequest, reason, reqListener) ); @@ -677,7 +703,8 @@ private void addIndexBlockOnce(String indexName) { AddIndexBlockAction.NAME, indexName, errorStore, - Strings.format("Data stream lifecycle service encountered an error trying to mark index [%s] as readonly", indexName) + Strings.format("Data stream lifecycle service encountered an error trying to mark index [%s] as readonly", indexName), + signallingErrorRetryInterval ), (req, reqListener) -> addIndexBlock(addIndexBlockRequest, reqListener) ); @@ -740,7 +767,8 @@ private void maybeExecuteRollover(ClusterState state, DataStream dataStream) { RolloverAction.NAME, writeIndex.getName(), errorStore, - Strings.format("Data stream lifecycle encountered an error trying to rollover data steam [%s]", dataStream.getName()) + Strings.format("Data stream lifecycle encountered an error trying to rollover data steam [%s]", dataStream.getName()), + signallingErrorRetryInterval ), (req, reqListener) -> rolloverDataStream(writeIndex.getName(), rolloverRequest, reqListener) ); @@ -837,7 +865,8 @@ private Set maybeExecuteForceMerge(ClusterState state, List indice "Data stream lifecycle encountered an error trying to to update settings [%s] for index [%s]", updateMergePolicySettingsRequest.settings().keySet(), indexName - ) + ), + signallingErrorRetryInterval ), (req, reqListener) -> updateIndexSetting(updateMergePolicySettingsRequest, reqListener) ); @@ -855,7 +884,8 @@ private Set maybeExecuteForceMerge(ClusterState state, List indice "Data stream lifecycle encountered an error trying to force merge index [%s]. Data stream lifecycle will " + "attempt to force merge the index on its next run.", indexName - ) + ), + signallingErrorRetryInterval ), (req, reqListener) -> forceMergeIndex(forceMergeRequest, reqListener) ); @@ -1174,17 +1204,20 @@ static class ErrorRecordingActionListener implements ActionListener { private final String targetIndex; private final DataStreamLifecycleErrorStore errorStore; private final String errorLogMessage; + private final int signallingErrorRetryThreshold; ErrorRecordingActionListener( String actionName, String targetIndex, DataStreamLifecycleErrorStore errorStore, - String errorLogMessage + String errorLogMessage, + int signallingErrorRetryThreshold ) { this.actionName = actionName; this.targetIndex = targetIndex; this.errorStore = errorStore; this.errorLogMessage = errorLogMessage; + this.signallingErrorRetryThreshold = signallingErrorRetryThreshold; } @Override @@ -1195,21 +1228,64 @@ public void onResponse(Void unused) { @Override public void onFailure(Exception e) { - recordAndLogError(targetIndex, errorStore, e, errorLogMessage); + recordAndLogError(targetIndex, errorStore, e, errorLogMessage, signallingErrorRetryThreshold); } } /** * Records the provided error for the index in the error store and logs the error message at `ERROR` level if the error for the index - * is different to what's already in the error store. - * This allows us to not spam the logs and only log new errors when we're about to record them in the store. + * is different to what's already in the error store or if the same error was in the error store for a number of retries divible by + * the provided signallingErrorRetryThreshold (i.e. we log to level `error` every signallingErrorRetryThreshold retries, if the error + * stays the same) + * This allows us to not spam the logs, but signal to the logs if DSL is not making progress. */ - static void recordAndLogError(String targetIndex, DataStreamLifecycleErrorStore errorStore, Exception e, String logMessage) { - String previousError = errorStore.recordError(targetIndex, e); - if (previousError == null || previousError.equals(errorStore.getError(targetIndex)) == false) { + static void recordAndLogError( + String targetIndex, + DataStreamLifecycleErrorStore errorStore, + Exception e, + String logMessage, + int signallingErrorRetryThreshold + ) { + ErrorEntry previousError = errorStore.recordError(targetIndex, e); + ErrorEntry currentError = errorStore.getError(targetIndex); + if (previousError == null || (currentError != null && previousError.error().equals(currentError.error()) == false)) { logger.error(logMessage, e); } else { - logger.trace(logMessage, e); + if (currentError != null) { + if (currentError.retryCount() % signallingErrorRetryThreshold == 0) { + logger.error( + String.format( + Locale.ROOT, + "%s\nFailing since [%d], operation retried [%d] times", + logMessage, + currentError.firstOccurrenceTimestamp(), + currentError.retryCount() + ), + e + ); + } else { + logger.trace( + String.format( + Locale.ROOT, + "%s\nFailing since [%d], operation retried [%d] times", + logMessage, + currentError.firstOccurrenceTimestamp(), + currentError.retryCount() + ), + e + ); + } + } else { + logger.trace( + String.format( + Locale.ROOT, + "Index [%s] encountered error [%s] but there's no record in the error store anymore", + targetIndex, + logMessage + ), + e + ); + } } } @@ -1240,6 +1316,10 @@ private void updateMergePolicyFactor(int newFactor) { this.targetMergePolicyFactor = newFactor; } + public void updateSignallingRetryThreshold(int retryThreshold) { + this.signallingErrorRetryInterval = retryThreshold; + } + private void cancelJob() { if (scheduler.get() != null) { scheduler.get().remove(LIFECYCLE_JOB_NAME); diff --git a/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStoreTests.java b/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStoreTests.java index ace52cd4c3f8b..c1255cc9e3a72 100644 --- a/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStoreTests.java +++ b/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleErrorStoreTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.datastreams.lifecycle; +import org.elasticsearch.action.datastreams.lifecycle.ErrorEntry; import org.elasticsearch.test.ESTestCase; import org.junit.Before; @@ -27,11 +28,11 @@ public class DataStreamLifecycleErrorStoreTests extends ESTestCase { @Before public void setupServices() { - errorStore = new DataStreamLifecycleErrorStore(); + errorStore = new DataStreamLifecycleErrorStore(System::currentTimeMillis); } public void testRecordAndRetrieveError() { - String existingRecordedError = errorStore.recordError("test", new NullPointerException("testing")); + ErrorEntry existingRecordedError = errorStore.recordError("test", new NullPointerException("testing")); assertThat(existingRecordedError, is(nullValue())); assertThat(errorStore.getError("test"), is(notNullValue())); assertThat(errorStore.getAllIndices().size(), is(1)); @@ -39,7 +40,7 @@ public void testRecordAndRetrieveError() { existingRecordedError = errorStore.recordError("test", new IllegalStateException("bad state")); assertThat(existingRecordedError, is(notNullValue())); - assertThat(existingRecordedError, containsString("testing")); + assertThat(existingRecordedError.error(), containsString("testing")); } public void testRetrieveAfterClear() { @@ -80,6 +81,6 @@ public void testRecordedErrorIsMaxOneThousandChars() { NullPointerException exceptionWithLongMessage = new NullPointerException(randomAlphaOfLength(2000)); errorStore.recordError("test", exceptionWithLongMessage); assertThat(errorStore.getError("test"), is(notNullValue())); - assertThat(errorStore.getError("test").length(), is(MAX_ERROR_MESSAGE_LENGTH)); + assertThat(errorStore.getError("test").error().length(), is(MAX_ERROR_MESSAGE_LENGTH)); } } diff --git a/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceTests.java b/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceTests.java index fd9664dd94493..bd6100c95b412 100644 --- a/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceTests.java +++ b/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/DataStreamLifecycleServiceTests.java @@ -23,6 +23,7 @@ import org.elasticsearch.action.admin.indices.rollover.RolloverInfo; import org.elasticsearch.action.admin.indices.rollover.RolloverRequest; import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest; +import org.elasticsearch.action.datastreams.lifecycle.ErrorEntry; import org.elasticsearch.action.downsample.DownsampleAction; import org.elasticsearch.action.downsample.DownsampleConfig; import org.elasticsearch.action.support.DefaultShardOperationFailedException; @@ -103,6 +104,7 @@ import static org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleFixtures.createDataStream; import static org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleService.DATA_STREAM_MERGE_POLICY_TARGET_FACTOR_SETTING; import static org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleService.DATA_STREAM_MERGE_POLICY_TARGET_FLOOR_SEGMENT_SETTING; +import static org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleService.DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING; import static org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleService.DOWNSAMPLED_INDEX_PREFIX; import static org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleService.FORCE_MERGE_COMPLETED_TIMESTAMP_METADATA_KEY; import static org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleService.ONE_HUNDRED_MB; @@ -135,6 +137,7 @@ public void setupServices() { builtInClusterSettings.add(DataStreamLifecycleService.DATA_STREAM_LIFECYCLE_POLL_INTERVAL_SETTING); builtInClusterSettings.add(DATA_STREAM_MERGE_POLICY_TARGET_FLOOR_SEGMENT_SETTING); builtInClusterSettings.add(DATA_STREAM_MERGE_POLICY_TARGET_FACTOR_SETTING); + builtInClusterSettings.add(DATA_STREAM_SIGNALLING_ERROR_RETRY_INTERVAL_SETTING); ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, builtInClusterSettings); clusterService = createClusterService(threadPool, clusterSettings); @@ -162,7 +165,7 @@ public void setupServices() { clock, threadPool, () -> now, - new DataStreamLifecycleErrorStore(), + new DataStreamLifecycleErrorStore(() -> now), allocationService ); clientDelegate = null; @@ -1307,9 +1310,9 @@ public void testDownsamplingWhenTargetIndexNameClashYieldsException() throws Exc dataStreamLifecycleService.maybeExecuteDownsampling(clusterService.state(), dataStream, List.of(firstGenIndex)); assertThat(clientSeenRequests.size(), is(0)); - String error = dataStreamLifecycleService.getErrorStore().getError(firstGenIndexName); + ErrorEntry error = dataStreamLifecycleService.getErrorStore().getError(firstGenIndexName); assertThat(error, notNullValue()); - assertThat(error, containsString("resource_already_exists_exception")); + assertThat(error.error(), containsString("resource_already_exists_exception")); } public void testTimeSeriesIndicesStillWithinTimeBounds() { diff --git a/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/action/ExplainDataStreamLifecycleResponseTests.java b/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/action/ExplainDataStreamLifecycleResponseTests.java index 3d9ec173e7116..0c10e3964e168 100644 --- a/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/action/ExplainDataStreamLifecycleResponseTests.java +++ b/modules/data-streams/src/test/java/org/elasticsearch/datastreams/lifecycle/action/ExplainDataStreamLifecycleResponseTests.java @@ -12,6 +12,7 @@ import org.elasticsearch.action.admin.indices.rollover.MinPrimaryShardDocsCondition; import org.elasticsearch.action.admin.indices.rollover.RolloverConditions; import org.elasticsearch.action.admin.indices.rollover.RolloverConfiguration; +import org.elasticsearch.action.datastreams.lifecycle.ErrorEntry; import org.elasticsearch.action.datastreams.lifecycle.ExplainIndexDataStreamLifecycle; import org.elasticsearch.cluster.metadata.DataStreamLifecycle; import org.elasticsearch.common.bytes.BytesReference; @@ -103,7 +104,21 @@ public void testToXContent() throws IOException { assertThat(explainIndexMap.get("generation_time"), is(nullValue())); } assertThat(explainIndexMap.get("lifecycle"), is(Map.of("enabled", true))); // empty lifecycle - assertThat(explainIndexMap.get("error"), is(explainIndex.getError())); + if (explainIndex.getError() != null) { + Map errorObject = (Map) explainIndexMap.get("error"); + assertThat(errorObject.get(ErrorEntry.MESSAGE_FIELD.getPreferredName()), is(explainIndex.getError().error())); + assertThat( + errorObject.get(ErrorEntry.FIRST_OCCURRENCE_MILLIS_FIELD.getPreferredName()), + is(explainIndex.getError().firstOccurrenceTimestamp()) + ); + assertThat( + errorObject.get(ErrorEntry.LAST_RECORDED_MILLIS_FIELD.getPreferredName()), + is(explainIndex.getError().recordedTimestamp()) + ); + assertThat(errorObject.get(ErrorEntry.RETRY_COUNT_FIELD.getPreferredName()), is(explainIndex.getError().retryCount())); + } else { + assertThat(explainIndexMap.get("error"), is(nullValue())); + } } } @@ -155,7 +170,21 @@ public void testToXContent() throws IOException { } else { assertThat(explainIndexMap.get("generation_time"), is(nullValue())); } - assertThat(explainIndexMap.get("error"), is(explainIndex.getError())); + if (explainIndex.getError() != null) { + Map errorObject = (Map) explainIndexMap.get("error"); + assertThat(errorObject.get(ErrorEntry.MESSAGE_FIELD.getPreferredName()), is(explainIndex.getError().error())); + assertThat( + errorObject.get(ErrorEntry.FIRST_OCCURRENCE_MILLIS_FIELD.getPreferredName()), + is(explainIndex.getError().firstOccurrenceTimestamp()) + ); + assertThat( + errorObject.get(ErrorEntry.LAST_RECORDED_MILLIS_FIELD.getPreferredName()), + is(explainIndex.getError().recordedTimestamp()) + ); + assertThat(errorObject.get(ErrorEntry.RETRY_COUNT_FIELD.getPreferredName()), is(explainIndex.getError().retryCount())); + } else { + assertThat(explainIndexMap.get("error"), is(nullValue())); + } Map lifecycleRollover = (Map) ((Map) explainIndexMap.get("lifecycle")).get( "rollover" @@ -173,7 +202,14 @@ public void testToXContent() throws IOException { randomBoolean() ? now + TimeValue.timeValueDays(1).getMillis() : null, null, lifecycle, - randomBoolean() ? new NullPointerException("bad times").getMessage() : null + randomBoolean() + ? new ErrorEntry( + System.currentTimeMillis(), + new NullPointerException("bad times").getMessage(), + System.currentTimeMillis(), + randomIntBetween(0, 30) + ) + : null ); Response response = new Response(List.of(explainIndexWithNullGenerationDate), null); @@ -223,7 +259,14 @@ private static ExplainIndexDataStreamLifecycle createRandomIndexDataStreamLifecy randomBoolean() ? now + TimeValue.timeValueDays(1).getMillis() : null, randomBoolean() ? TimeValue.timeValueMillis(now) : null, lifecycle, - randomBoolean() ? new NullPointerException("bad times").getMessage() : null + randomBoolean() + ? new ErrorEntry( + System.currentTimeMillis(), + new NullPointerException("bad times").getMessage(), + System.currentTimeMillis(), + randomIntBetween(0, 30) + ) + : null ); } diff --git a/modules/data-streams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/lifecycle/10_explain_lifecycle.yml b/modules/data-streams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/lifecycle/10_explain_lifecycle.yml index 51f2980671add..b52c860a812ee 100644 --- a/modules/data-streams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/lifecycle/10_explain_lifecycle.yml +++ b/modules/data-streams/src/yamlRestTest/resources/rest-api-spec/test/data_stream/lifecycle/10_explain_lifecycle.yml @@ -2,7 +2,7 @@ "Explain backing index lifecycle": - skip: version: " - 8.10.99" - reason: "Data stream lifecycle was GA in 8.11" + reason: "Data stream lifecycle was released as tech preview in 8.11" features: allowed_warnings - do: allowed_warnings: diff --git a/server/src/main/java/org/elasticsearch/TransportVersions.java b/server/src/main/java/org/elasticsearch/TransportVersions.java index cec485c726148..d09be93772e78 100644 --- a/server/src/main/java/org/elasticsearch/TransportVersions.java +++ b/server/src/main/java/org/elasticsearch/TransportVersions.java @@ -155,7 +155,8 @@ static TransportVersion def(int id) { public static final TransportVersion IP_ADDRESS_WRITEABLE = def(8_524_00_0); public static final TransportVersion PRIMARY_TERM_ADDED = def(8_525_00_0); public static final TransportVersion CLUSTER_FEATURES_ADDED = def(8_526_00_0); - public static final TransportVersion INVALID_BUCKET_PATH_EXCEPTION_INTRODUCED = def(8_527_00_0); + public static final TransportVersion DSL_ERROR_STORE_INFORMATION_ENHANCED = def(8_527_00_0); + public static final TransportVersion INVALID_BUCKET_PATH_EXCEPTION_INTRODUCED = def(8_528_00_0); /* * STOP! READ THIS FIRST! No, really, diff --git a/server/src/main/java/org/elasticsearch/action/datastreams/lifecycle/ErrorEntry.java b/server/src/main/java/org/elasticsearch/action/datastreams/lifecycle/ErrorEntry.java new file mode 100644 index 0000000000000..79c59314d7425 --- /dev/null +++ b/server/src/main/java/org/elasticsearch/action/datastreams/lifecycle/ErrorEntry.java @@ -0,0 +1,80 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +package org.elasticsearch.action.datastreams.lifecycle; + +import org.elasticsearch.common.io.stream.StreamInput; +import org.elasticsearch.common.io.stream.StreamOutput; +import org.elasticsearch.common.io.stream.Writeable; +import org.elasticsearch.core.TimeValue; +import org.elasticsearch.xcontent.ParseField; +import org.elasticsearch.xcontent.ToXContentObject; +import org.elasticsearch.xcontent.XContentBuilder; + +import java.io.IOException; +import java.util.function.LongSupplier; + +/** + * Represents the recorded error for an index that Data Stream Lifecycle Service encountered. + */ +public record ErrorEntry(long firstOccurrenceTimestamp, String error, long recordedTimestamp, int retryCount) + implements + Writeable, + ToXContentObject { + + public ErrorEntry(StreamInput in) throws IOException { + this(in.readLong(), in.readString(), in.readLong(), in.readInt()); + } + + public static final ParseField FIRST_OCCURRENCE_FIELD = new ParseField("first_occurrence"); + public static final ParseField FIRST_OCCURRENCE_MILLIS_FIELD = new ParseField("first_occurrence_millis"); + public static final ParseField MESSAGE_FIELD = new ParseField("message"); + public static final ParseField LAST_RECORDED_MILLIS_FIELD = new ParseField("last_recorded_millis"); + public static final ParseField LAST_RECORDED_FIELD = new ParseField("last_recorded"); + public static final ParseField RETRY_COUNT_FIELD = new ParseField("retry_count"); + + /** + * Creates a new ErrorEntry with the same first occurent timestamp and error message as the provided existing record, but with a fresh + * timestamp for the latest occurrence and an incremented retry count. + */ + public static ErrorEntry incrementRetryCount(ErrorEntry existingRecord, LongSupplier nowSupplier) { + return new ErrorEntry( + existingRecord.firstOccurrenceTimestamp(), + existingRecord.error(), + nowSupplier.getAsLong(), + existingRecord.retryCount() + 1 + ); + } + + @Override + public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { + builder.startObject(); + builder.humanReadableField( + FIRST_OCCURRENCE_MILLIS_FIELD.getPreferredName(), + FIRST_OCCURRENCE_FIELD.getPreferredName(), + new TimeValue(firstOccurrenceTimestamp) + ); + builder.field(MESSAGE_FIELD.getPreferredName(), error); + builder.humanReadableField( + LAST_RECORDED_MILLIS_FIELD.getPreferredName(), + LAST_RECORDED_FIELD.getPreferredName(), + new TimeValue(recordedTimestamp) + ); + builder.field(RETRY_COUNT_FIELD.getPreferredName(), retryCount); + builder.endObject(); + return builder; + } + + @Override + public void writeTo(StreamOutput out) throws IOException { + out.writeLong(firstOccurrenceTimestamp); + out.writeString(error); + out.writeLong(recordedTimestamp); + out.writeInt(retryCount); + } +} diff --git a/server/src/main/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycle.java b/server/src/main/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycle.java index c6d8cc3f085a2..ea78f43a54b21 100644 --- a/server/src/main/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycle.java +++ b/server/src/main/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycle.java @@ -23,6 +23,8 @@ import java.util.Objects; import java.util.function.Supplier; +import static org.elasticsearch.TransportVersions.DSL_ERROR_STORE_INFORMATION_ENHANCED; + /** * Encapsulates the information that describes an index from its data stream lifecycle perspective. */ @@ -50,7 +52,7 @@ public class ExplainIndexDataStreamLifecycle implements Writeable, ToXContentObj @Nullable private final DataStreamLifecycle lifecycle; @Nullable - private final String error; + private final ErrorEntry error; private Supplier nowSupplier = System::currentTimeMillis; public ExplainIndexDataStreamLifecycle( @@ -60,7 +62,7 @@ public ExplainIndexDataStreamLifecycle( @Nullable Long rolloverDate, @Nullable TimeValue generationDate, @Nullable DataStreamLifecycle lifecycle, - @Nullable String error + @Nullable ErrorEntry error ) { this.index = index; this.managedByLifecycle = managedByLifecycle; @@ -79,7 +81,12 @@ public ExplainIndexDataStreamLifecycle(StreamInput in) throws IOException { this.rolloverDate = in.readOptionalLong(); this.generationDateMillis = in.readOptionalLong(); this.lifecycle = in.readOptionalWriteable(DataStreamLifecycle::new); - this.error = in.readOptionalString(); + if (in.getTransportVersion().onOrAfter(DSL_ERROR_STORE_INFORMATION_ENHANCED)) { + this.error = in.readOptionalWriteable(ErrorEntry::new); + } else { + String bwcErrorMessage = in.readOptionalString(); + this.error = new ErrorEntry(-1L, bwcErrorMessage, -1L, -1); + } } else { this.indexCreationDate = null; this.rolloverDate = null; @@ -123,7 +130,12 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params, @Nulla lifecycle.toXContent(builder, params, rolloverConfiguration); } if (this.error != null) { - builder.field(ERROR_FIELD.getPreferredName(), error); + if (error.firstOccurrenceTimestamp() != -1L && error.recordedTimestamp() != -1L && error.retryCount() != -1) { + builder.field(ERROR_FIELD.getPreferredName(), error); + } else { + // bwc for error field being a string + builder.field(ERROR_FIELD.getPreferredName(), error.error()); + } } } builder.endObject(); @@ -139,7 +151,12 @@ public void writeTo(StreamOutput out) throws IOException { out.writeOptionalLong(rolloverDate); out.writeOptionalLong(generationDateMillis); out.writeOptionalWriteable(lifecycle); - out.writeOptionalString(error); + if (out.getTransportVersion().onOrAfter(DSL_ERROR_STORE_INFORMATION_ENHANCED)) { + out.writeOptionalWriteable(error); + } else { + String errorMessage = error != null ? error.error() : null; + out.writeOptionalString(errorMessage); + } } } @@ -202,7 +219,7 @@ public DataStreamLifecycle getLifecycle() { return lifecycle; } - public String getError() { + public ErrorEntry getError() { return error; } diff --git a/server/src/main/java/org/elasticsearch/action/search/SearchResponse.java b/server/src/main/java/org/elasticsearch/action/search/SearchResponse.java index a5faad2466083..487a5c5653998 100644 --- a/server/src/main/java/org/elasticsearch/action/search/SearchResponse.java +++ b/server/src/main/java/org/elasticsearch/action/search/SearchResponse.java @@ -538,6 +538,7 @@ public Clusters(int total, int successful, int skipped) { this.clusterInfo = Collections.emptyMap(); // will never be used if created from this constructor } + @SuppressWarnings("this-escape") public Clusters(StreamInput in) throws IOException { this.total = in.readVInt(); int successfulTemp = in.readVInt(); diff --git a/server/src/main/java/org/elasticsearch/action/support/HandledTransportAction.java b/server/src/main/java/org/elasticsearch/action/support/HandledTransportAction.java index 357c042615e5b..69bdfdea31ae4 100644 --- a/server/src/main/java/org/elasticsearch/action/support/HandledTransportAction.java +++ b/server/src/main/java/org/elasticsearch/action/support/HandledTransportAction.java @@ -31,6 +31,7 @@ protected HandledTransportAction( this(actionName, true, transportService, actionFilters, requestReader, executor); } + @SuppressWarnings("this-escape") protected HandledTransportAction( String actionName, boolean canTripCircuitBreaker, diff --git a/server/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java b/server/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java index 27dfa1ff609c7..0a4951c8c4125 100644 --- a/server/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java +++ b/server/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java @@ -87,6 +87,7 @@ protected TransportNodesAction( * @deprecated Use the local-only constructor instead. */ @Deprecated(forRemoval = true) + @SuppressWarnings("this-escape") protected TransportNodesAction( String actionName, ThreadPool threadPool, diff --git a/server/src/main/java/org/elasticsearch/common/file/AbstractFileWatchingService.java b/server/src/main/java/org/elasticsearch/common/file/AbstractFileWatchingService.java index 8f24470c67d49..4279733ec403a 100644 --- a/server/src/main/java/org/elasticsearch/common/file/AbstractFileWatchingService.java +++ b/server/src/main/java/org/elasticsearch/common/file/AbstractFileWatchingService.java @@ -10,11 +10,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.cluster.ClusterChangedEvent; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.ClusterStateListener; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.Randomness; import org.elasticsearch.common.component.AbstractLifecycleComponent; import org.elasticsearch.reservedstate.service.FileChangedListener; @@ -27,8 +22,6 @@ import java.nio.file.WatchKey; import java.nio.file.WatchService; import java.nio.file.attribute.BasicFileAttributes; -import java.nio.file.attribute.FileTime; -import java.time.Instant; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutionException; @@ -52,11 +45,10 @@ * An implementation class should override {@link #processFileChanges()} to define * the correct behavior.

*/ -public abstract class AbstractFileWatchingService extends AbstractLifecycleComponent implements ClusterStateListener { +public abstract class AbstractFileWatchingService extends AbstractLifecycleComponent { private static final Logger logger = LogManager.getLogger(AbstractFileWatchingService.class); private static final int REGISTER_RETRY_COUNT = 5; - private final ClusterService clusterService; private final Path watchedFileDir; private final Path watchedFile; private final List eventListeners; @@ -65,10 +57,8 @@ public abstract class AbstractFileWatchingService extends AbstractLifecycleCompo private FileUpdateState fileUpdateState; private WatchKey settingsDirWatchKey; private WatchKey configDirWatchKey; - private volatile boolean active = false; - public AbstractFileWatchingService(ClusterService clusterService, Path watchedFile) { - this.clusterService = clusterService; + public AbstractFileWatchingService(Path watchedFile) { this.watchedFile = watchedFile; this.watchedFileDir = watchedFile.getParent(); this.eventListeners = new CopyOnWriteArrayList<>(); @@ -84,40 +74,6 @@ public AbstractFileWatchingService(ClusterService clusterService, Path watchedFi */ protected abstract void processFileChanges() throws InterruptedException, ExecutionException, IOException; - /** - * There may be an indication in cluster state that the file we are watching - * should be re-processed: for example, after cluster state has been restored - * from a snapshot. By default, we do nothing, but this method should be overridden - * if different behavior is desired. - * @param clusterState State of the cluster - * @return false, by default - */ - protected boolean shouldRefreshFileState(ClusterState clusterState) { - return false; - } - - /** - * 'Touches' the settings file so the file watcher will re-processes it. - *

- * The file processing is asynchronous, the cluster state or the file must be already updated such that - * the version information in the file is newer than what's already saved as processed in the - * cluster state. - * - * For snapshot restores we first must restore the snapshot and then force a refresh, since the cluster state - * metadata version must be reset to 0 and saved in the cluster state. - */ - private void refreshExistingFileStateIfNeeded(ClusterState clusterState) { - if (watching()) { - if (shouldRefreshFileState(clusterState) && Files.exists(watchedFile())) { - try { - Files.setLastModifiedTime(watchedFile(), FileTime.from(Instant.now())); - } catch (IOException e) { - logger.warn("encountered I/O error trying to update file settings timestamp", e); - } - } - } - } - public final void addFileChangedListener(FileChangedListener listener) { eventListeners.add(listener); } @@ -131,33 +87,12 @@ public final Path watchedFile() { } @Override - public final void clusterChanged(ClusterChangedEvent event) { - ClusterState clusterState = event.state(); - if (clusterState.nodes().isLocalNodeElectedMaster()) { - startWatcher(clusterState); - } else if (event.previousState().nodes().isLocalNodeElectedMaster()) { - stopWatcher(); - } + protected void doStart() { + startWatcher(); } @Override - protected final void doStart() { - // We start the file watcher when we know we are master from a cluster state change notification. - // We need the additional active flag, since cluster state can change after we've shutdown the service - // causing the watcher to start again. - this.active = Files.exists(watchedFileDir().getParent()); - if (active == false) { - // we don't have a config directory, we can't possibly launch the file settings service - return; - } - if (DiscoveryNode.isMasterNode(clusterService.getSettings())) { - clusterService.addListener(this); - } - } - - @Override - protected final void doStop() { - this.active = false; + protected void doStop() { logger.debug("Stopping file watching service"); stopWatcher(); } @@ -184,10 +119,9 @@ final boolean watchedFileChanged(Path path) throws IOException { return (previousUpdateState == null || previousUpdateState.equals(fileUpdateState) == false); } - private synchronized void startWatcher(ClusterState clusterState) { - if (watching() || active == false) { - refreshExistingFileStateIfNeeded(clusterState); - + protected final synchronized void startWatcher() { + if (Files.exists(watchedFileDir.getParent()) == false) { + logger.warn("File watcher for [{}] cannot start because grandparent directory does not exist", watchedFile); return; } @@ -295,7 +229,7 @@ protected final void watcherThread() { } } - final synchronized void stopWatcher() { + protected final synchronized void stopWatcher() { if (watching()) { logger.debug("stopping watcher ..."); // make sure watch service is closed whatever diff --git a/server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java b/server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java index e780b36568190..e1f6b4e80977f 100644 --- a/server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java +++ b/server/src/main/java/org/elasticsearch/reservedstate/service/FileSettingsService.java @@ -11,9 +11,12 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.elasticsearch.action.support.PlainActionFuture; +import org.elasticsearch.cluster.ClusterChangedEvent; import org.elasticsearch.cluster.ClusterState; +import org.elasticsearch.cluster.ClusterStateListener; import org.elasticsearch.cluster.metadata.Metadata; import org.elasticsearch.cluster.metadata.ReservedStateMetadata; +import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.file.AbstractFileWatchingService; import org.elasticsearch.env.Environment; @@ -22,6 +25,8 @@ import java.io.BufferedInputStream; import java.io.IOException; import java.nio.file.Files; +import java.nio.file.attribute.FileTime; +import java.time.Instant; import java.util.concurrent.ExecutionException; import static org.elasticsearch.xcontent.XContentType.JSON; @@ -37,14 +42,16 @@ * the service as a listener to cluster state changes, so that we can enable the file watcher thread when this * node becomes a master node. */ -public class FileSettingsService extends AbstractFileWatchingService { +public class FileSettingsService extends AbstractFileWatchingService implements ClusterStateListener { private static final Logger logger = LogManager.getLogger(FileSettingsService.class); public static final String SETTINGS_FILE_NAME = "settings.json"; public static final String NAMESPACE = "file_settings"; public static final String OPERATOR_DIRECTORY = "operator"; + private final ClusterService clusterService; private final ReservedClusterStateService stateService; + private volatile boolean active = false; /** * Constructs the {@link FileSettingsService} @@ -54,10 +61,70 @@ public class FileSettingsService extends AbstractFileWatchingService { * @param environment we need the environment to pull the location of the config and operator directories */ public FileSettingsService(ClusterService clusterService, ReservedClusterStateService stateService, Environment environment) { - super(clusterService, environment.configFile().toAbsolutePath().resolve(OPERATOR_DIRECTORY).resolve(SETTINGS_FILE_NAME)); + super(environment.configFile().toAbsolutePath().resolve(OPERATOR_DIRECTORY).resolve(SETTINGS_FILE_NAME)); + this.clusterService = clusterService; this.stateService = stateService; } + @Override + protected void doStart() { + // We start the file watcher when we know we are master from a cluster state change notification. + // We need the additional active flag, since cluster state can change after we've shutdown the service + // causing the watcher to start again. + this.active = Files.exists(watchedFileDir().getParent()); + if (active == false) { + // we don't have a config directory, we can't possibly launch the file settings service + return; + } + if (DiscoveryNode.isMasterNode(clusterService.getSettings())) { + clusterService.addListener(this); + } + } + + @Override + protected void doStop() { + this.active = false; + super.doStop(); + } + + @Override + public final void clusterChanged(ClusterChangedEvent event) { + ClusterState clusterState = event.state(); + if (clusterState.nodes().isLocalNodeElectedMaster()) { + synchronized (this) { + if (watching() || active == false) { + refreshExistingFileStateIfNeeded(clusterState); + return; + } + startWatcher(); + } + } else if (event.previousState().nodes().isLocalNodeElectedMaster()) { + stopWatcher(); + } + } + + /** + * 'Touches' the settings file so the file watcher will re-processes it. + *

+ * The file processing is asynchronous, the cluster state or the file must be already updated such that + * the version information in the file is newer than what's already saved as processed in the + * cluster state. + * + * For snapshot restores we first must restore the snapshot and then force a refresh, since the cluster state + * metadata version must be reset to 0 and saved in the cluster state. + */ + private void refreshExistingFileStateIfNeeded(ClusterState clusterState) { + if (watching()) { + if (shouldRefreshFileState(clusterState) && Files.exists(watchedFile())) { + try { + Files.setLastModifiedTime(watchedFile(), FileTime.from(Instant.now())); + } catch (IOException e) { + logger.warn("encountered I/O error trying to update file settings timestamp", e); + } + } + } + } + /** * Used by snapshot restore service {@link org.elasticsearch.snapshots.RestoreService} to prepare the reserved * state of the snapshot for the current cluster. @@ -95,8 +162,7 @@ public void handleSnapshotRestore(ClusterState clusterState, Metadata.Builder md * @param clusterState State of the cluster * @return true if file settings metadata version is exactly 0, false otherwise. */ - @Override - protected boolean shouldRefreshFileState(ClusterState clusterState) { + private boolean shouldRefreshFileState(ClusterState clusterState) { // We check if the version was reset to 0, and force an update if a file exists. This can happen in situations // like snapshot restores. ReservedStateMetadata fileSettingsMetadata = clusterState.metadata().reservedStateMetadata().get(NAMESPACE); diff --git a/server/src/test/java/org/elasticsearch/action/datastreams/lifecycle/ErrorEntryTests.java b/server/src/test/java/org/elasticsearch/action/datastreams/lifecycle/ErrorEntryTests.java new file mode 100644 index 0000000000000..c96f849899254 --- /dev/null +++ b/server/src/test/java/org/elasticsearch/action/datastreams/lifecycle/ErrorEntryTests.java @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +package org.elasticsearch.action.datastreams.lifecycle; + +import org.elasticsearch.test.ESTestCase; + +import static org.hamcrest.Matchers.is; + +public class ErrorEntryTests extends ESTestCase { + + public void testIncrementRetryCount() { + long now = System.currentTimeMillis(); + ErrorEntry existingRecord = new ErrorEntry(now, "error message", now, 0); + long newOccurenceTimestamp = now + 2L; + ErrorEntry newEntry = ErrorEntry.incrementRetryCount(existingRecord, () -> newOccurenceTimestamp); + + assertThat(newEntry.firstOccurrenceTimestamp(), is(existingRecord.firstOccurrenceTimestamp())); + assertThat(newEntry.error(), is(existingRecord.error())); + assertThat(newEntry.recordedTimestamp(), is(newOccurenceTimestamp)); + assertThat(newEntry.retryCount(), is(1)); + } + +} diff --git a/server/src/test/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycleTests.java b/server/src/test/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycleTests.java index b3b8b6b753cf2..7087b677673e7 100644 --- a/server/src/test/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycleTests.java +++ b/server/src/test/java/org/elasticsearch/action/datastreams/lifecycle/ExplainIndexDataStreamLifecycleTests.java @@ -31,7 +31,14 @@ public void testGetGenerationTime() { randomBoolean() ? now + TimeValue.timeValueDays(1).getMillis() : null, null, new DataStreamLifecycle(), - randomBoolean() ? new NullPointerException("bad times").getMessage() : null + randomBoolean() + ? new ErrorEntry( + System.currentTimeMillis(), + new NullPointerException("bad times").getMessage(), + System.currentTimeMillis(), + randomIntBetween(0, 30) + ) + : null ); assertThat(explainIndexDataStreamLifecycle.getGenerationTime(() -> now + 50L), is(nullValue())); explainIndexDataStreamLifecycle = new ExplainIndexDataStreamLifecycle( @@ -41,7 +48,14 @@ public void testGetGenerationTime() { randomBoolean() ? now + TimeValue.timeValueDays(1).getMillis() : null, TimeValue.timeValueMillis(now + 100), new DataStreamLifecycle(), - randomBoolean() ? new NullPointerException("bad times").getMessage() : null + randomBoolean() + ? new ErrorEntry( + System.currentTimeMillis(), + new NullPointerException("bad times").getMessage(), + System.currentTimeMillis(), + randomIntBetween(0, 30) + ) + : null ); assertThat(explainIndexDataStreamLifecycle.getGenerationTime(() -> now + 500L), is(TimeValue.timeValueMillis(400))); } @@ -189,7 +203,14 @@ private static ExplainIndexDataStreamLifecycle createManagedIndexDataStreamLifec randomBoolean() ? now + TimeValue.timeValueDays(1).getMillis() : null, TimeValue.timeValueMillis(now), lifecycle, - randomBoolean() ? new NullPointerException("bad times").getMessage() : null + randomBoolean() + ? new ErrorEntry( + System.currentTimeMillis(), + new NullPointerException("bad times").getMessage(), + System.currentTimeMillis(), + randomIntBetween(0, 30) + ) + : null ); } diff --git a/server/src/test/java/org/elasticsearch/common/file/AbstractFileWatchingServiceTests.java b/server/src/test/java/org/elasticsearch/common/file/AbstractFileWatchingServiceTests.java index 7f271a21cd08b..e12312844e571 100644 --- a/server/src/test/java/org/elasticsearch/common/file/AbstractFileWatchingServiceTests.java +++ b/server/src/test/java/org/elasticsearch/common/file/AbstractFileWatchingServiceTests.java @@ -8,7 +8,6 @@ package org.elasticsearch.common.file; -import org.elasticsearch.cluster.ClusterChangedEvent; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.node.DiscoveryNode; @@ -58,13 +57,13 @@ class TestFileWatchingService extends AbstractFileWatchingService { private final CountDownLatch countDownLatch; - TestFileWatchingService(ClusterService clusterService, Path watchedFile) { - super(clusterService, watchedFile); + TestFileWatchingService(Path watchedFile) { + super(watchedFile); this.countDownLatch = null; } - TestFileWatchingService(ClusterService clusterService, Path watchedFile, CountDownLatch countDownLatch) { - super(clusterService, watchedFile); + TestFileWatchingService(Path watchedFile, CountDownLatch countDownLatch) { + super(watchedFile); this.countDownLatch = countDownLatch; } @@ -99,7 +98,7 @@ public void setUp() throws Exception { Files.createDirectories(env.configFile()); - fileWatchingService = new TestFileWatchingService(clusterService, getWatchedFilePath(env)); + fileWatchingService = new TestFileWatchingService(getWatchedFilePath(env)); } @After @@ -110,7 +109,6 @@ public void tearDown() throws Exception { public void testStartStop() { fileWatchingService.start(); - fileWatchingService.clusterChanged(new ClusterChangedEvent("test", clusterService.state(), ClusterState.EMPTY_STATE)); assertTrue(fileWatchingService.watching()); fileWatchingService.stop(); assertFalse(fileWatchingService.watching()); @@ -143,10 +141,9 @@ public void testWatchedFile() throws Exception { public void testCallsProcessing() throws Exception { CountDownLatch processFileLatch = new CountDownLatch(1); - AbstractFileWatchingService service = new TestFileWatchingService(clusterService, getWatchedFilePath(env), processFileLatch); + AbstractFileWatchingService service = new TestFileWatchingService(getWatchedFilePath(env), processFileLatch); service.start(); - service.clusterChanged(new ClusterChangedEvent("test", clusterService.state(), ClusterState.EMPTY_STATE)); assertTrue(service.watching()); Files.createDirectories(service.watchedFileDir()); diff --git a/server/src/test/java/org/elasticsearch/reservedstate/service/FileSettingsServiceTests.java b/server/src/test/java/org/elasticsearch/reservedstate/service/FileSettingsServiceTests.java index 130dd8b0025e1..c25f6dd7e97c2 100644 --- a/server/src/test/java/org/elasticsearch/reservedstate/service/FileSettingsServiceTests.java +++ b/server/src/test/java/org/elasticsearch/reservedstate/service/FileSettingsServiceTests.java @@ -112,6 +112,16 @@ public void tearDown() throws Exception { threadpool.shutdownNow(); } + public void testStartStop() { + fileSettingsService.start(); + assertFalse(fileSettingsService.watching()); + fileSettingsService.clusterChanged(new ClusterChangedEvent("test", clusterService.state(), ClusterState.EMPTY_STATE)); + assertTrue(fileSettingsService.watching()); + fileSettingsService.stop(); + assertFalse(fileSettingsService.watching()); + fileSettingsService.close(); + } + public void testOperatorDirName() { Path operatorPath = fileSettingsService.watchedFileDir(); assertTrue(operatorPath.startsWith(env.configFile())); diff --git a/x-pack/plugin/esql/build.gradle b/x-pack/plugin/esql/build.gradle index 9643e2b2d8e1e..ce3413441d927 100644 --- a/x-pack/plugin/esql/build.gradle +++ b/x-pack/plugin/esql/build.gradle @@ -197,6 +197,23 @@ tasks.register("regen") { ant.replaceregexp(match: '\t', flags: 'g', replace: ' ', encoding: 'UTF-8') { fileset(dir: outputPath, includes: 'EsqlBase*.java') } + // suppress this-escape warnings on EsqlBaseLexer + ant.replaceregexp( + match: 'public EsqlBaseLexer', + replace: '@SuppressWarnings("this-escape")${line.separator} public EsqlBaseLexer', + encoding: 'UTF-8' + ) { + fileset(dir: outputPath, includes: 'EsqlBaseLexer.java') + } + // suppress this-escape warnings on all internal EsqlBaseParser class constructores + ant.replaceregexp( + match: '([ ]+)public ([A-Z][a-z]+[a-z,A-Z]+\\()', + flags: 'g', + replace: '\\1@SuppressWarnings("this-escape")${line.separator}\\1public \\2', + encoding: 'UTF-8' + ) { + fileset(dir: outputPath, includes: 'EsqlBaseParser.java') + } // fix line endings ant.fixcrlf(srcdir: outputPath, eol: 'lf') { patternset(includes: 'EsqlBase*.java') diff --git a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/ConvertEvaluatorImplementer.java b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/ConvertEvaluatorImplementer.java index 86ed41c57cb59..002806f11dd4b 100644 --- a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/ConvertEvaluatorImplementer.java +++ b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/ConvertEvaluatorImplementer.java @@ -23,6 +23,7 @@ import javax.lang.model.util.Elements; import static org.elasticsearch.compute.gen.Methods.appendMethod; +import static org.elasticsearch.compute.gen.Methods.buildFromFactory; import static org.elasticsearch.compute.gen.Methods.getMethod; import static org.elasticsearch.compute.gen.Types.ABSTRACT_CONVERT_FUNCTION_EVALUATOR; import static org.elasticsearch.compute.gen.Types.BLOCK; @@ -33,6 +34,7 @@ import static org.elasticsearch.compute.gen.Types.SOURCE; import static org.elasticsearch.compute.gen.Types.VECTOR; import static org.elasticsearch.compute.gen.Types.blockType; +import static org.elasticsearch.compute.gen.Types.builderType; import static org.elasticsearch.compute.gen.Types.vectorType; public class ConvertEvaluatorImplementer { @@ -131,35 +133,37 @@ private MethodSpec evalVector() { builder.nextControlFlow("catch (Exception e)"); { builder.addStatement("registerException(e)"); - builder.addStatement("return Block.constantNullBlock(positionCount, driverContext.blockFactory())"); + builder.addStatement("return driverContext.blockFactory().newConstantNullBlock(positionCount)"); } builder.endControlFlow(); } builder.endControlFlow(); - ClassName returnBlockType = blockType(resultType); - builder.addStatement( - "$T.Builder builder = $T.newBlockBuilder(positionCount, driverContext.blockFactory())", - returnBlockType, - returnBlockType + ClassName resultBuilderType = builderType(blockType(resultType)); + builder.beginControlFlow( + "try ($T builder = driverContext.blockFactory().$L(positionCount))", + resultBuilderType, + buildFromFactory(resultBuilderType) ); - builder.beginControlFlow("for (int p = 0; p < positionCount; p++)"); { - builder.beginControlFlow("try"); + builder.beginControlFlow("for (int p = 0; p < positionCount; p++)"); { - builder.addStatement("builder.$L($N)", appendMethod(resultType), evalValueCall("vector", "p", scratchPadName)); - } - builder.nextControlFlow("catch (Exception e)"); - { - builder.addStatement("registerException(e)"); - builder.addStatement("builder.appendNull()"); + builder.beginControlFlow("try"); + { + builder.addStatement("builder.$L($N)", appendMethod(resultType), evalValueCall("vector", "p", scratchPadName)); + } + builder.nextControlFlow("catch (Exception e)"); + { + builder.addStatement("registerException(e)"); + builder.addStatement("builder.appendNull()"); + } + builder.endControlFlow(); } builder.endControlFlow(); + builder.addStatement("return builder.build()"); } builder.endControlFlow(); - builder.addStatement("return builder.build()"); - return builder.build(); } @@ -170,11 +174,11 @@ private MethodSpec evalBlock() { TypeName blockType = blockType(argumentType); builder.addStatement("$T block = ($T) b", blockType, blockType); builder.addStatement("int positionCount = block.getPositionCount()"); - TypeName resultBlockType = blockType(resultType); + TypeName resultBuilderType = builderType(blockType(resultType)); builder.beginControlFlow( - "try ($T.Builder builder = $T.newBlockBuilder(positionCount, driverContext.blockFactory()))", - resultBlockType, - resultBlockType + "try ($T builder = driverContext.blockFactory().$L(positionCount))", + resultBuilderType, + buildFromFactory(resultBuilderType) ); String scratchPadName = null; if (argumentType.equals(BYTES_REF)) { diff --git a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/EvaluatorImplementer.java b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/EvaluatorImplementer.java index d7ba99ccbc8e9..e6ea75af38494 100644 --- a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/EvaluatorImplementer.java +++ b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/EvaluatorImplementer.java @@ -33,6 +33,7 @@ import javax.lang.model.util.Elements; import static org.elasticsearch.compute.gen.Methods.appendMethod; +import static org.elasticsearch.compute.gen.Methods.buildFromFactory; import static org.elasticsearch.compute.gen.Methods.getMethod; import static org.elasticsearch.compute.gen.Types.BLOCK_REF; import static org.elasticsearch.compute.gen.Types.BYTES_REF; @@ -45,6 +46,7 @@ import static org.elasticsearch.compute.gen.Types.SOURCE; import static org.elasticsearch.compute.gen.Types.WARNINGS; import static org.elasticsearch.compute.gen.Types.blockType; +import static org.elasticsearch.compute.gen.Types.builderType; import static org.elasticsearch.compute.gen.Types.vectorType; public class EvaluatorImplementer { @@ -158,11 +160,11 @@ private MethodSpec realEval(boolean blockStyle) { builder.addParameter(a.dataType(blockStyle), a.paramName(blockStyle)); } }); + TypeName builderType = builderType(resultDataType); builder.beginControlFlow( - "try($T.Builder result = $T.$L(positionCount, driverContext.blockFactory()))", - resultDataType, - resultDataType, - resultDataType.simpleName().endsWith("Vector") ? "newVectorBuilder" : "newBlockBuilder" + "try($T result = driverContext.blockFactory().$L(positionCount))", + builderType, + buildFromFactory(builderType) ); { processFunction.args.stream().forEach(a -> a.createScratch(builder)); diff --git a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/Methods.java b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/Methods.java index 746b8be169031..f651ab2a316aa 100644 --- a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/Methods.java +++ b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/Methods.java @@ -19,14 +19,28 @@ import javax.lang.model.util.ElementFilter; import static org.elasticsearch.compute.gen.Types.BOOLEAN_BLOCK; +import static org.elasticsearch.compute.gen.Types.BOOLEAN_BLOCK_BUILDER; import static org.elasticsearch.compute.gen.Types.BOOLEAN_VECTOR; +import static org.elasticsearch.compute.gen.Types.BOOLEAN_VECTOR_BUILDER; +import static org.elasticsearch.compute.gen.Types.BOOLEAN_VECTOR_FIXED_BUILDER; import static org.elasticsearch.compute.gen.Types.BYTES_REF_BLOCK; +import static org.elasticsearch.compute.gen.Types.BYTES_REF_BLOCK_BUILDER; +import static org.elasticsearch.compute.gen.Types.BYTES_REF_VECTOR_BUILDER; import static org.elasticsearch.compute.gen.Types.DOUBLE_BLOCK; +import static org.elasticsearch.compute.gen.Types.DOUBLE_BLOCK_BUILDER; import static org.elasticsearch.compute.gen.Types.DOUBLE_VECTOR; +import static org.elasticsearch.compute.gen.Types.DOUBLE_VECTOR_BUILDER; +import static org.elasticsearch.compute.gen.Types.DOUBLE_VECTOR_FIXED_BUILDER; import static org.elasticsearch.compute.gen.Types.INT_BLOCK; +import static org.elasticsearch.compute.gen.Types.INT_BLOCK_BUILDER; import static org.elasticsearch.compute.gen.Types.INT_VECTOR; +import static org.elasticsearch.compute.gen.Types.INT_VECTOR_BUILDER; +import static org.elasticsearch.compute.gen.Types.INT_VECTOR_FIXED_BUILDER; import static org.elasticsearch.compute.gen.Types.LONG_BLOCK; +import static org.elasticsearch.compute.gen.Types.LONG_BLOCK_BUILDER; import static org.elasticsearch.compute.gen.Types.LONG_VECTOR; +import static org.elasticsearch.compute.gen.Types.LONG_VECTOR_BUILDER; +import static org.elasticsearch.compute.gen.Types.LONG_VECTOR_FIXED_BUILDER; /** * Finds declared methods for the code generator. @@ -95,6 +109,56 @@ static String appendMethod(TypeName t) { throw new IllegalArgumentException("unknown append method for [" + t + "]"); } + /** + * Returns the name of the method used to build {@code t} instances + * from a {@code BlockFactory}. + */ + static String buildFromFactory(TypeName t) { + if (t.equals(BOOLEAN_BLOCK_BUILDER)) { + return "newBooleanBlockBuilder"; + } + if (t.equals(BOOLEAN_VECTOR_FIXED_BUILDER)) { + return "newBooleanVectorFixedBuilder"; + } + if (t.equals(BOOLEAN_VECTOR_BUILDER)) { + return "newBooleanVectorBuilder"; + } + if (t.equals(BYTES_REF_BLOCK_BUILDER)) { + return "newBytesRefBlockBuilder"; + } + if (t.equals(BYTES_REF_VECTOR_BUILDER)) { + return "newBytesRefVectorBuilder"; + } + if (t.equals(INT_BLOCK_BUILDER)) { + return "newIntBlockBuilder"; + } + if (t.equals(INT_VECTOR_FIXED_BUILDER)) { + return "newIntVectorFixedBuilder"; + } + if (t.equals(INT_VECTOR_BUILDER)) { + return "newIntVectorBuilder"; + } + if (t.equals(LONG_BLOCK_BUILDER)) { + return "newLongBlockBuilder"; + } + if (t.equals(LONG_VECTOR_FIXED_BUILDER)) { + return "newLongVectorFixedBuilder"; + } + if (t.equals(LONG_VECTOR_BUILDER)) { + return "newLongVectorBuilder"; + } + if (t.equals(DOUBLE_BLOCK_BUILDER)) { + return "newDoubleBlockBuilder"; + } + if (t.equals(DOUBLE_VECTOR_BUILDER)) { + return "newDoubleVectorBuilder"; + } + if (t.equals(DOUBLE_VECTOR_FIXED_BUILDER)) { + return "newDoubleVectorFixedBuilder"; + } + throw new IllegalArgumentException("unknown build method for [" + t + "]"); + } + /** * Returns the name of the method used to get {@code valueType} instances * from vectors or blocks. diff --git a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/MvEvaluatorImplementer.java b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/MvEvaluatorImplementer.java index 3a97b44634bd3..797665d4f62bb 100644 --- a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/MvEvaluatorImplementer.java +++ b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/MvEvaluatorImplementer.java @@ -39,6 +39,8 @@ import static org.elasticsearch.compute.gen.Types.SOURCE; import static org.elasticsearch.compute.gen.Types.WARNINGS; import static org.elasticsearch.compute.gen.Types.blockType; +import static org.elasticsearch.compute.gen.Types.builderType; +import static org.elasticsearch.compute.gen.Types.vectorFixedBuilderType; import static org.elasticsearch.compute.gen.Types.vectorType; public class MvEvaluatorImplementer { @@ -196,28 +198,19 @@ private MethodSpec evalShell( builder.beginControlFlow("try (ref)"); builder.addStatement("$T v = ($T) ref.block()", blockType, blockType); builder.addStatement("int positionCount = v.getPositionCount()"); + TypeName builderType; if (nullable) { - TypeName resultBlockType = blockType(resultType); - builder.beginControlFlow( - "try ($T.Builder builder = $T.newBlockBuilder(positionCount, driverContext.blockFactory()))", - resultBlockType, - resultBlockType - ); + builderType = builderType(blockType(resultType)); } else if (resultType.equals(BYTES_REF)) { - TypeName resultVectorType = vectorType(resultType); - builder.beginControlFlow( - "try ($T.Builder builder = $T.newVectorBuilder(positionCount, driverContext.blockFactory()))", - resultVectorType, - resultVectorType - ); + builderType = builderType(vectorType(resultType)); } else { - TypeName resultVectorType = vectorType(resultType); - builder.beginControlFlow( - "try ($T.FixedBuilder builder = $T.newVectorFixedBuilder(positionCount, driverContext.blockFactory()))", - resultVectorType, - resultVectorType - ); + builderType = vectorFixedBuilderType(resultType); } + builder.beginControlFlow( + "try ($T builder = driverContext.blockFactory().$L(positionCount))", + builderType, + Methods.buildFromFactory(builderType) + ); if (false == workType.equals(fieldType) && workType.isPrimitive() == false) { builder.addStatement("$T work = new $T()", workType, workType); diff --git a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/Types.java b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/Types.java index c1802b671f2a6..5c316a7c1bdc6 100644 --- a/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/Types.java +++ b/x-pack/plugin/esql/compute/gen/src/main/java/org/elasticsearch/compute/gen/Types.java @@ -58,6 +58,17 @@ public class Types { static final ClassName LONG_VECTOR = ClassName.get(DATA_PACKAGE, "LongVector"); static final ClassName DOUBLE_VECTOR = ClassName.get(DATA_PACKAGE, "DoubleVector"); + static final ClassName BOOLEAN_VECTOR_BUILDER = ClassName.get(DATA_PACKAGE, "BooleanVector", "Builder"); + static final ClassName BYTES_REF_VECTOR_BUILDER = ClassName.get(DATA_PACKAGE, "BytesRefVector", "Builder"); + static final ClassName INT_VECTOR_BUILDER = ClassName.get(DATA_PACKAGE, "IntVector", "Builder"); + static final ClassName LONG_VECTOR_BUILDER = ClassName.get(DATA_PACKAGE, "LongVector", "Builder"); + static final ClassName DOUBLE_VECTOR_BUILDER = ClassName.get(DATA_PACKAGE, "DoubleVector", "Builder"); + + static final ClassName BOOLEAN_VECTOR_FIXED_BUILDER = ClassName.get(DATA_PACKAGE, "BooleanVector", "FixedBuilder"); + static final ClassName INT_VECTOR_FIXED_BUILDER = ClassName.get(DATA_PACKAGE, "IntVector", "FixedBuilder"); + static final ClassName LONG_VECTOR_FIXED_BUILDER = ClassName.get(DATA_PACKAGE, "LongVector", "FixedBuilder"); + static final ClassName DOUBLE_VECTOR_FIXED_BUILDER = ClassName.get(DATA_PACKAGE, "DoubleVector", "FixedBuilder"); + static final ClassName BOOLEAN_ARRAY_VECTOR = ClassName.get(DATA_PACKAGE, "BooleanArrayVector"); static final ClassName BYTES_REF_ARRAY_VECTOR = ClassName.get(DATA_PACKAGE, "BytesRefArrayVector"); static final ClassName INT_ARRAY_VECTOR = ClassName.get(DATA_PACKAGE, "IntArrayVector"); @@ -198,6 +209,56 @@ static ClassName vectorType(String elementType) { throw new IllegalArgumentException("unknown vector type for [" + elementType + "]"); } + static ClassName builderType(TypeName resultType) { + if (resultType.equals(BOOLEAN_BLOCK)) { + return BOOLEAN_BLOCK_BUILDER; + } + if (resultType.equals(BOOLEAN_VECTOR)) { + return BOOLEAN_VECTOR_BUILDER; + } + if (resultType.equals(BYTES_REF_BLOCK)) { + return BYTES_REF_BLOCK_BUILDER; + } + if (resultType.equals(BYTES_REF_VECTOR)) { + return BYTES_REF_VECTOR_BUILDER; + } + if (resultType.equals(INT_BLOCK)) { + return INT_BLOCK_BUILDER; + } + if (resultType.equals(INT_VECTOR)) { + return INT_VECTOR_BUILDER; + } + if (resultType.equals(LONG_BLOCK)) { + return LONG_BLOCK_BUILDER; + } + if (resultType.equals(LONG_VECTOR)) { + return LONG_VECTOR_BUILDER; + } + if (resultType.equals(DOUBLE_BLOCK)) { + return DOUBLE_BLOCK_BUILDER; + } + if (resultType.equals(DOUBLE_VECTOR)) { + return DOUBLE_VECTOR_BUILDER; + } + throw new IllegalArgumentException("unknown builder type for [" + resultType + "]"); + } + + static ClassName vectorFixedBuilderType(TypeName elementType) { + if (elementType.equals(TypeName.BOOLEAN)) { + return BOOLEAN_VECTOR_FIXED_BUILDER; + } + if (elementType.equals(TypeName.INT)) { + return INT_VECTOR_FIXED_BUILDER; + } + if (elementType.equals(TypeName.LONG)) { + return LONG_VECTOR_FIXED_BUILDER; + } + if (elementType.equals(TypeName.DOUBLE)) { + return DOUBLE_VECTOR_FIXED_BUILDER; + } + throw new IllegalArgumentException("unknown vector fixed builder type for [" + elementType + "]"); + } + static ClassName arrayVectorType(TypeName elementType) { if (elementType.equals(TypeName.BOOLEAN)) { return BOOLEAN_ARRAY_VECTOR; diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/BlockFactory.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/BlockFactory.java index d27f872881460..88616e7fc95fd 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/BlockFactory.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/BlockFactory.java @@ -109,6 +109,9 @@ public BooleanBlock.Builder newBooleanBlockBuilder(int estimatedSize) { return new BooleanBlockBuilder(estimatedSize, this); } + /** + * Build a {@link BooleanVector.FixedBuilder} that never grows. + */ public BooleanVector.FixedBuilder newBooleanVectorFixedBuilder(int size) { return new BooleanVectorFixedBuilder(size, this); } @@ -172,6 +175,9 @@ public IntVector.Builder newIntVectorBuilder(int estimatedSize) { return new IntVectorBuilder(estimatedSize, this); } + /** + * Build a {@link IntVector.FixedBuilder} that never grows. + */ public IntVector.FixedBuilder newIntVectorFixedBuilder(int size) { return new IntVectorFixedBuilder(size, this); } @@ -236,7 +242,10 @@ public LongVector.Builder newLongVectorBuilder(int estimatedSize) { return new LongVectorBuilder(estimatedSize, this); } - LongVector.FixedBuilder newLongVectorFixedBuilder(int size) { + /** + * Build a {@link LongVector.FixedBuilder} that never grows. + */ + public LongVector.FixedBuilder newLongVectorFixedBuilder(int size) { return new LongVectorFixedBuilder(size, this); } @@ -286,7 +295,10 @@ public DoubleVector.Builder newDoubleVectorBuilder(int estimatedSize) { return new DoubleVectorBuilder(estimatedSize, this); } - DoubleVector.FixedBuilder newDoubleVectorFixedBuilder(int size) { + /** + * Build a {@link DoubleVector.FixedBuilder} that never grows. + */ + public DoubleVector.FixedBuilder newDoubleVectorFixedBuilder(int size) { return new DoubleVectorFixedBuilder(size, this); } diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/DocVector.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/DocVector.java index 44819359e8e44..842f8719f19dc 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/DocVector.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/DocVector.java @@ -48,6 +48,7 @@ public class DocVector extends AbstractVector implements Vector { final DocBlock block; + @SuppressWarnings("this-escape") public DocVector(IntVector shards, IntVector segments, IntVector docs, Boolean singleSegmentNonDecreasing) { super(shards.getPositionCount(), null); this.shards = shards; diff --git a/x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/data/MockBlockFactory.java b/x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/data/MockBlockFactory.java index 0a63043ecc14b..8183a055f2998 100644 --- a/x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/data/MockBlockFactory.java +++ b/x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/data/MockBlockFactory.java @@ -245,7 +245,8 @@ public LongVector.Builder newLongVectorBuilder(int estimatedSize) { return b; } - LongVector.FixedBuilder newLongVectorFixedBuilder(int size) { + @Override + public LongVector.FixedBuilder newLongVectorFixedBuilder(int size) { var b = super.newLongVectorFixedBuilder(size); track(b, trackDetail()); return b; @@ -286,7 +287,8 @@ public DoubleVector.Builder newDoubleVectorBuilder(int estimatedSize) { return b; } - DoubleVector.FixedBuilder newDoubleVectorFixedBuilder(int size) { + @Override + public DoubleVector.FixedBuilder newDoubleVectorFixedBuilder(int size) { var b = super.newDoubleVectorFixedBuilder(size); track(b, trackDetail()); return b; diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsBoolsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsBoolsEvaluator.java index 66527e8aa3ab6..5b971a6dc2f11 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsBoolsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsBoolsEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BooleanBlock lhsBlock, BooleanBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public BooleanBlock eval(int positionCount, BooleanBlock lhsBlock, BooleanBlock } public BooleanVector eval(int positionCount, BooleanVector lhsVector, BooleanVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(Equals.processBools(lhsVector.getBoolean(p), rhsVector.getBoolean(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsDoublesEvaluator.java index f63d0bdb95dae..d20b493ca2502 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsDoublesEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rh } public BooleanVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(Equals.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsIntsEvaluator.java index ab8fbcb20879b..e563e46e854f9 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsIntsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock } public BooleanVector eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(Equals.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsKeywordsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsKeywordsEvaluator.java index 7368f3ff23213..43ce60ccd085c 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsKeywordsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsKeywordsEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -74,7 +74,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBloc } public BooleanVector eval(int positionCount, BytesRefVector lhsVector, BytesRefVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsLongsEvaluator.java index 85bf4296e63a8..80dd80145d91b 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/EqualsLongsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlo } public BooleanVector eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(Equals.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanDoublesEvaluator.java index 2b69d9b41dde9..940baa0c45cc8 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanDoublesEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rh } public BooleanVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(GreaterThan.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanIntsEvaluator.java index 9912428489fd1..e82addad8ecbf 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanIntsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock } public BooleanVector eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(GreaterThan.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanKeywordsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanKeywordsEvaluator.java index 3139138565526..587e379d8f6b5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanKeywordsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanKeywordsEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -74,7 +74,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBloc } public BooleanVector eval(int positionCount, BytesRefVector lhsVector, BytesRefVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanLongsEvaluator.java index 281c62932d4d4..acf5e20afb8fa 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanLongsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlo } public BooleanVector eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(GreaterThan.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualDoublesEvaluator.java index 700b2f8371aff..d7a2d3daae5eb 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualDoublesEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rh } public BooleanVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(GreaterThanOrEqual.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualIntsEvaluator.java index 894c7b743d043..b0c49c422fa3a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualIntsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock } public BooleanVector eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(GreaterThanOrEqual.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualKeywordsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualKeywordsEvaluator.java index da52726494428..9c28bd4b5781d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualKeywordsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualKeywordsEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -74,7 +74,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBloc } public BooleanVector eval(int positionCount, BytesRefVector lhsVector, BytesRefVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualLongsEvaluator.java index aecf1e92fb6f0..390986a332523 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/GreaterThanOrEqualLongsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlo } public BooleanVector eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(GreaterThanOrEqual.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanDoublesEvaluator.java index 4c0ea5e5b0ea7..09ead847ba02d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanDoublesEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rh } public BooleanVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(LessThan.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanIntsEvaluator.java index 7fbb2fc4ecf05..86c4db7a185dc 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanIntsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock } public BooleanVector eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(LessThan.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanKeywordsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanKeywordsEvaluator.java index 774571f139076..9ac90d754315a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanKeywordsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanKeywordsEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -74,7 +74,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBloc } public BooleanVector eval(int positionCount, BytesRefVector lhsVector, BytesRefVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanLongsEvaluator.java index 261240496bb51..991c61705fdec 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanLongsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlo } public BooleanVector eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(LessThan.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualDoublesEvaluator.java index 51295be798fd9..9d87cd2d2a83d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualDoublesEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rh } public BooleanVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(LessThanOrEqual.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualIntsEvaluator.java index c4f29438a6057..fe50109a776b4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualIntsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock } public BooleanVector eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(LessThanOrEqual.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualKeywordsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualKeywordsEvaluator.java index 7e46ceba0152a..d3626a390ca5a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualKeywordsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualKeywordsEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -74,7 +74,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBloc } public BooleanVector eval(int positionCount, BytesRefVector lhsVector, BytesRefVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualLongsEvaluator.java index 3a8187b345ead..b8d215d06e5d1 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/LessThanOrEqualLongsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlo } public BooleanVector eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(LessThanOrEqual.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsBoolsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsBoolsEvaluator.java index aea1620c63820..fd95c698600fa 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsBoolsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsBoolsEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BooleanBlock lhsBlock, BooleanBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public BooleanBlock eval(int positionCount, BooleanBlock lhsBlock, BooleanBlock } public BooleanVector eval(int positionCount, BooleanVector lhsVector, BooleanVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(NotEquals.processBools(lhsVector.getBoolean(p), rhsVector.getBoolean(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsDoublesEvaluator.java index d340c88223eec..582cdd4690c4a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsDoublesEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rh } public BooleanVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(NotEquals.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsIntsEvaluator.java index 7492140ea6e61..d8d794a0d065c 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsIntsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock } public BooleanVector eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(NotEquals.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsKeywordsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsKeywordsEvaluator.java index cac586f498e20..31db6c75c4b55 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsKeywordsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsKeywordsEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -74,7 +74,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock lhsBlock, BytesRefBloc } public BooleanVector eval(int positionCount, BytesRefVector lhsVector, BytesRefVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef lhsScratch = new BytesRef(); BytesRef rhsScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsLongsEvaluator.java index bad6c3cd2c552..44f8de9f7bbbf 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/comparison/NotEqualsLongsEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public BooleanBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlo } public BooleanVector eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(NotEquals.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/logical/NotEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/logical/NotEvaluator.java index 2a3fe4053cf3e..f7785bdc0605e 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/logical/NotEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/logical/NotEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BooleanBlock vBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public BooleanBlock eval(int positionCount, BooleanBlock vBlock) { } public BooleanVector eval(int positionCount, BooleanVector vVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(Not.process(vVector.getBoolean(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/regex/RegexMatchEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/regex/RegexMatchEvaluator.java index 89be94c494550..f3e09aec53a8e 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/regex/RegexMatchEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/evaluator/predicate/operator/regex/RegexMatchEvaluator.java @@ -49,7 +49,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock inputBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef inputScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (inputBlock.isNull(p) || inputBlock.getValueCount(p) != 1) { @@ -63,7 +63,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock inputBlock) { } public BooleanVector eval(int positionCount, BytesRefVector inputVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef inputScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(RegexMatch.process(inputVector.getBytesRef(p, inputScratch), pattern)); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestBooleanEvaluator.java index 7a46806c829dd..bfb80ec0727ce 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestBooleanEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BooleanBlock[] valuesBlocks) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { boolean[] valuesValues = new boolean[values.length]; position: for (int p = 0; p < positionCount; p++) { for (int i = 0; i < valuesBlocks.length; i++) { @@ -73,7 +73,7 @@ public BooleanBlock eval(int positionCount, BooleanBlock[] valuesBlocks) { } public BooleanVector eval(int positionCount, BooleanVector[] valuesVectors) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { boolean[] valuesValues = new boolean[values.length]; position: for (int p = 0; p < positionCount; p++) { // unpack valuesVectors into valuesValues diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestBytesRefEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestBytesRefEvaluator.java index c612f5573efc6..acc9e74910878 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestBytesRefEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestBytesRefEvaluator.java @@ -53,7 +53,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock[] valuesBlocks) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef[] valuesValues = new BytesRef[values.length]; BytesRef[] valuesScratch = new BytesRef[values.length]; for (int i = 0; i < values.length; i++) { @@ -78,7 +78,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock[] valuesBlocks) { } public BytesRefVector eval(int positionCount, BytesRefVector[] valuesVectors) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef[] valuesValues = new BytesRef[values.length]; BytesRef[] valuesScratch = new BytesRef[values.length]; for (int i = 0; i < values.length; i++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestDoubleEvaluator.java index 0963543e58030..7287e9a7a20ec 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestDoubleEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock[] valuesBlocks) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { double[] valuesValues = new double[values.length]; position: for (int p = 0; p < positionCount; p++) { for (int i = 0; i < valuesBlocks.length; i++) { @@ -73,7 +73,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock[] valuesBlocks) { } public DoubleVector eval(int positionCount, DoubleVector[] valuesVectors) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { double[] valuesValues = new double[values.length]; position: for (int p = 0; p < positionCount; p++) { // unpack valuesVectors into valuesValues diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestIntEvaluator.java index 15e2205ad9a97..e2afd0e010091 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestIntEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock[] valuesBlocks) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { int[] valuesValues = new int[values.length]; position: for (int p = 0; p < positionCount; p++) { for (int i = 0; i < valuesBlocks.length; i++) { @@ -73,7 +73,7 @@ public IntBlock eval(int positionCount, IntBlock[] valuesBlocks) { } public IntVector eval(int positionCount, IntVector[] valuesVectors) { - try(IntVector.Builder result = IntVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(IntVector.Builder result = driverContext.blockFactory().newIntVectorBuilder(positionCount)) { int[] valuesValues = new int[values.length]; position: for (int p = 0; p < positionCount; p++) { // unpack valuesVectors into valuesValues diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestLongEvaluator.java index 4f123e90edc07..5bb0e6185dca2 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/GreatestLongEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock[] valuesBlocks) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { long[] valuesValues = new long[values.length]; position: for (int p = 0; p < positionCount; p++) { for (int i = 0; i < valuesBlocks.length; i++) { @@ -73,7 +73,7 @@ public LongBlock eval(int positionCount, LongBlock[] valuesBlocks) { } public LongVector eval(int positionCount, LongVector[] valuesVectors) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { long[] valuesValues = new long[values.length]; position: for (int p = 0; p < positionCount; p++) { // unpack valuesVectors into valuesValues diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastBooleanEvaluator.java index 599eb46f34b2e..89f91035ae8b0 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastBooleanEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BooleanBlock[] valuesBlocks) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { boolean[] valuesValues = new boolean[values.length]; position: for (int p = 0; p < positionCount; p++) { for (int i = 0; i < valuesBlocks.length; i++) { @@ -73,7 +73,7 @@ public BooleanBlock eval(int positionCount, BooleanBlock[] valuesBlocks) { } public BooleanVector eval(int positionCount, BooleanVector[] valuesVectors) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { boolean[] valuesValues = new boolean[values.length]; position: for (int p = 0; p < positionCount; p++) { // unpack valuesVectors into valuesValues diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastBytesRefEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastBytesRefEvaluator.java index f689674d2c255..5e1d8e13926a5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastBytesRefEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastBytesRefEvaluator.java @@ -53,7 +53,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock[] valuesBlocks) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef[] valuesValues = new BytesRef[values.length]; BytesRef[] valuesScratch = new BytesRef[values.length]; for (int i = 0; i < values.length; i++) { @@ -78,7 +78,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock[] valuesBlocks) { } public BytesRefVector eval(int positionCount, BytesRefVector[] valuesVectors) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef[] valuesValues = new BytesRef[values.length]; BytesRef[] valuesScratch = new BytesRef[values.length]; for (int i = 0; i < values.length; i++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastDoubleEvaluator.java index 5103337411881..0f871cff8f80c 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastDoubleEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock[] valuesBlocks) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { double[] valuesValues = new double[values.length]; position: for (int p = 0; p < positionCount; p++) { for (int i = 0; i < valuesBlocks.length; i++) { @@ -73,7 +73,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock[] valuesBlocks) { } public DoubleVector eval(int positionCount, DoubleVector[] valuesVectors) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { double[] valuesValues = new double[values.length]; position: for (int p = 0; p < positionCount; p++) { // unpack valuesVectors into valuesValues diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastIntEvaluator.java index 8ed7ca24acb04..39a80b09d97e8 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastIntEvaluator.java @@ -51,7 +51,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock[] valuesBlocks) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { int[] valuesValues = new int[values.length]; position: for (int p = 0; p < positionCount; p++) { for (int i = 0; i < valuesBlocks.length; i++) { @@ -72,7 +72,7 @@ public IntBlock eval(int positionCount, IntBlock[] valuesBlocks) { } public IntVector eval(int positionCount, IntVector[] valuesVectors) { - try(IntVector.Builder result = IntVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(IntVector.Builder result = driverContext.blockFactory().newIntVectorBuilder(positionCount)) { int[] valuesValues = new int[values.length]; position: for (int p = 0; p < positionCount; p++) { // unpack valuesVectors into valuesValues diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastLongEvaluator.java index 28d8a8adc7942..bab58f9b42c24 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/conditional/LeastLongEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock[] valuesBlocks) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { long[] valuesValues = new long[values.length]; position: for (int p = 0; p < positionCount; p++) { for (int i = 0; i < valuesBlocks.length; i++) { @@ -73,7 +73,7 @@ public LongBlock eval(int positionCount, LongBlock[] valuesBlocks) { } public LongVector eval(int positionCount, LongVector[] valuesVectors) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { long[] valuesValues = new long[values.length]; position: for (int p = 0; p < positionCount; p++) { // unpack valuesVectors into valuesValues diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromDoubleEvaluator.java index 962ebc5aa5c3f..4463883b611d4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromDoubleEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBooleanBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBoolean(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBoolean(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static boolean evalValue(DoubleVector container, int index) { @@ -63,7 +64,7 @@ private static boolean evalValue(DoubleVector container, int index) { public Block evalBlock(Block b) { DoubleBlock block = (DoubleBlock) b; int positionCount = block.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromIntEvaluator.java index 620e4117b7c17..22c07e6e10f21 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromIntEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBooleanBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBoolean(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBoolean(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static boolean evalValue(IntVector container, int index) { @@ -63,7 +64,7 @@ private static boolean evalValue(IntVector container, int index) { public Block evalBlock(Block b) { IntBlock block = (IntBlock) b; int positionCount = block.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromLongEvaluator.java index b267399fe1f29..c9264d1ec5017 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromLongEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBooleanBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBoolean(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBoolean(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static boolean evalValue(LongVector container, int index) { @@ -63,7 +64,7 @@ private static boolean evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromStringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromStringEvaluator.java index abd51282e4f3e..5e68501d13418 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromStringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromStringEvaluator.java @@ -41,19 +41,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBooleanBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBoolean(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBoolean(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static boolean evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -65,7 +66,7 @@ private static boolean evalValue(BytesRefVector container, int index, BytesRef s public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromUnsignedLongEvaluator.java index 130ce5e5a7517..2924994f894b9 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToBooleanFromUnsignedLongEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBooleanBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBoolean(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBoolean(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static boolean evalValue(LongVector container, int index) { @@ -63,7 +64,7 @@ private static boolean evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDatetimeFromStringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDatetimeFromStringEvaluator.java index 8cc49cb6de969..fb663b0f20b4d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDatetimeFromStringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDatetimeFromStringEvaluator.java @@ -41,19 +41,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -65,7 +66,7 @@ private static long evalValue(BytesRefVector container, int index, BytesRef scra public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDegreesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDegreesEvaluator.java index 770c179e90363..8185f2a6e89b9 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDegreesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDegreesEvaluator.java @@ -38,19 +38,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantDoubleBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendDouble(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendDouble(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static double evalValue(DoubleVector container, int index) { @@ -62,7 +63,7 @@ private static double evalValue(DoubleVector container, int index) { public Block evalBlock(Block b) { DoubleBlock block = (DoubleBlock) b; int positionCount = block.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromBooleanEvaluator.java index b2b75e0dc74e3..163cd82c5943d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromBooleanEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantDoubleBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendDouble(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendDouble(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static double evalValue(BooleanVector container, int index) { @@ -63,7 +64,7 @@ private static double evalValue(BooleanVector container, int index) { public Block evalBlock(Block b) { BooleanBlock block = (BooleanBlock) b; int positionCount = block.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromIntEvaluator.java index 35894afb2ed70..4493b2ffabe50 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromIntEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantDoubleBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendDouble(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendDouble(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static double evalValue(IntVector container, int index) { @@ -63,7 +64,7 @@ private static double evalValue(IntVector container, int index) { public Block evalBlock(Block b) { IntBlock block = (IntBlock) b; int positionCount = block.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromLongEvaluator.java index 2e8fb850a3d89..d8d6a6499a623 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromLongEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantDoubleBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendDouble(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendDouble(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static double evalValue(LongVector container, int index) { @@ -63,7 +64,7 @@ private static double evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromStringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromStringEvaluator.java index 1109318c9246d..39e8d505bb4d7 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromStringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromStringEvaluator.java @@ -41,19 +41,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantDoubleBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendDouble(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendDouble(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static double evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -65,7 +66,7 @@ private static double evalValue(BytesRefVector container, int index, BytesRef sc public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromUnsignedLongEvaluator.java index 759568428441a..a5ff443f7e7f6 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToDoubleFromUnsignedLongEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantDoubleBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendDouble(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendDouble(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static double evalValue(LongVector container, int index) { @@ -63,7 +64,7 @@ private static double evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIPFromStringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIPFromStringEvaluator.java index bbbe89cd31879..8ed666bacc190 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIPFromStringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIPFromStringEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(BytesRefVector container, int index, BytesRef public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromBooleanEvaluator.java index e3fbc2750e35f..b4e36bd28a51b 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromBooleanEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantIntBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendInt(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendInt(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static int evalValue(BooleanVector container, int index) { @@ -63,7 +64,7 @@ private static int evalValue(BooleanVector container, int index) { public Block evalBlock(Block b) { BooleanBlock block = (BooleanBlock) b; int positionCount = block.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromDoubleEvaluator.java index e39ef77725d89..10820c83ac0c8 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromDoubleEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantIntBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendInt(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendInt(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static int evalValue(DoubleVector container, int index) { @@ -63,7 +64,7 @@ private static int evalValue(DoubleVector container, int index) { public Block evalBlock(Block b) { DoubleBlock block = (DoubleBlock) b; int positionCount = block.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromLongEvaluator.java index db8e818cb2031..bb713a5e7f483 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromLongEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantIntBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendInt(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendInt(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static int evalValue(LongVector container, int index) { @@ -63,7 +64,7 @@ private static int evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromStringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromStringEvaluator.java index 5dda74375ec0d..d6d577711db4e 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromStringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromStringEvaluator.java @@ -41,19 +41,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantIntBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendInt(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendInt(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static int evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -65,7 +66,7 @@ private static int evalValue(BytesRefVector container, int index, BytesRef scrat public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromUnsignedLongEvaluator.java index 64be1ad6a44dd..c4f26c73c352b 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToIntegerFromUnsignedLongEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantIntBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendInt(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendInt(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static int evalValue(LongVector container, int index) { @@ -63,7 +64,7 @@ private static int evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromBooleanEvaluator.java index 5337dbdb32d38..54cc1234ad737 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromBooleanEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(BooleanVector container, int index) { @@ -63,7 +64,7 @@ private static long evalValue(BooleanVector container, int index) { public Block evalBlock(Block b) { BooleanBlock block = (BooleanBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromDoubleEvaluator.java index 853882774550b..a78267bc8b4b0 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromDoubleEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(DoubleVector container, int index) { @@ -63,7 +64,7 @@ private static long evalValue(DoubleVector container, int index) { public Block evalBlock(Block b) { DoubleBlock block = (DoubleBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromIntEvaluator.java index 3717a2b2da2a8..0009214b8ee88 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromIntEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(IntVector container, int index) { @@ -63,7 +64,7 @@ private static long evalValue(IntVector container, int index) { public Block evalBlock(Block b) { IntBlock block = (IntBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromStringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromStringEvaluator.java index 49c82c93ccf92..b7007d88a4995 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromStringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromStringEvaluator.java @@ -41,19 +41,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -65,7 +66,7 @@ private static long evalValue(BytesRefVector container, int index, BytesRef scra public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromUnsignedLongEvaluator.java index 7f098b16edc7a..0d548ff9feff9 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToLongFromUnsignedLongEvaluator.java @@ -38,19 +38,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(LongVector container, int index) { @@ -62,7 +63,7 @@ private static long evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToRadiansEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToRadiansEvaluator.java index b470f96434f34..35c712a3c0b40 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToRadiansEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToRadiansEvaluator.java @@ -38,19 +38,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantDoubleBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendDouble(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendDouble(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static double evalValue(DoubleVector container, int index) { @@ -62,7 +63,7 @@ private static double evalValue(DoubleVector container, int index) { public Block evalBlock(Block b) { DoubleBlock block = (DoubleBlock) b; int positionCount = block.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromBooleanEvaluator.java index a11cccfe5d5be..f2b423e351f8e 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromBooleanEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(BooleanVector container, int index) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(BooleanVector container, int index) { public Block evalBlock(Block b) { BooleanBlock block = (BooleanBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromDatetimeEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromDatetimeEvaluator.java index 94f7357bc5917..c978ae8e1d6a4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromDatetimeEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromDatetimeEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(LongVector container, int index) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromDoubleEvaluator.java index d219f607d44f7..c6fd0435bc96f 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromDoubleEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(DoubleVector container, int index) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(DoubleVector container, int index) { public Block evalBlock(Block b) { DoubleBlock block = (DoubleBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromIPEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromIPEvaluator.java index 709e06844327c..96d7ab6601b4c 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromIPEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromIPEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(BytesRefVector container, int index, BytesRef public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromIntEvaluator.java index 659c92203f575..95b9cd70fba2b 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromIntEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(IntVector container, int index) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(IntVector container, int index) { public Block evalBlock(Block b) { IntBlock block = (IntBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromLongEvaluator.java index f54494cff5704..1a5f2fecdecf4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromLongEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(LongVector container, int index) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromUnsignedLongEvaluator.java index 76803d0684682..9650dbb5e47fd 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromUnsignedLongEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(LongVector container, int index) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromVersionEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromVersionEvaluator.java index 4866f68dae6d4..1c2a5a7a80b46 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromVersionEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToStringFromVersionEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(BytesRefVector container, int index, BytesRef public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromBooleanEvaluator.java index dff1819ac4f66..3386bbd4d808d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromBooleanEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(BooleanVector container, int index) { @@ -63,7 +64,7 @@ private static long evalValue(BooleanVector container, int index) { public Block evalBlock(Block b) { BooleanBlock block = (BooleanBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromDoubleEvaluator.java index 38bf437a5f720..d85fc923f0e5b 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromDoubleEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(DoubleVector container, int index) { @@ -63,7 +64,7 @@ private static long evalValue(DoubleVector container, int index) { public Block evalBlock(Block b) { DoubleBlock block = (DoubleBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromIntEvaluator.java index d395e37410b7a..595ed38f4f90e 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromIntEvaluator.java @@ -39,19 +39,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(IntVector container, int index) { @@ -63,7 +64,7 @@ private static long evalValue(IntVector container, int index) { public Block evalBlock(Block b) { IntBlock block = (IntBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromLongEvaluator.java index 398142981cbef..ec91840e2dbd0 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromLongEvaluator.java @@ -38,19 +38,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(LongVector container, int index) { @@ -62,7 +63,7 @@ private static long evalValue(LongVector container, int index) { public Block evalBlock(Block b) { LongBlock block = (LongBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); int start = block.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromStringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromStringEvaluator.java index 07e2ec42da7b8..1d53f0cde4936 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromStringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToUnsignedLongFromStringEvaluator.java @@ -41,19 +41,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantLongBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendLong(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendLong(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static long evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -65,7 +66,7 @@ private static long evalValue(BytesRefVector container, int index, BytesRef scra public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToVersionFromStringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToVersionFromStringEvaluator.java index 00f88ba76b3e7..14057b0010d93 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToVersionFromStringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/convert/ToVersionFromStringEvaluator.java @@ -40,19 +40,20 @@ public Block evalVector(Vector v) { return driverContext.blockFactory().newConstantBytesRefBlockWith(evalValue(vector, 0, scratchPad), positionCount); } catch (Exception e) { registerException(e); - return Block.constantNullBlock(positionCount, driverContext.blockFactory()); + return driverContext.blockFactory().newConstantNullBlock(positionCount); } } - BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory()); - for (int p = 0; p < positionCount; p++) { - try { - builder.appendBytesRef(evalValue(vector, p, scratchPad)); - } catch (Exception e) { - registerException(e); - builder.appendNull(); + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { + for (int p = 0; p < positionCount; p++) { + try { + builder.appendBytesRef(evalValue(vector, p, scratchPad)); + } catch (Exception e) { + registerException(e); + builder.appendNull(); + } } + return builder.build(); } - return builder.build(); } private static BytesRef evalValue(BytesRefVector container, int index, BytesRef scratchPad) { @@ -64,7 +65,7 @@ private static BytesRef evalValue(BytesRefVector container, int index, BytesRef public Block evalBlock(Block b) { BytesRefBlock block = (BytesRefBlock) b; int positionCount = block.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef scratchPad = new BytesRef(); for (int p = 0; p < positionCount; p++) { int valueCount = block.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateExtractConstantEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateExtractConstantEvaluator.java index c8c2d615d3b2d..5de2f3cf371f2 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateExtractConstantEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateExtractConstantEvaluator.java @@ -50,7 +50,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock valueBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valueBlock.isNull(p) || valueBlock.getValueCount(p) != 1) { result.appendNull(); @@ -63,7 +63,7 @@ public LongBlock eval(int positionCount, LongBlock valueBlock) { } public LongVector eval(int positionCount, LongVector valueVector) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(DateExtract.process(valueVector.getLong(p), chronoField, zone)); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateExtractEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateExtractEvaluator.java index 12f755e0b7a8a..7f024bab34c88 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateExtractEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateExtractEvaluator.java @@ -65,7 +65,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock valueBlock, BytesRefBlock chronoFieldBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef chronoFieldScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (valueBlock.isNull(p) || valueBlock.getValueCount(p) != 1) { @@ -89,7 +89,7 @@ public LongBlock eval(int positionCount, LongBlock valueBlock, BytesRefBlock chr public LongBlock eval(int positionCount, LongVector valueVector, BytesRefVector chronoFieldVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef chronoFieldScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { try { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatConstantEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatConstantEvaluator.java index 35a3d45be821d..bee94ff3e64af 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatConstantEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatConstantEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, LongBlock valBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -61,7 +61,7 @@ public BytesRefBlock eval(int positionCount, LongBlock valBlock) { } public BytesRefVector eval(int positionCount, LongVector valVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(DateFormat.process(valVector.getLong(p), formatter)); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatEvaluator.java index 95547c978af01..f84645a53ce82 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatEvaluator.java @@ -59,7 +59,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, LongBlock valBlock, BytesRefBlock formatterBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef formatterScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { @@ -78,7 +78,7 @@ public BytesRefBlock eval(int positionCount, LongBlock valBlock, BytesRefBlock f public BytesRefVector eval(int positionCount, LongVector valVector, BytesRefVector formatterVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef formatterScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(DateFormat.process(valVector.getLong(p), formatterVector.getBytesRef(p, formatterScratch), locale)); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateParseConstantEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateParseConstantEvaluator.java index 7fbd0cf387768..cf0f196321fb6 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateParseConstantEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateParseConstantEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, BytesRefBlock valBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { @@ -73,7 +73,7 @@ public LongBlock eval(int positionCount, BytesRefBlock valBlock) { } public LongBlock eval(int positionCount, BytesRefVector valVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { try { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateParseEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateParseEvaluator.java index 2a64bc27d79ba..3deff136d8cff 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateParseEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateParseEvaluator.java @@ -64,7 +64,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, BytesRefBlock valBlock, BytesRefBlock formatterBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); BytesRef formatterScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -89,7 +89,7 @@ public LongBlock eval(int positionCount, BytesRefBlock valBlock, BytesRefBlock f public LongBlock eval(int positionCount, BytesRefVector valVector, BytesRefVector formatterVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); BytesRef formatterScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateTruncEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateTruncEvaluator.java index 732b957d91c42..28e661e3900b1 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateTruncEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateTruncEvaluator.java @@ -46,7 +46,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock fieldValBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (fieldValBlock.isNull(p) || fieldValBlock.getValueCount(p) != 1) { result.appendNull(); @@ -59,7 +59,7 @@ public LongBlock eval(int positionCount, LongBlock fieldValBlock) { } public LongVector eval(int positionCount, LongVector fieldValVector) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(DateTrunc.process(fieldValVector.getLong(p), rounding)); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/NowEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/NowEvaluator.java index c68a04e5fad30..c257680f20f00 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/NowEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/date/NowEvaluator.java @@ -32,7 +32,7 @@ public Block.Ref eval(Page page) { } public LongVector eval(int positionCount) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(Now.process(now)); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/ip/CIDRMatchEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/ip/CIDRMatchEvaluator.java index 8b1b88b4b39f0..22fa3beb8c7e4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/ip/CIDRMatchEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/ip/CIDRMatchEvaluator.java @@ -65,7 +65,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock ipBlock, BytesRefBlock[] cidrsBlocks) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef ipScratch = new BytesRef(); BytesRef[] cidrsValues = new BytesRef[cidrs.length]; BytesRef[] cidrsScratch = new BytesRef[cidrs.length]; @@ -96,7 +96,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock ipBlock, BytesRefBlock public BooleanVector eval(int positionCount, BytesRefVector ipVector, BytesRefVector[] cidrsVectors) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef ipScratch = new BytesRef(); BytesRef[] cidrsValues = new BytesRef[cidrs.length]; BytesRef[] cidrsScratch = new BytesRef[cidrs.length]; diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsDoubleEvaluator.java index 0c475df2c1d1b..dbadd5adf963c 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsDoubleEvaluator.java @@ -42,7 +42,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock fieldValBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (fieldValBlock.isNull(p) || fieldValBlock.getValueCount(p) != 1) { result.appendNull(); @@ -55,7 +55,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock fieldValBlock) { } public DoubleVector eval(int positionCount, DoubleVector fieldValVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Abs.process(fieldValVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsIntEvaluator.java index 789113f780677..7cc0692e2481a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsIntEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock fieldValBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (fieldValBlock.isNull(p) || fieldValBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public IntBlock eval(int positionCount, IntBlock fieldValBlock) { } public IntVector eval(int positionCount, IntVector fieldValVector) { - try(IntVector.Builder result = IntVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(IntVector.Builder result = driverContext.blockFactory().newIntVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendInt(Abs.process(fieldValVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsLongEvaluator.java index 6c8a5597dec0a..0ffee4cc699f8 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AbsLongEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock fieldValBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (fieldValBlock.isNull(p) || fieldValBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public LongBlock eval(int positionCount, LongBlock fieldValBlock) { } public LongVector eval(int positionCount, LongVector fieldValVector) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(Abs.process(fieldValVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AcosEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AcosEvaluator.java index 56ffd31806ebb..b818cd2f8adfc 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AcosEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AcosEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -66,7 +66,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleBlock eval(int positionCount, DoubleVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Acos.process(valVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AsinEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AsinEvaluator.java index 466bffac10fd4..923f27dd275b5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AsinEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AsinEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -66,7 +66,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleBlock eval(int positionCount, DoubleVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Asin.process(valVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Atan2Evaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Atan2Evaluator.java index 2cceab1bbad2f..902a6eb0cc6a4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Atan2Evaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Atan2Evaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock yBlock, DoubleBlock xBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (yBlock.isNull(p) || yBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock yBlock, DoubleBlock xBloc } public DoubleVector eval(int positionCount, DoubleVector yVector, DoubleVector xVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Atan2.process(yVector.getDouble(p), xVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AtanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AtanEvaluator.java index 11a628ce473b8..14ef9ab1b0e30 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AtanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/AtanEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleVector eval(int positionCount, DoubleVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Atan.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToDoubleEvaluator.java index 2df190f80fbdf..330b0d73aaf13 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToDoubleEvaluator.java @@ -43,7 +43,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, IntBlock vBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -56,7 +56,7 @@ public DoubleBlock eval(int positionCount, IntBlock vBlock) { } public DoubleVector eval(int positionCount, IntVector vVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Cast.castIntToDouble(vVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToLongEvaluator.java index b45b02ec5cc7e..411203a0cf950 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToLongEvaluator.java @@ -43,7 +43,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, IntBlock vBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -56,7 +56,7 @@ public LongBlock eval(int positionCount, IntBlock vBlock) { } public LongVector eval(int positionCount, IntVector vVector) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(Cast.castIntToLong(vVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToUnsignedLongEvaluator.java index 2e9705cae6dd5..a79cb9be2d5eb 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastIntToUnsignedLongEvaluator.java @@ -44,7 +44,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, IntBlock vBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -57,7 +57,7 @@ public LongBlock eval(int positionCount, IntBlock vBlock) { } public LongVector eval(int positionCount, IntVector vVector) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(Cast.castIntToUnsignedLong(vVector.getInt(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastLongToDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastLongToDoubleEvaluator.java index f182dbd9da4ff..92e85a7214afe 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastLongToDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastLongToDoubleEvaluator.java @@ -44,7 +44,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, LongBlock vBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -57,7 +57,7 @@ public DoubleBlock eval(int positionCount, LongBlock vBlock) { } public DoubleVector eval(int positionCount, LongVector vVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Cast.castLongToDouble(vVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastLongToUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastLongToUnsignedLongEvaluator.java index 0fdeea21abd3b..3d59ff67c21d1 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastLongToUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastLongToUnsignedLongEvaluator.java @@ -42,7 +42,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock vBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -55,7 +55,7 @@ public LongBlock eval(int positionCount, LongBlock vBlock) { } public LongVector eval(int positionCount, LongVector vVector) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(Cast.castLongToUnsignedLong(vVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastUnsignedLongToDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastUnsignedLongToDoubleEvaluator.java index ee97cd124ed17..c3b880b9bbdb5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastUnsignedLongToDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CastUnsignedLongToDoubleEvaluator.java @@ -44,7 +44,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, LongBlock vBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -57,7 +57,7 @@ public DoubleBlock eval(int positionCount, LongBlock vBlock) { } public DoubleVector eval(int positionCount, LongVector vVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Cast.castUnsignedLongToDouble(vVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CeilDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CeilDoubleEvaluator.java index cf0ef72b1fbda..9c63adc45b978 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CeilDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CeilDoubleEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleVector eval(int positionCount, DoubleVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Ceil.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CosEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CosEvaluator.java index f6201661fcaea..3b62f3f5e9a0e 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CosEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CosEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleVector eval(int positionCount, DoubleVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Cos.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CoshEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CoshEvaluator.java index 35115b4098dba..b5c461a2ee9b5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CoshEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/CoshEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -66,7 +66,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleBlock eval(int positionCount, DoubleVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Cosh.process(valVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/FloorDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/FloorDoubleEvaluator.java index db33a7247d045..bf5c32f816892 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/FloorDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/FloorDoubleEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleVector eval(int positionCount, DoubleVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Floor.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsFiniteEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsFiniteEvaluator.java index 4886ef5ab2a79..793cf4da31bb2 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsFiniteEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsFiniteEvaluator.java @@ -43,7 +43,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock valBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -56,7 +56,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock valBlock) { } public BooleanVector eval(int positionCount, DoubleVector valVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(IsFinite.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsInfiniteEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsInfiniteEvaluator.java index f59d1fff1cbc3..2522c4cd6a9fe 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsInfiniteEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsInfiniteEvaluator.java @@ -43,7 +43,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock valBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -56,7 +56,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock valBlock) { } public BooleanVector eval(int positionCount, DoubleVector valVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(IsInfinite.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsNaNEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsNaNEvaluator.java index 67d4b56a4155a..955ff8e5cd355 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsNaNEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/IsNaNEvaluator.java @@ -43,7 +43,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, DoubleBlock valBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -56,7 +56,7 @@ public BooleanBlock eval(int positionCount, DoubleBlock valBlock) { } public BooleanVector eval(int positionCount, DoubleVector valVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendBoolean(IsNaN.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10DoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10DoubleEvaluator.java index b65d16c496050..66d4a9dfc2e53 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10DoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10DoubleEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -66,7 +66,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleBlock eval(int positionCount, DoubleVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Log10.process(valVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10IntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10IntEvaluator.java index 5153df6cdef2a..c64ec2ceed680 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10IntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10IntEvaluator.java @@ -49,7 +49,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, IntBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -67,7 +67,7 @@ public DoubleBlock eval(int positionCount, IntBlock valBlock) { } public DoubleBlock eval(int positionCount, IntVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Log10.process(valVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10LongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10LongEvaluator.java index 3b8f3e5319a3b..b630b4b079bf7 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10LongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10LongEvaluator.java @@ -49,7 +49,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, LongBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -67,7 +67,7 @@ public DoubleBlock eval(int positionCount, LongBlock valBlock) { } public DoubleBlock eval(int positionCount, LongVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Log10.process(valVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10UnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10UnsignedLongEvaluator.java index baa1198f009ff..c5d690f3c0ad4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10UnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/Log10UnsignedLongEvaluator.java @@ -49,7 +49,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, LongBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -67,7 +67,7 @@ public DoubleBlock eval(int positionCount, LongBlock valBlock) { } public DoubleBlock eval(int positionCount, LongVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Log10.processUnsignedLong(valVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowDoubleEvaluator.java index 271b036f9dfdb..104385e0e51ef 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowDoubleEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock baseBlock, DoubleBlock exponentBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (baseBlock.isNull(p) || baseBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock baseBlock, DoubleBlock ex } public DoubleBlock eval(int positionCount, DoubleVector baseVector, DoubleVector exponentVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Pow.process(baseVector.getDouble(p), exponentVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowIntEvaluator.java index e6e36d9057286..f9d0842a1ab74 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowIntEvaluator.java @@ -59,7 +59,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, DoubleBlock baseBlock, DoubleBlock exponentBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (baseBlock.isNull(p) || baseBlock.getValueCount(p) != 1) { result.appendNull(); @@ -81,7 +81,7 @@ public IntBlock eval(int positionCount, DoubleBlock baseBlock, DoubleBlock expon } public IntBlock eval(int positionCount, DoubleVector baseVector, DoubleVector exponentVector) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendInt(Pow.processInt(baseVector.getDouble(p), exponentVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowLongEvaluator.java index f634f4305e623..1aba4fe7f0655 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/PowLongEvaluator.java @@ -59,7 +59,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, DoubleBlock baseBlock, DoubleBlock exponentBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (baseBlock.isNull(p) || baseBlock.getValueCount(p) != 1) { result.appendNull(); @@ -81,7 +81,7 @@ public LongBlock eval(int positionCount, DoubleBlock baseBlock, DoubleBlock expo } public LongBlock eval(int positionCount, DoubleVector baseVector, DoubleVector exponentVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Pow.processLong(baseVector.getDouble(p), exponentVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundDoubleEvaluator.java index e9d602ff73cf4..0be1080fd8710 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundDoubleEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock, LongBlock decimalsBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock, LongBlock decim } public DoubleVector eval(int positionCount, DoubleVector valVector, LongVector decimalsVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Round.process(valVector.getDouble(p), decimalsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundDoubleNoDecimalsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundDoubleNoDecimalsEvaluator.java index 0d94d317ea748..e9b486acf110a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundDoubleNoDecimalsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundDoubleNoDecimalsEvaluator.java @@ -42,7 +42,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -55,7 +55,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleVector eval(int positionCount, DoubleVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Round.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundIntEvaluator.java index 737055262ac5c..a6a410aa94938 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundIntEvaluator.java @@ -54,7 +54,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock valBlock, LongBlock decimalsBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public IntBlock eval(int positionCount, IntBlock valBlock, LongBlock decimalsBlo } public IntVector eval(int positionCount, IntVector valVector, LongVector decimalsVector) { - try(IntVector.Builder result = IntVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(IntVector.Builder result = driverContext.blockFactory().newIntVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendInt(Round.process(valVector.getInt(p), decimalsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundLongEvaluator.java index 79311138e3333..5053e92935a82 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundLongEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock valBlock, LongBlock decimalsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public LongBlock eval(int positionCount, LongBlock valBlock, LongBlock decimalsB } public LongVector eval(int positionCount, LongVector valVector, LongVector decimalsVector) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(Round.process(valVector.getLong(p), decimalsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundUnsignedLongEvaluator.java index d3487fb3215fb..56dcca6ae9420 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/RoundUnsignedLongEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock valBlock, LongBlock decimalsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public LongBlock eval(int positionCount, LongBlock valBlock, LongBlock decimalsB } public LongVector eval(int positionCount, LongVector valVector, LongVector decimalsVector) { - try(LongVector.Builder result = LongVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(LongVector.Builder result = driverContext.blockFactory().newLongVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendLong(Round.processUnsignedLong(valVector.getLong(p), decimalsVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SinEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SinEvaluator.java index b01800662c1a0..4f146c8380d2b 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SinEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SinEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleVector eval(int positionCount, DoubleVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Sin.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SinhEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SinhEvaluator.java index 751b32dbe839d..96c1c054b1063 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SinhEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SinhEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -66,7 +66,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleBlock eval(int positionCount, DoubleVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Sinh.process(valVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtDoubleEvaluator.java index 4f13a19c62084..9674ff97de891 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtDoubleEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -66,7 +66,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleBlock eval(int positionCount, DoubleVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Sqrt.process(valVector.getDouble(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtIntEvaluator.java index db6f173ae839a..e7407c8aa43c8 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtIntEvaluator.java @@ -49,7 +49,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, IntBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -67,7 +67,7 @@ public DoubleBlock eval(int positionCount, IntBlock valBlock) { } public DoubleBlock eval(int positionCount, IntVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Sqrt.process(valVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtLongEvaluator.java index 3ff2dce06dad7..4ed28f4fc6735 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtLongEvaluator.java @@ -49,7 +49,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, LongBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -67,7 +67,7 @@ public DoubleBlock eval(int positionCount, LongBlock valBlock) { } public DoubleBlock eval(int positionCount, LongVector valVector) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendDouble(Sqrt.process(valVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtUnsignedLongEvaluator.java index 372b0f794dad8..b01d1a8eea222 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/SqrtUnsignedLongEvaluator.java @@ -44,7 +44,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, LongBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -57,7 +57,7 @@ public DoubleBlock eval(int positionCount, LongBlock valBlock) { } public DoubleVector eval(int positionCount, LongVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Sqrt.processUnsignedLong(valVector.getLong(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/TanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/TanEvaluator.java index 57628ab0f1e47..8b499e9be1c35 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/TanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/TanEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleVector eval(int positionCount, DoubleVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Tan.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/TanhEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/TanhEvaluator.java index 89e5406455ec5..605cb38492b5a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/TanhEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/math/TanhEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock valBlock) { } public DoubleVector eval(int positionCount, DoubleVector valVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Tanh.process(valVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgDoubleEvaluator.java index 58081a25c1e69..e533eb6dd5f33 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgDoubleEvaluator.java @@ -38,7 +38,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -68,7 +68,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgIntEvaluator.java index eb807984feb7a..5b55cb44072b5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgIntEvaluator.java @@ -39,7 +39,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -75,7 +75,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -107,7 +107,7 @@ public Block.Ref evalSingleValuedNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -134,7 +134,7 @@ public Block.Ref evalSingleValuedNotNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgLongEvaluator.java index a81ec98c8d3e4..21f40e02e92ff 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgLongEvaluator.java @@ -39,7 +39,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -75,7 +75,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -107,7 +107,7 @@ public Block.Ref evalSingleValuedNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -134,7 +134,7 @@ public Block.Ref evalSingleValuedNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgUnsignedLongEvaluator.java index 3700872c98e42..92ebb14d9a29d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvAvgUnsignedLongEvaluator.java @@ -40,7 +40,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -76,7 +76,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -108,7 +108,7 @@ public Block.Ref evalSingleValuedNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -135,7 +135,7 @@ public Block.Ref evalSingleValuedNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxBooleanEvaluator.java index c3e7c600f259f..7aee385dc4c44 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxBooleanEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { BooleanBlock v = (BooleanBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -74,7 +74,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { BooleanBlock v = (BooleanBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BooleanVector.FixedBuilder builder = BooleanVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanVector.FixedBuilder builder = driverContext.blockFactory().newBooleanVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); @@ -99,7 +99,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { BooleanBlock v = (BooleanBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -123,7 +123,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { BooleanBlock v = (BooleanBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BooleanVector.FixedBuilder builder = BooleanVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanVector.FixedBuilder builder = driverContext.blockFactory().newBooleanVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxBytesRefEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxBytesRefEvaluator.java index 0a125eaa9a579..b88b2641952d7 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxBytesRefEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxBytesRefEvaluator.java @@ -42,7 +42,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { BytesRefBlock v = (BytesRefBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef firstScratch = new BytesRef(); BytesRef nextScratch = new BytesRef(); for (int p = 0; p < positionCount; p++) { @@ -77,7 +77,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { BytesRefBlock v = (BytesRefBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BytesRefVector.Builder builder = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefVector.Builder builder = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef firstScratch = new BytesRef(); BytesRef nextScratch = new BytesRef(); for (int p = 0; p < positionCount; p++) { @@ -104,7 +104,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { BytesRefBlock v = (BytesRefBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef firstScratch = new BytesRef(); BytesRef nextScratch = new BytesRef(); for (int p = 0; p < positionCount; p++) { @@ -130,7 +130,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { BytesRefBlock v = (BytesRefBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BytesRefVector.Builder builder = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefVector.Builder builder = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef firstScratch = new BytesRef(); BytesRef nextScratch = new BytesRef(); for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxDoubleEvaluator.java index 7912cb7f5ce5c..cdbca7f534cf3 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxDoubleEvaluator.java @@ -40,7 +40,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -73,7 +73,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); @@ -98,7 +98,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -122,7 +122,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxIntEvaluator.java index b42ec323fe7f8..a670bb5e43044 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxIntEvaluator.java @@ -40,7 +40,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -73,7 +73,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntVector.FixedBuilder builder = IntVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (IntVector.FixedBuilder builder = driverContext.blockFactory().newIntVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); @@ -98,7 +98,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -122,7 +122,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntVector.FixedBuilder builder = IntVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (IntVector.FixedBuilder builder = driverContext.blockFactory().newIntVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxLongEvaluator.java index baaf5e49a3fa0..5b713429785f0 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMaxLongEvaluator.java @@ -40,7 +40,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -73,7 +73,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongVector.FixedBuilder builder = LongVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (LongVector.FixedBuilder builder = driverContext.blockFactory().newLongVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); @@ -98,7 +98,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -122,7 +122,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongVector.FixedBuilder builder = LongVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (LongVector.FixedBuilder builder = driverContext.blockFactory().newLongVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianDoubleEvaluator.java index b8f122e99db0f..7049c6a10e0e1 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianDoubleEvaluator.java @@ -38,7 +38,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { MvMedian.Doubles work = new MvMedian.Doubles(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -68,7 +68,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { MvMedian.Doubles work = new MvMedian.Doubles(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianIntEvaluator.java index 08e351c6c0122..1b9d2bfcdc642 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianIntEvaluator.java @@ -40,7 +40,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { MvMedian.Ints work = new MvMedian.Ints(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -73,7 +73,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntVector.FixedBuilder builder = IntVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (IntVector.FixedBuilder builder = driverContext.blockFactory().newIntVectorFixedBuilder(positionCount)) { MvMedian.Ints work = new MvMedian.Ints(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -98,7 +98,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { MvMedian.Ints work = new MvMedian.Ints(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -122,7 +122,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntVector.FixedBuilder builder = IntVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (IntVector.FixedBuilder builder = driverContext.blockFactory().newIntVectorFixedBuilder(positionCount)) { MvMedian.Ints work = new MvMedian.Ints(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianLongEvaluator.java index 76bdea1ce761e..6a2221366ea38 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianLongEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { MvMedian.Longs work = new MvMedian.Longs(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -74,7 +74,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongVector.FixedBuilder builder = LongVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (LongVector.FixedBuilder builder = driverContext.blockFactory().newLongVectorFixedBuilder(positionCount)) { MvMedian.Longs work = new MvMedian.Longs(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -99,7 +99,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { MvMedian.Longs work = new MvMedian.Longs(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -123,7 +123,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongVector.FixedBuilder builder = LongVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (LongVector.FixedBuilder builder = driverContext.blockFactory().newLongVectorFixedBuilder(positionCount)) { MvMedian.Longs work = new MvMedian.Longs(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianUnsignedLongEvaluator.java index 23191d6a64ca1..3864d0253ba5f 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMedianUnsignedLongEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { MvMedian.Longs work = new MvMedian.Longs(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -74,7 +74,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongVector.FixedBuilder builder = LongVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (LongVector.FixedBuilder builder = driverContext.blockFactory().newLongVectorFixedBuilder(positionCount)) { MvMedian.Longs work = new MvMedian.Longs(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -99,7 +99,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { MvMedian.Longs work = new MvMedian.Longs(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -123,7 +123,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongVector.FixedBuilder builder = LongVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (LongVector.FixedBuilder builder = driverContext.blockFactory().newLongVectorFixedBuilder(positionCount)) { MvMedian.Longs work = new MvMedian.Longs(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinBooleanEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinBooleanEvaluator.java index 0935a2f28569c..032607382ae6b 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinBooleanEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinBooleanEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { BooleanBlock v = (BooleanBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -74,7 +74,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { BooleanBlock v = (BooleanBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BooleanVector.FixedBuilder builder = BooleanVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanVector.FixedBuilder builder = driverContext.blockFactory().newBooleanVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); @@ -99,7 +99,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { BooleanBlock v = (BooleanBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BooleanBlock.Builder builder = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanBlock.Builder builder = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -123,7 +123,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { BooleanBlock v = (BooleanBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BooleanVector.FixedBuilder builder = BooleanVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (BooleanVector.FixedBuilder builder = driverContext.blockFactory().newBooleanVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinBytesRefEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinBytesRefEvaluator.java index cdc54a1f73990..05d792775af1d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinBytesRefEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinBytesRefEvaluator.java @@ -42,7 +42,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { BytesRefBlock v = (BytesRefBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef firstScratch = new BytesRef(); BytesRef nextScratch = new BytesRef(); for (int p = 0; p < positionCount; p++) { @@ -77,7 +77,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { BytesRefBlock v = (BytesRefBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BytesRefVector.Builder builder = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefVector.Builder builder = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef firstScratch = new BytesRef(); BytesRef nextScratch = new BytesRef(); for (int p = 0; p < positionCount; p++) { @@ -104,7 +104,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { BytesRefBlock v = (BytesRefBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BytesRefBlock.Builder builder = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefBlock.Builder builder = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef firstScratch = new BytesRef(); BytesRef nextScratch = new BytesRef(); for (int p = 0; p < positionCount; p++) { @@ -130,7 +130,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { BytesRefBlock v = (BytesRefBlock) ref.block(); int positionCount = v.getPositionCount(); - try (BytesRefVector.Builder builder = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try (BytesRefVector.Builder builder = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef firstScratch = new BytesRef(); BytesRef nextScratch = new BytesRef(); for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinDoubleEvaluator.java index ec3129cfd11be..9652d869e0726 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinDoubleEvaluator.java @@ -40,7 +40,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -73,7 +73,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); @@ -98,7 +98,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -122,7 +122,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinIntEvaluator.java index 58579ae9b0f91..ff52d235cecc5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinIntEvaluator.java @@ -40,7 +40,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -73,7 +73,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntVector.FixedBuilder builder = IntVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (IntVector.FixedBuilder builder = driverContext.blockFactory().newIntVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); @@ -98,7 +98,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -122,7 +122,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntVector.FixedBuilder builder = IntVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (IntVector.FixedBuilder builder = driverContext.blockFactory().newIntVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinLongEvaluator.java index 89ecd6f5fcafc..b940eead096a4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvMinLongEvaluator.java @@ -40,7 +40,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -73,7 +73,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongVector.FixedBuilder builder = LongVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (LongVector.FixedBuilder builder = driverContext.blockFactory().newLongVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); @@ -98,7 +98,7 @@ private Block.Ref evalAscendingNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { @@ -122,7 +122,7 @@ private Block.Ref evalAscendingNotNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongVector.FixedBuilder builder = LongVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (LongVector.FixedBuilder builder = driverContext.blockFactory().newLongVectorFixedBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); int first = v.getFirstValueIndex(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumDoubleEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumDoubleEvaluator.java index 53e07d01b37dc..d5d29942491c6 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumDoubleEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumDoubleEvaluator.java @@ -38,7 +38,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleBlock.Builder builder = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleBlock.Builder builder = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); @@ -68,7 +68,7 @@ public Block.Ref evalNotNullable(Block.Ref ref) { try (ref) { DoubleBlock v = (DoubleBlock) ref.block(); int positionCount = v.getPositionCount(); - try (DoubleVector.FixedBuilder builder = DoubleVector.newVectorFixedBuilder(positionCount, driverContext.blockFactory())) { + try (DoubleVector.FixedBuilder builder = driverContext.blockFactory().newDoubleVectorFixedBuilder(positionCount)) { CompensatedSum work = new CompensatedSum(); for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumIntEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumIntEvaluator.java index 97dabfe927507..8375a303eb7cb 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumIntEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumIntEvaluator.java @@ -43,7 +43,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { IntBlock v = (IntBlock) ref.block(); int positionCount = v.getPositionCount(); - try (IntBlock.Builder builder = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (IntBlock.Builder builder = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumLongEvaluator.java index dbdeca3d5d3e3..625c3756bb5af 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumLongEvaluator.java @@ -43,7 +43,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumUnsignedLongEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumUnsignedLongEvaluator.java index d92e61744a89d..407b0be54b4a5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumUnsignedLongEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSumUnsignedLongEvaluator.java @@ -43,7 +43,7 @@ public Block.Ref evalNullable(Block.Ref ref) { try (ref) { LongBlock v = (LongBlock) ref.block(); int positionCount = v.getPositionCount(); - try (LongBlock.Builder builder = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try (LongBlock.Builder builder = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { for (int p = 0; p < positionCount; p++) { int valueCount = v.getValueCount(p); if (valueCount == 0) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ConcatEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ConcatEvaluator.java index 70b9f19715879..bb935ac2e91c6 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ConcatEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ConcatEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock[] valuesBlocks) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef[] valuesValues = new BytesRef[values.length]; BytesRef[] valuesScratch = new BytesRef[values.length]; for (int i = 0; i < values.length; i++) { @@ -83,7 +83,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock[] valuesBlocks) { } public BytesRefVector eval(int positionCount, BytesRefVector[] valuesVectors) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef[] valuesValues = new BytesRef[values.length]; BytesRef[] valuesScratch = new BytesRef[values.length]; for (int i = 0; i < values.length; i++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/EndsWithEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/EndsWithEvaluator.java index a701cd81a5a4f..c0ac9f41fd99e 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/EndsWithEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/EndsWithEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBlock suffixBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef suffixScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -75,7 +75,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBloc public BooleanVector eval(int positionCount, BytesRefVector strVector, BytesRefVector suffixVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef suffixScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LTrimEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LTrimEvaluator.java index 27b2a10d4dc54..5df651e0013f4 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LTrimEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LTrimEvaluator.java @@ -42,7 +42,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock valBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { @@ -56,7 +56,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock valBlock) { } public BytesRefVector eval(int positionCount, BytesRefVector valVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(LTrim.process(valVector.getBytesRef(p, valScratch))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LeftEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LeftEvaluator.java index 3514f812ecfe1..35b4efc290bbf 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LeftEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LeftEvaluator.java @@ -64,7 +64,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, IntBlock lengthBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (strBlock.isNull(p) || strBlock.getValueCount(p) != 1) { @@ -82,7 +82,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, IntBlock le } public BytesRefVector eval(int positionCount, BytesRefVector strVector, IntVector lengthVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(Left.process(out, cp, strVector.getBytesRef(p, strScratch), lengthVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LengthEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LengthEvaluator.java index b91a2389c60fe..45d4438bec986 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LengthEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/LengthEvaluator.java @@ -44,7 +44,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, BytesRefBlock valBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { @@ -58,7 +58,7 @@ public IntBlock eval(int positionCount, BytesRefBlock valBlock) { } public IntVector eval(int positionCount, BytesRefVector valVector) { - try(IntVector.Builder result = IntVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(IntVector.Builder result = driverContext.blockFactory().newIntVectorBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendInt(Length.process(valVector.getBytesRef(p, valScratch))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/RTrimEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/RTrimEvaluator.java index 0cac1ac9380b3..86aa88b64bd8b 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/RTrimEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/RTrimEvaluator.java @@ -42,7 +42,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock valBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { @@ -56,7 +56,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock valBlock) { } public BytesRefVector eval(int positionCount, BytesRefVector valVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(RTrim.process(valVector.getBytesRef(p, valScratch))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ReplaceConstantEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ReplaceConstantEvaluator.java index 3baf32446ab4d..929ed6b9b0d45 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ReplaceConstantEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ReplaceConstantEvaluator.java @@ -63,7 +63,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBlock newStrBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef newStrScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -88,7 +88,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBlo public BytesRefBlock eval(int positionCount, BytesRefVector strVector, BytesRefVector newStrVector) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef newStrScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ReplaceEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ReplaceEvaluator.java index b2738d52b2383..9d742bd9fb7ef 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ReplaceEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/ReplaceEvaluator.java @@ -71,7 +71,7 @@ public Block.Ref eval(Page page) { public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBlock regexBlock, BytesRefBlock newStrBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef regexScratch = new BytesRef(); BytesRef newStrScratch = new BytesRef(); @@ -101,7 +101,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBlo public BytesRefBlock eval(int positionCount, BytesRefVector strVector, BytesRefVector regexVector, BytesRefVector newStrVector) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef regexScratch = new BytesRef(); BytesRef newStrScratch = new BytesRef(); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/RightEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/RightEvaluator.java index e8b70f1ad416c..a4e6083a26eb0 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/RightEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/RightEvaluator.java @@ -64,7 +64,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, IntBlock lengthBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (strBlock.isNull(p) || strBlock.getValueCount(p) != 1) { @@ -82,7 +82,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, IntBlock le } public BytesRefVector eval(int positionCount, BytesRefVector strVector, IntVector lengthVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(Right.process(out, cp, strVector.getBytesRef(p, strScratch), lengthVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SplitSingleByteEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SplitSingleByteEvaluator.java index 5a76c991b7d01..257fa867c5f2c 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SplitSingleByteEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SplitSingleByteEvaluator.java @@ -50,7 +50,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (strBlock.isNull(p) || strBlock.getValueCount(p) != 1) { @@ -64,7 +64,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock) { } public BytesRefBlock eval(int positionCount, BytesRefVector strVector) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { Split.process(result, strVector.getBytesRef(p, strScratch), delim, scratch); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SplitVariableEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SplitVariableEvaluator.java index a81d1485a7c57..4996cae1da7d3 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SplitVariableEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SplitVariableEvaluator.java @@ -57,7 +57,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBlock delimBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef delimScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -77,7 +77,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBlo public BytesRefBlock eval(int positionCount, BytesRefVector strVector, BytesRefVector delimVector) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef delimScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/StartsWithEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/StartsWithEvaluator.java index 752cc4b8ad946..7579b2aa2696d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/StartsWithEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/StartsWithEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BooleanBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBlock prefixBlock) { - try(BooleanBlock.Builder result = BooleanBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanBlock.Builder result = driverContext.blockFactory().newBooleanBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef prefixScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { @@ -75,7 +75,7 @@ public BooleanBlock eval(int positionCount, BytesRefBlock strBlock, BytesRefBloc public BooleanVector eval(int positionCount, BytesRefVector strVector, BytesRefVector prefixVector) { - try(BooleanVector.Builder result = BooleanVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BooleanVector.Builder result = driverContext.blockFactory().newBooleanVectorBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); BytesRef prefixScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SubstringEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SubstringEvaluator.java index 9079f0ea84f55..8b9b02ed7ec08 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SubstringEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SubstringEvaluator.java @@ -67,7 +67,7 @@ public Block.Ref eval(Page page) { public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, IntBlock startBlock, IntBlock lengthBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (strBlock.isNull(p) || strBlock.getValueCount(p) != 1) { @@ -90,7 +90,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, IntBlock st public BytesRefVector eval(int positionCount, BytesRefVector strVector, IntVector startVector, IntVector lengthVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(Substring.process(strVector.getBytesRef(p, strScratch), startVector.getInt(p), lengthVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SubstringNoLengthEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SubstringNoLengthEvaluator.java index 115162175e720..27d2465875dce 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SubstringNoLengthEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/SubstringNoLengthEvaluator.java @@ -55,7 +55,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, IntBlock startBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (strBlock.isNull(p) || strBlock.getValueCount(p) != 1) { @@ -73,7 +73,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock strBlock, IntBlock st } public BytesRefVector eval(int positionCount, BytesRefVector strVector, IntVector startVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef strScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(Substring.process(strVector.getBytesRef(p, strScratch), startVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/TrimEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/TrimEvaluator.java index 939715c718ef9..f9a6e19e5293a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/TrimEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/function/scalar/string/TrimEvaluator.java @@ -42,7 +42,7 @@ public Block.Ref eval(Page page) { } public BytesRefBlock eval(int positionCount, BytesRefBlock valBlock) { - try(BytesRefBlock.Builder result = BytesRefBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefBlock.Builder result = driverContext.blockFactory().newBytesRefBlockBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { if (valBlock.isNull(p) || valBlock.getValueCount(p) != 1) { @@ -56,7 +56,7 @@ public BytesRefBlock eval(int positionCount, BytesRefBlock valBlock) { } public BytesRefVector eval(int positionCount, BytesRefVector valVector) { - try(BytesRefVector.Builder result = BytesRefVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(BytesRefVector.Builder result = driverContext.blockFactory().newBytesRefVectorBuilder(positionCount)) { BytesRef valScratch = new BytesRef(); position: for (int p = 0; p < positionCount; p++) { result.appendBytesRef(Trim.process(valVector.getBytesRef(p, valScratch))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddDatetimesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddDatetimesEvaluator.java index 40e4513629b2f..d24c4700a2dde 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddDatetimesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddDatetimesEvaluator.java @@ -53,7 +53,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock datetimeBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (datetimeBlock.isNull(p) || datetimeBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public LongBlock eval(int positionCount, LongBlock datetimeBlock) { } public LongBlock eval(int positionCount, LongVector datetimeVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Add.processDatetimes(datetimeVector.getLong(p), temporalAmount)); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddDoublesEvaluator.java index 7f86fde38ec9b..1029295315ec3 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddDoublesEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhs } public DoubleVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Add.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddIntsEvaluator.java index 96c34aa79df9c..276a8d9c477b6 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddIntsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { } public IntBlock eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendInt(Add.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddLongsEvaluator.java index 9158d6f92373c..fc39808f7c2f1 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Add.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddUnsignedLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddUnsignedLongsEvaluator.java index 6e85e253856d2..0d8bae4fdb2d2 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddUnsignedLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/AddUnsignedLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Add.processUnsignedLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivDoublesEvaluator.java index 8bbce4faf25d1..4a7caa5a488d9 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivDoublesEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhs } public DoubleVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Div.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivIntsEvaluator.java index 87933d3ef26c2..4bb8c64959635 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivIntsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { } public IntBlock eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendInt(Div.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivLongsEvaluator.java index f23af932b61f3..133c6c9bc5503 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Div.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivUnsignedLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivUnsignedLongsEvaluator.java index 09de6b0c37527..af160626c730d 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivUnsignedLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/DivUnsignedLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Div.processUnsignedLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModDoublesEvaluator.java index 96888b6a6fcd1..f194c1f1a1fbb 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModDoublesEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhs } public DoubleVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Mod.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModIntsEvaluator.java index 047beb241ed70..2cac7f276c1ce 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModIntsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { } public IntBlock eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendInt(Mod.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModLongsEvaluator.java index 706ccee418465..37e2d31928ab9 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Mod.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModUnsignedLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModUnsignedLongsEvaluator.java index ede1fbce65458..97e386e1921af 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModUnsignedLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/ModUnsignedLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Mod.processUnsignedLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulDoublesEvaluator.java index df9105b9a5b16..d9f3ae0729c46 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulDoublesEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhs } public DoubleVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Mul.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulIntsEvaluator.java index f57fa9aa71612..b100f23023a43 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulIntsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { } public IntBlock eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendInt(Mul.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulLongsEvaluator.java index ce045a7be9d17..33fe21db3b478 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Mul.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulUnsignedLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulUnsignedLongsEvaluator.java index cd02f11c4a4fb..4f6df9f79786e 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulUnsignedLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/MulUnsignedLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Mul.processUnsignedLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegDoublesEvaluator.java index dbe3e02afeb0a..4705bd343547c 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegDoublesEvaluator.java @@ -41,7 +41,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock vBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -54,7 +54,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock vBlock) { } public DoubleVector eval(int positionCount, DoubleVector vVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Neg.processDoubles(vVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegIntsEvaluator.java index 908b0197d347e..8783f91eed95a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegIntsEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock vBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -66,7 +66,7 @@ public IntBlock eval(int positionCount, IntBlock vBlock) { } public IntBlock eval(int positionCount, IntVector vVector) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendInt(Neg.processInts(vVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegLongsEvaluator.java index 6a773e6eceba9..9f4dc7d8c9ed5 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/NegLongsEvaluator.java @@ -48,7 +48,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock vBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (vBlock.isNull(p) || vBlock.getValueCount(p) != 1) { result.appendNull(); @@ -66,7 +66,7 @@ public LongBlock eval(int positionCount, LongBlock vBlock) { } public LongBlock eval(int positionCount, LongVector vVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Neg.processLongs(vVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubDatetimesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubDatetimesEvaluator.java index b72bed55d0afb..ec8125ebde0ea 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubDatetimesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubDatetimesEvaluator.java @@ -53,7 +53,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock datetimeBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (datetimeBlock.isNull(p) || datetimeBlock.getValueCount(p) != 1) { result.appendNull(); @@ -71,7 +71,7 @@ public LongBlock eval(int positionCount, LongBlock datetimeBlock) { } public LongBlock eval(int positionCount, LongVector datetimeVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Sub.processDatetimes(datetimeVector.getLong(p), temporalAmount)); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubDoublesEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubDoublesEvaluator.java index 79b064b105c68..76c06dd137a18 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubDoublesEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubDoublesEvaluator.java @@ -52,7 +52,7 @@ public Block.Ref eval(Page page) { } public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhsBlock) { - try(DoubleBlock.Builder result = DoubleBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleBlock.Builder result = driverContext.blockFactory().newDoubleBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -69,7 +69,7 @@ public DoubleBlock eval(int positionCount, DoubleBlock lhsBlock, DoubleBlock rhs } public DoubleVector eval(int positionCount, DoubleVector lhsVector, DoubleVector rhsVector) { - try(DoubleVector.Builder result = DoubleVector.newVectorBuilder(positionCount, driverContext.blockFactory())) { + try(DoubleVector.Builder result = driverContext.blockFactory().newDoubleVectorBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { result.appendDouble(Sub.processDoubles(lhsVector.getDouble(p), rhsVector.getDouble(p))); } diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubIntsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubIntsEvaluator.java index 4cf1cf68abff2..842a8a5b42ea1 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubIntsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubIntsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public IntBlock eval(int positionCount, IntBlock lhsBlock, IntBlock rhsBlock) { } public IntBlock eval(int positionCount, IntVector lhsVector, IntVector rhsVector) { - try(IntBlock.Builder result = IntBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(IntBlock.Builder result = driverContext.blockFactory().newIntBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendInt(Sub.processInts(lhsVector.getInt(p), rhsVector.getInt(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubLongsEvaluator.java index 65ec31066e9db..79e2879f2861a 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Sub.processLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubUnsignedLongsEvaluator.java b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubUnsignedLongsEvaluator.java index 9879dcadc1239..c71855990c257 100644 --- a/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubUnsignedLongsEvaluator.java +++ b/x-pack/plugin/esql/src/main/java/generated/org/elasticsearch/xpack/esql/expression/predicate/operator/arithmetic/SubUnsignedLongsEvaluator.java @@ -58,7 +58,7 @@ public Block.Ref eval(Page page) { } public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { if (lhsBlock.isNull(p) || lhsBlock.getValueCount(p) != 1) { result.appendNull(); @@ -80,7 +80,7 @@ public LongBlock eval(int positionCount, LongBlock lhsBlock, LongBlock rhsBlock) } public LongBlock eval(int positionCount, LongVector lhsVector, LongVector rhsVector) { - try(LongBlock.Builder result = LongBlock.newBlockBuilder(positionCount, driverContext.blockFactory())) { + try(LongBlock.Builder result = driverContext.blockFactory().newLongBlockBuilder(positionCount)) { position: for (int p = 0; p < positionCount; p++) { try { result.appendLong(Sub.processUnsignedLongs(lhsVector.getLong(p), rhsVector.getLong(p))); diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java index be46b6c6e1797..5a01cfa11b3fd 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseLexer.java @@ -127,6 +127,7 @@ public Vocabulary getVocabulary() { } + @SuppressWarnings("this-escape") public EsqlBaseLexer(CharStream input) { super(input); _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java index 49d9abcc087c7..d136c346927e6 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java @@ -139,6 +139,7 @@ public Vocabulary getVocabulary() { @Override public ATN getATN() { return _ATN; } + @SuppressWarnings("this-escape") public EsqlBaseParser(TokenStream input) { super(input); _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); @@ -150,6 +151,7 @@ public QueryContext query() { return getRuleContext(QueryContext.class,0); } public TerminalNode EOF() { return getToken(EsqlBaseParser.EOF, 0); } + @SuppressWarnings("this-escape") public SingleStatementContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -194,11 +196,13 @@ public final SingleStatementContext singleStatement() throws RecognitionExceptio @SuppressWarnings("CheckReturnValue") public static class QueryContext extends ParserRuleContext { + @SuppressWarnings("this-escape") public QueryContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_query; } + @SuppressWarnings("this-escape") public QueryContext() { } public void copyFrom(QueryContext ctx) { super.copyFrom(ctx); @@ -213,6 +217,7 @@ public QueryContext query() { public ProcessingCommandContext processingCommand() { return getRuleContext(ProcessingCommandContext.class,0); } + @SuppressWarnings("this-escape") public CompositeQueryContext(QueryContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -233,6 +238,7 @@ public static class SingleCommandQueryContext extends QueryContext { public SourceCommandContext sourceCommand() { return getRuleContext(SourceCommandContext.class,0); } + @SuppressWarnings("this-escape") public SingleCommandQueryContext(QueryContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -324,6 +330,7 @@ public RowCommandContext rowCommand() { public ShowCommandContext showCommand() { return getRuleContext(ShowCommandContext.class,0); } + @SuppressWarnings("this-escape") public SourceCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -434,6 +441,7 @@ public EnrichCommandContext enrichCommand() { public MvExpandCommandContext mvExpandCommand() { return getRuleContext(MvExpandCommandContext.class,0); } + @SuppressWarnings("this-escape") public ProcessingCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -573,6 +581,7 @@ public static class WhereCommandContext extends ParserRuleContext { public BooleanExpressionContext booleanExpression() { return getRuleContext(BooleanExpressionContext.class,0); } + @SuppressWarnings("this-escape") public WhereCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -617,11 +626,13 @@ public final WhereCommandContext whereCommand() throws RecognitionException { @SuppressWarnings("CheckReturnValue") public static class BooleanExpressionContext extends ParserRuleContext { + @SuppressWarnings("this-escape") public BooleanExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_booleanExpression; } + @SuppressWarnings("this-escape") public BooleanExpressionContext() { } public void copyFrom(BooleanExpressionContext ctx) { super.copyFrom(ctx); @@ -633,6 +644,7 @@ public static class LogicalNotContext extends BooleanExpressionContext { public BooleanExpressionContext booleanExpression() { return getRuleContext(BooleanExpressionContext.class,0); } + @SuppressWarnings("this-escape") public LogicalNotContext(BooleanExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -653,6 +665,7 @@ public static class BooleanDefaultContext extends BooleanExpressionContext { public ValueExpressionContext valueExpression() { return getRuleContext(ValueExpressionContext.class,0); } + @SuppressWarnings("this-escape") public BooleanDefaultContext(BooleanExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -676,6 +689,7 @@ public ValueExpressionContext valueExpression() { public TerminalNode IS() { return getToken(EsqlBaseParser.IS, 0); } public TerminalNode NULL() { return getToken(EsqlBaseParser.NULL, 0); } public TerminalNode NOT() { return getToken(EsqlBaseParser.NOT, 0); } + @SuppressWarnings("this-escape") public IsNullContext(BooleanExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -696,6 +710,7 @@ public static class RegexExpressionContext extends BooleanExpressionContext { public RegexBooleanExpressionContext regexBooleanExpression() { return getRuleContext(RegexBooleanExpressionContext.class,0); } + @SuppressWarnings("this-escape") public RegexExpressionContext(BooleanExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -727,6 +742,7 @@ public ValueExpressionContext valueExpression(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public LogicalInContext(BooleanExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -755,6 +771,7 @@ public BooleanExpressionContext booleanExpression(int i) { } public TerminalNode AND() { return getToken(EsqlBaseParser.AND, 0); } public TerminalNode OR() { return getToken(EsqlBaseParser.OR, 0); } + @SuppressWarnings("this-escape") public LogicalBinaryContext(BooleanExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -958,6 +975,7 @@ public StringContext string() { } public TerminalNode NOT() { return getToken(EsqlBaseParser.NOT, 0); } public TerminalNode RLIKE() { return getToken(EsqlBaseParser.RLIKE, 0); } + @SuppressWarnings("this-escape") public RegexBooleanExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1042,11 +1060,13 @@ public final RegexBooleanExpressionContext regexBooleanExpression() throws Recog @SuppressWarnings("CheckReturnValue") public static class ValueExpressionContext extends ParserRuleContext { + @SuppressWarnings("this-escape") public ValueExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_valueExpression; } + @SuppressWarnings("this-escape") public ValueExpressionContext() { } public void copyFrom(ValueExpressionContext ctx) { super.copyFrom(ctx); @@ -1057,6 +1077,7 @@ public static class ValueExpressionDefaultContext extends ValueExpressionContext public OperatorExpressionContext operatorExpression() { return getRuleContext(OperatorExpressionContext.class,0); } + @SuppressWarnings("this-escape") public ValueExpressionDefaultContext(ValueExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1085,6 +1106,7 @@ public List operatorExpression() { public OperatorExpressionContext operatorExpression(int i) { return getRuleContext(OperatorExpressionContext.class,i); } + @SuppressWarnings("this-escape") public ComparisonContext(ValueExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1143,11 +1165,13 @@ public final ValueExpressionContext valueExpression() throws RecognitionExceptio @SuppressWarnings("CheckReturnValue") public static class OperatorExpressionContext extends ParserRuleContext { + @SuppressWarnings("this-escape") public OperatorExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_operatorExpression; } + @SuppressWarnings("this-escape") public OperatorExpressionContext() { } public void copyFrom(OperatorExpressionContext ctx) { super.copyFrom(ctx); @@ -1158,6 +1182,7 @@ public static class OperatorExpressionDefaultContext extends OperatorExpressionC public PrimaryExpressionContext primaryExpression() { return getRuleContext(PrimaryExpressionContext.class,0); } + @SuppressWarnings("this-escape") public OperatorExpressionDefaultContext(OperatorExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1189,6 +1214,7 @@ public OperatorExpressionContext operatorExpression(int i) { public TerminalNode PERCENT() { return getToken(EsqlBaseParser.PERCENT, 0); } public TerminalNode PLUS() { return getToken(EsqlBaseParser.PLUS, 0); } public TerminalNode MINUS() { return getToken(EsqlBaseParser.MINUS, 0); } + @SuppressWarnings("this-escape") public ArithmeticBinaryContext(OperatorExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1212,6 +1238,7 @@ public OperatorExpressionContext operatorExpression() { } public TerminalNode MINUS() { return getToken(EsqlBaseParser.MINUS, 0); } public TerminalNode PLUS() { return getToken(EsqlBaseParser.PLUS, 0); } + @SuppressWarnings("this-escape") public ArithmeticUnaryContext(OperatorExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1356,11 +1383,13 @@ private OperatorExpressionContext operatorExpression(int _p) throws RecognitionE @SuppressWarnings("CheckReturnValue") public static class PrimaryExpressionContext extends ParserRuleContext { + @SuppressWarnings("this-escape") public PrimaryExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_primaryExpression; } + @SuppressWarnings("this-escape") public PrimaryExpressionContext() { } public void copyFrom(PrimaryExpressionContext ctx) { super.copyFrom(ctx); @@ -1371,6 +1400,7 @@ public static class DereferenceContext extends PrimaryExpressionContext { public QualifiedNameContext qualifiedName() { return getRuleContext(QualifiedNameContext.class,0); } + @SuppressWarnings("this-escape") public DereferenceContext(PrimaryExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1391,6 +1421,7 @@ public static class ConstantDefaultContext extends PrimaryExpressionContext { public ConstantContext constant() { return getRuleContext(ConstantContext.class,0); } + @SuppressWarnings("this-escape") public ConstantDefaultContext(PrimaryExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1413,6 +1444,7 @@ public BooleanExpressionContext booleanExpression() { return getRuleContext(BooleanExpressionContext.class,0); } public TerminalNode RP() { return getToken(EsqlBaseParser.RP, 0); } + @SuppressWarnings("this-escape") public ParenthesizedExpressionContext(PrimaryExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1433,6 +1465,7 @@ public static class FunctionContext extends PrimaryExpressionContext { public FunctionExpressionContext functionExpression() { return getRuleContext(FunctionExpressionContext.class,0); } + @SuppressWarnings("this-escape") public FunctionContext(PrimaryExpressionContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -1523,6 +1556,7 @@ public BooleanExpressionContext booleanExpression(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public FunctionExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1625,6 +1659,7 @@ public static class RowCommandContext extends ParserRuleContext { public FieldsContext fields() { return getRuleContext(FieldsContext.class,0); } + @SuppressWarnings("this-escape") public RowCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1679,6 +1714,7 @@ public FieldContext field(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public FieldsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1747,6 +1783,7 @@ public QualifiedNameContext qualifiedName() { return getRuleContext(QualifiedNameContext.class,0); } public TerminalNode ASSIGN() { return getToken(EsqlBaseParser.ASSIGN, 0); } + @SuppressWarnings("this-escape") public FieldContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1820,6 +1857,7 @@ public TerminalNode COMMA(int i) { public MetadataContext metadata() { return getRuleContext(MetadataContext.class,0); } + @SuppressWarnings("this-escape") public FromCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1906,6 +1944,7 @@ public SourceIdentifierContext sourceIdentifier(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public MetadataContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -1975,6 +2014,7 @@ public static class EvalCommandContext extends ParserRuleContext { public FieldsContext fields() { return getRuleContext(FieldsContext.class,0); } + @SuppressWarnings("this-escape") public EvalCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2027,6 +2067,7 @@ public FieldsContext fields() { public GroupingContext grouping() { return getRuleContext(GroupingContext.class,0); } + @SuppressWarnings("this-escape") public StatsCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2099,6 +2140,7 @@ public FieldsContext fields() { public GroupingContext grouping() { return getRuleContext(GroupingContext.class,0); } + @SuppressWarnings("this-escape") public InlinestatsCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2165,6 +2207,7 @@ public QualifiedNameContext qualifiedName(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public GroupingContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2228,6 +2271,7 @@ public final GroupingContext grouping() throws RecognitionException { public static class SourceIdentifierContext extends ParserRuleContext { public TerminalNode SRC_UNQUOTED_IDENTIFIER() { return getToken(EsqlBaseParser.SRC_UNQUOTED_IDENTIFIER, 0); } public TerminalNode SRC_QUOTED_IDENTIFIER() { return getToken(EsqlBaseParser.SRC_QUOTED_IDENTIFIER, 0); } + @SuppressWarnings("this-escape") public SourceIdentifierContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2289,6 +2333,7 @@ public IdentifierContext identifier(int i) { public TerminalNode DOT(int i) { return getToken(EsqlBaseParser.DOT, i); } + @SuppressWarnings("this-escape") public QualifiedNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2352,6 +2397,7 @@ public final QualifiedNameContext qualifiedName() throws RecognitionException { public static class IdentifierContext extends ParserRuleContext { public TerminalNode UNQUOTED_IDENTIFIER() { return getToken(EsqlBaseParser.UNQUOTED_IDENTIFIER, 0); } public TerminalNode QUOTED_IDENTIFIER() { return getToken(EsqlBaseParser.QUOTED_IDENTIFIER, 0); } + @SuppressWarnings("this-escape") public IdentifierContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2403,11 +2449,13 @@ public final IdentifierContext identifier() throws RecognitionException { @SuppressWarnings("CheckReturnValue") public static class ConstantContext extends ParserRuleContext { + @SuppressWarnings("this-escape") public ConstantContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_constant; } + @SuppressWarnings("this-escape") public ConstantContext() { } public void copyFrom(ConstantContext ctx) { super.copyFrom(ctx); @@ -2427,6 +2475,7 @@ public BooleanValueContext booleanValue(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public BooleanArrayLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2447,6 +2496,7 @@ public static class DecimalLiteralContext extends ConstantContext { public DecimalValueContext decimalValue() { return getRuleContext(DecimalValueContext.class,0); } + @SuppressWarnings("this-escape") public DecimalLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2465,6 +2515,7 @@ public T accept(ParseTreeVisitor visitor) { @SuppressWarnings("CheckReturnValue") public static class NullLiteralContext extends ConstantContext { public TerminalNode NULL() { return getToken(EsqlBaseParser.NULL, 0); } + @SuppressWarnings("this-escape") public NullLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2486,6 +2537,7 @@ public IntegerValueContext integerValue() { return getRuleContext(IntegerValueContext.class,0); } public TerminalNode UNQUOTED_IDENTIFIER() { return getToken(EsqlBaseParser.UNQUOTED_IDENTIFIER, 0); } + @SuppressWarnings("this-escape") public QualifiedIntegerLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2515,6 +2567,7 @@ public StringContext string(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public StringArrayLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2535,6 +2588,7 @@ public static class StringLiteralContext extends ConstantContext { public StringContext string() { return getRuleContext(StringContext.class,0); } + @SuppressWarnings("this-escape") public StringLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2564,6 +2618,7 @@ public NumericValueContext numericValue(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public NumericArrayLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2582,6 +2637,7 @@ public T accept(ParseTreeVisitor visitor) { @SuppressWarnings("CheckReturnValue") public static class InputParamContext extends ConstantContext { public TerminalNode PARAM() { return getToken(EsqlBaseParser.PARAM, 0); } + @SuppressWarnings("this-escape") public InputParamContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2602,6 +2658,7 @@ public static class IntegerLiteralContext extends ConstantContext { public IntegerValueContext integerValue() { return getRuleContext(IntegerValueContext.class,0); } + @SuppressWarnings("this-escape") public IntegerLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2622,6 +2679,7 @@ public static class BooleanLiteralContext extends ConstantContext { public BooleanValueContext booleanValue() { return getRuleContext(BooleanValueContext.class,0); } + @SuppressWarnings("this-escape") public BooleanLiteralContext(ConstantContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -2805,6 +2863,7 @@ public final ConstantContext constant() throws RecognitionException { public static class LimitCommandContext extends ParserRuleContext { public TerminalNode LIMIT() { return getToken(EsqlBaseParser.LIMIT, 0); } public TerminalNode INTEGER_LITERAL() { return getToken(EsqlBaseParser.INTEGER_LITERAL, 0); } + @SuppressWarnings("this-escape") public LimitCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2860,6 +2919,7 @@ public OrderExpressionContext orderExpression(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public SortCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -2933,6 +2993,7 @@ public BooleanExpressionContext booleanExpression() { public TerminalNode DESC() { return getToken(EsqlBaseParser.DESC, 0); } public TerminalNode FIRST() { return getToken(EsqlBaseParser.FIRST, 0); } public TerminalNode LAST() { return getToken(EsqlBaseParser.LAST, 0); } + @SuppressWarnings("this-escape") public OrderExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3028,6 +3089,7 @@ public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } public TerminalNode PROJECT() { return getToken(EsqlBaseParser.PROJECT, 0); } + @SuppressWarnings("this-escape") public KeepCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3137,6 +3199,7 @@ public SourceIdentifierContext sourceIdentifier(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public DropCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3211,6 +3274,7 @@ public RenameClauseContext renameClause(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public RenameCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3283,6 +3347,7 @@ public List sourceIdentifier() { public SourceIdentifierContext sourceIdentifier(int i) { return getRuleContext(SourceIdentifierContext.class,i); } + @SuppressWarnings("this-escape") public RenameClauseContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3339,6 +3404,7 @@ public StringContext string() { public CommandOptionsContext commandOptions() { return getRuleContext(CommandOptionsContext.class,0); } + @SuppressWarnings("this-escape") public DissectCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3402,6 +3468,7 @@ public PrimaryExpressionContext primaryExpression() { public StringContext string() { return getRuleContext(StringContext.class,0); } + @SuppressWarnings("this-escape") public GrokCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3452,6 +3519,7 @@ public static class MvExpandCommandContext extends ParserRuleContext { public SourceIdentifierContext sourceIdentifier() { return getRuleContext(SourceIdentifierContext.class,0); } + @SuppressWarnings("this-escape") public MvExpandCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3506,6 +3574,7 @@ public CommandOptionContext commandOption(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public CommandOptionsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3574,6 +3643,7 @@ public IdentifierContext identifier() { public ConstantContext constant() { return getRuleContext(ConstantContext.class,0); } + @SuppressWarnings("this-escape") public CommandOptionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3622,6 +3692,7 @@ public final CommandOptionContext commandOption() throws RecognitionException { public static class BooleanValueContext extends ParserRuleContext { public TerminalNode TRUE() { return getToken(EsqlBaseParser.TRUE, 0); } public TerminalNode FALSE() { return getToken(EsqlBaseParser.FALSE, 0); } + @SuppressWarnings("this-escape") public BooleanValueContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3679,6 +3750,7 @@ public DecimalValueContext decimalValue() { public IntegerValueContext integerValue() { return getRuleContext(IntegerValueContext.class,0); } + @SuppressWarnings("this-escape") public NumericValueContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3737,6 +3809,7 @@ public static class DecimalValueContext extends ParserRuleContext { public TerminalNode DECIMAL_LITERAL() { return getToken(EsqlBaseParser.DECIMAL_LITERAL, 0); } public TerminalNode PLUS() { return getToken(EsqlBaseParser.PLUS, 0); } public TerminalNode MINUS() { return getToken(EsqlBaseParser.MINUS, 0); } + @SuppressWarnings("this-escape") public DecimalValueContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3801,6 +3874,7 @@ public static class IntegerValueContext extends ParserRuleContext { public TerminalNode INTEGER_LITERAL() { return getToken(EsqlBaseParser.INTEGER_LITERAL, 0); } public TerminalNode PLUS() { return getToken(EsqlBaseParser.PLUS, 0); } public TerminalNode MINUS() { return getToken(EsqlBaseParser.MINUS, 0); } + @SuppressWarnings("this-escape") public IntegerValueContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3863,6 +3937,7 @@ public final IntegerValueContext integerValue() throws RecognitionException { @SuppressWarnings("CheckReturnValue") public static class StringContext extends ParserRuleContext { public TerminalNode STRING() { return getToken(EsqlBaseParser.STRING, 0); } + @SuppressWarnings("this-escape") public StringContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3911,6 +3986,7 @@ public static class ComparisonOperatorContext extends ParserRuleContext { public TerminalNode LTE() { return getToken(EsqlBaseParser.LTE, 0); } public TerminalNode GT() { return getToken(EsqlBaseParser.GT, 0); } public TerminalNode GTE() { return getToken(EsqlBaseParser.GTE, 0); } + @SuppressWarnings("this-escape") public ComparisonOperatorContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -3966,6 +4042,7 @@ public static class ExplainCommandContext extends ParserRuleContext { public SubqueryExpressionContext subqueryExpression() { return getRuleContext(SubqueryExpressionContext.class,0); } + @SuppressWarnings("this-escape") public ExplainCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -4015,6 +4092,7 @@ public QueryContext query() { return getRuleContext(QueryContext.class,0); } public TerminalNode CLOSING_BRACKET() { return getToken(EsqlBaseParser.CLOSING_BRACKET, 0); } + @SuppressWarnings("this-escape") public SubqueryExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -4061,11 +4139,13 @@ public final SubqueryExpressionContext subqueryExpression() throws RecognitionEx @SuppressWarnings("CheckReturnValue") public static class ShowCommandContext extends ParserRuleContext { + @SuppressWarnings("this-escape") public ShowCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_showCommand; } + @SuppressWarnings("this-escape") public ShowCommandContext() { } public void copyFrom(ShowCommandContext ctx) { super.copyFrom(ctx); @@ -4075,6 +4155,7 @@ public void copyFrom(ShowCommandContext ctx) { public static class ShowInfoContext extends ShowCommandContext { public TerminalNode SHOW() { return getToken(EsqlBaseParser.SHOW, 0); } public TerminalNode INFO() { return getToken(EsqlBaseParser.INFO, 0); } + @SuppressWarnings("this-escape") public ShowInfoContext(ShowCommandContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -4094,6 +4175,7 @@ public T accept(ParseTreeVisitor visitor) { public static class ShowFunctionsContext extends ShowCommandContext { public TerminalNode SHOW() { return getToken(EsqlBaseParser.SHOW, 0); } public TerminalNode FUNCTIONS() { return getToken(EsqlBaseParser.FUNCTIONS, 0); } + @SuppressWarnings("this-escape") public ShowFunctionsContext(ShowCommandContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -4173,6 +4255,7 @@ public EnrichWithClauseContext enrichWithClause(int i) { public TerminalNode COMMA(int i) { return getToken(EsqlBaseParser.COMMA, i); } + @SuppressWarnings("this-escape") public EnrichCommandContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -4269,6 +4352,7 @@ public SourceIdentifierContext sourceIdentifier(int i) { return getRuleContext(SourceIdentifierContext.class,i); } public TerminalNode ASSIGN() { return getToken(EsqlBaseParser.ASSIGN, 0); } + @SuppressWarnings("this-escape") public EnrichWithClauseContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/NodeFakeAvailabilityZoneMapper.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/NodeFakeAvailabilityZoneMapper.java index 618db1da71ab8..108b7eaff06e3 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/NodeFakeAvailabilityZoneMapper.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/NodeFakeAvailabilityZoneMapper.java @@ -29,10 +29,12 @@ public class NodeFakeAvailabilityZoneMapper extends AbstractNodeAvailabilityZone private static final Logger logger = LogManager.getLogger(NodeFakeAvailabilityZoneMapper.class); + @SuppressWarnings("this-escape") public NodeFakeAvailabilityZoneMapper(Settings settings, ClusterSettings clusterSettings) { this(settings, clusterSettings, null); } + @SuppressWarnings("this-escape") public NodeFakeAvailabilityZoneMapper(Settings settings, ClusterSettings clusterSettings, DiscoveryNodes discoveryNodes) { super(settings, clusterSettings, discoveryNodes); updateNodesByAvailabilityZone(); diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/NodeRealAvailabilityZoneMapper.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/NodeRealAvailabilityZoneMapper.java index dfac0948087df..24da7d2e46563 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/NodeRealAvailabilityZoneMapper.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/autoscaling/NodeRealAvailabilityZoneMapper.java @@ -34,10 +34,12 @@ public class NodeRealAvailabilityZoneMapper extends AbstractNodeAvailabilityZone private volatile List awarenessAttributes; + @SuppressWarnings("this-escape") public NodeRealAvailabilityZoneMapper(Settings settings, ClusterSettings clusterSettings) { this(settings, clusterSettings, null); } + @SuppressWarnings("this-escape") public NodeRealAvailabilityZoneMapper(Settings settings, ClusterSettings clusterSettings, DiscoveryNodes discoveryNodes) { super(settings, clusterSettings, discoveryNodes); awarenessAttributes = AwarenessAllocationDecider.CLUSTER_ROUTING_ALLOCATION_AWARENESS_ATTRIBUTE_SETTING.get(settings); diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleDownsamplingSecurityIT.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleDownsamplingSecurityIT.java index cdddd0a5e5fe0..4b7a9f46431a5 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleDownsamplingSecurityIT.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleDownsamplingSecurityIT.java @@ -18,6 +18,7 @@ import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.action.datastreams.GetDataStreamAction; +import org.elasticsearch.action.datastreams.lifecycle.ErrorEntry; import org.elasticsearch.action.downsample.DownsampleConfig; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.support.WriteRequest; @@ -245,7 +246,10 @@ private Map collectErrorsFromStoreAsMap() { DataStreamLifecycleErrorStore errorStore = lifecycleService.getErrorStore(); List allIndices = errorStore.getAllIndices(); for (var index : allIndices) { - indicesAndErrors.put(index, errorStore.getError(index)); + ErrorEntry error = errorStore.getError(index); + if (error != null) { + indicesAndErrors.put(index, error.error()); + } } } return indicesAndErrors; diff --git a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java index 6e68557bae2e1..93cd03060842b 100644 --- a/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java +++ b/x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/integration/DataStreamLifecycleServiceRuntimeSecurityIT.java @@ -15,6 +15,7 @@ import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.action.datastreams.CreateDataStreamAction; import org.elasticsearch.action.datastreams.GetDataStreamAction; +import org.elasticsearch.action.datastreams.lifecycle.ErrorEntry; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.cluster.metadata.ComposableIndexTemplate; import org.elasticsearch.cluster.metadata.DataStream; @@ -169,7 +170,10 @@ private Map collectErrorsFromStoreAsMap() { DataStreamLifecycleErrorStore errorStore = lifecycleService.getErrorStore(); List allIndices = errorStore.getAllIndices(); for (var index : allIndices) { - indicesAndErrors.put(index, errorStore.getError(index)); + ErrorEntry error = errorStore.getError(index); + if (error != null) { + indicesAndErrors.put(index, error.error()); + } } } return indicesAndErrors; diff --git a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapper.java b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapper.java index b07b6da96833f..89b0c1c6ef922 100644 --- a/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapper.java +++ b/x-pack/plugin/spatial/src/main/java/org/elasticsearch/xpack/spatial/index/mapper/GeoShapeWithDocValuesFieldMapper.java @@ -125,6 +125,7 @@ public static class Builder extends FieldMapper.Builder { private final IndexVersion version; private final GeoFormatterFactory geoFormatterFactory; + @SuppressWarnings("this-escape") public Builder( String name, IndexVersion version,