Skip to content

Skip time series field type merge for non-TS agg queries#143262

Merged
kkrik-es merged 3 commits intoelastic:mainfrom
kkrik-es:fix/merge-conflict-without-ts
Mar 2, 2026
Merged

Skip time series field type merge for non-TS agg queries#143262
kkrik-es merged 3 commits intoelastic:mainfrom
kkrik-es:fix/merge-conflict-without-ts

Conversation

@kkrik-es
Copy link
Copy Markdown
Contributor

Conflicting time series information is only relevant for time series aggregations. The rest of the queries can ignore this field.

The timeSeriesFieldType.merge check in IndexResolver.createField
could produce InvalidMappedField errors for queries that do not
use time series aggregation. This adds a hasTimeSeriesAggregation
flag to FieldsInfo, set by PreAnalyzer when a TimeSeriesAggregate
or PromqlCommand is present, so the merge is only enforced when
the query actually aggregates time series data.

Made-with: Cursor
@kkrik-es kkrik-es self-assigned this Feb 27, 2026
@kkrik-es kkrik-es added >enhancement Team:StorageEngine :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL labels Feb 27, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @kkrik-es, I've created a changelog YAML for you.

@kkrik-es kkrik-es requested a review from dnhatn February 27, 2026 16:09
@kkrik-es kkrik-es added auto-backport Automatically create backport pull requests when merged v9.3.2 labels Feb 27, 2026
@kkrik-es kkrik-es marked this pull request as ready for review February 27, 2026 16:10
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Copy Markdown
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

👍

@kkrik-es kkrik-es merged commit 762ff09 into elastic:main Mar 2, 2026
35 checks passed
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

💔 Backport failed

Status Branch Result
9.3 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 143262

szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 2, 2026
…locations

* upstream/main: (94 commits)
  Mute org.elasticsearch.xpack.esql.qa.mixed.EsqlClientYamlIT test {p0=esql/40_tsdb/TS Command grouping on text field} elastic#142544
  Mute org.elasticsearch.index.store.StoreDirectoryMetricsIT testDirectoryMetrics elastic#143419
  Mute org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT test elastic#143023
  TS_INFO information retrieval command (elastic#142721)
  ESQL: External source parallel execution and distribution (elastic#143349)
  Mute org.elasticsearch.index.mapper.blockloader.FlattenedFieldRootBlockLoaderTests testBlockLoaderForFieldInObject {preference=Params[syntheticSource=false, preference=DOC_VALUES]} elastic#143414
  Mute org.elasticsearch.index.mapper.blockloader.FlattenedFieldRootBlockLoaderTests testBlockLoaderForFieldInObject {preference=Params[syntheticSource=false, preference=NONE]} elastic#143413
  Mute org.elasticsearch.index.mapper.blockloader.FlattenedFieldRootBlockLoaderTests testBlockLoaderForFieldInObject {preference=Params[syntheticSource=false, preference=STORED]} elastic#143412
  Removing ingest random sampling (elastic#143289)
  Mute org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT test elastic#143023
  [Transform] Clean up internal tests (elastic#143246)
  Skip time series field type merge for non-TS agg queries (elastic#143262)
  Enable zero-copy SIMD vector scoring on searchable snapshots (frozen tier) (elastic#141718)
  Mute org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips elastic#143407
  Fix MemorySegmentUtilsTests (elastic#143391)
  Unmute testWorkflowsRestrictionAllowsAccess (elastic#143308)
  Cancel async query on expiry (elastic#143016)
  ESQL: Finish migrating error testing (elastic#143322)
  Reduce LuceneOperator.Status memory consumption with large QueryDSL queries (elastic#143175)
  ESQL: Generative testing with full text functions (elastic#142961)
  ...
@kkrik-es kkrik-es removed backport pending auto-backport Automatically create backport pull requests when merged v9.3.2 labels Mar 3, 2026
tballison pushed a commit to tballison/elasticsearch that referenced this pull request Mar 3, 2026
)

* Skip time series field type merge for non-TS queries

The timeSeriesFieldType.merge check in IndexResolver.createField
could produce InvalidMappedField errors for queries that do not
use time series aggregation. This adds a hasTimeSeriesAggregation
flag to FieldsInfo, set by PreAnalyzer when a TimeSeriesAggregate
or PromqlCommand is present, so the merge is only enforced when
the query actually aggregates time series data.

Made-with: Cursor

* Update docs/changelog/143262.yaml
@kkrik-es kkrik-es deleted the fix/merge-conflict-without-ts branch March 8, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL Team:StorageEngine v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants