Skip to content

Conversation

@idegtiarenko
Copy link
Contributor

Plan field resolution is fairly complex and occupies significant fraction of EsqlSession.
This change moves it into a separate component. It is already covered by unit tests previously checking EsqlSession::fieldNames

@idegtiarenko idegtiarenko requested a review from astefan July 24, 2025 13:19
@idegtiarenko idegtiarenko added >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :Analytics/ES|QL AKA ESQL v9.2.0 labels Jul 24, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I have two suggestions regarding naming.

import static org.hamcrest.Matchers.equalTo;

public class IndexResolverFieldNamesTests extends ESTestCase {
public class FieldNameResolverTests extends ESTestCase {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer not to have the class name changed. This is strictly related to IndexResolver's job.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets keep name of the test consistent with implementation it is testing


import static org.elasticsearch.xpack.esql.core.util.StringUtils.WILDCARD;

public class FieldNamesResolver {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name this FieldNamesUtils, it's not a resolver per se, but has static methods that define the logic.

@idegtiarenko idegtiarenko merged commit 4b4ee57 into elastic:main Jul 25, 2025
33 checks passed
@idegtiarenko idegtiarenko deleted the separate_field_resolution branch July 25, 2025 08:00
szybia added a commit to szybia/elasticsearch that referenced this pull request Jul 25, 2025
…king

* upstream/main: (90 commits)
  Register a blob cache long counter metric for total evicted regions (elastic#131862)
  Move plan attribute resolution to its own component (elastic#131830)
  Make restore support multi-project (elastic#131661)
  Use logically more correct expression (elastic#131869)
  [ES|QL] Change equals and hashcode for ConstantNullBlock (elastic#131817)
  Update `TransportVersion` to support a new model (elastic#131488)
  Correct slow log user for RCS 2.0 (elastic#130140)
  Revert "Remove 8.17 from dev branches"
  Mute org.elasticsearch.compute.aggregation.ValuesBytesRefGroupingAggregatorFunctionTests testSomeFiltered elastic#131878
  Remove 8.17 from dev branches
  Revert "CompressorFactory.compressor (elastic#131655)" (elastic#131866)
  Add fast path for single value in VALUES aggregator (elastic#130510)
  Resolve inference release tests failing due to missing feature flag  (elastic#131841)
  [Docs] Replace placeholder URLs (elastic#131309)
  CompressorFactory.compressor (elastic#131655)
  add availability info for speed loading setting (elastic#131714)
  [Logstash] Move `elastic_integration` plugin usage to ES logstash-bridge. (elastic#131486)
  Migrate x-pack-enrich legacy rest tests to new test framework (elastic#131743)
  Fix plugin example test failures due to deprecation warning (elastic#131819)
  Remove deprecated function isNotNullAndFoldable (elastic#130944)
  ...
szybia added a commit to szybia/elasticsearch that referenced this pull request Jul 25, 2025
…-tracking

* upstream/main: (106 commits)
  Pipelines: Add `created_date` and `modified_date` (elastic#130847)
  add thread pool change availability (elastic#131734)
  Add failure store availability info / and port over privileges (elastic#131729)
  add availability information for ssl handshake timeout settings (elastic#131786)
  add availability information for rescore_vector (elastic#131710)
  add availability to oversample value of 0 (elastic#131707)
  clarify hnsw filter heuristic setting availability (elastic#131715)
  add availability info for default heap dump path change (elastic#131713)
  clarify default algorithms per stack version (elastic#131728)
  Refine error messages in `Fork` for correctness and clarity. (elastic#131701)
  [ES|QL] Replace RoundTo linear search evaluator with manual evaluators (elastic#131733)
  ESQL: Fix buildParams in tests with --configuration-cache (elastic#131826)
  Unmute `CrossClusterEsqlRCS2EnrichUnavailableRemotesIT#testEsqlEnrichWithSkipUnavailable` (elastic#131916)
  Allow templates for `.chat-*` index template (elastic#131914)
  ESQL: Fix NPE on empty to_lower/to_upper call (elastic#131917)
  Fix score computation in ES91Int4VectorsScorer (elastic#131905)
  Register a blob cache long counter metric for total evicted regions (elastic#131862)
  Move plan attribute resolution to its own component (elastic#131830)
  Make restore support multi-project (elastic#131661)
  Use logically more correct expression (elastic#131869)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants