Skip to content

ESQL: Remaining serialization tests#143470

Merged
nik9000 merged 2 commits intoelastic:mainfrom
nik9000:esql_serialization_test_2
Mar 3, 2026
Merged

ESQL: Remaining serialization tests#143470
nik9000 merged 2 commits intoelastic:mainfrom
nik9000:esql_serialization_test_2

Conversation

@nik9000
Copy link
Copy Markdown
Member

@nik9000 nik9000 commented Mar 3, 2026

This adds the remaining serialization tests. It makes a few production code changes:

  1. Registers TO_DATE_RANGE for serialization. It was serializable and not registered.
  2. Normalizes the serialization of SCORE and explains how it used to work. It was not broken but held together strangely.
  3. Replaces implementing SurrogateExpression with OnlySurrogateExpression in a few more cases so we don't expect serialization to work.
  4. Adds some package private accessors so we can refer to children by name in serialization tests.

This adds the remaining serialization tests. It makes a few production
code changes:
1. Registers `TO_DATE_RANGE` for serialization. It was serializable and
   not registered.
2. Normalizes the serialization of `SCORE` and explains how it used to
   work. It was not broken but held together strangely.
3. Replaces implementing `SurrogateExpression` with
   `OnlySurrogateExpression` in a few more cases so we don't expect
   serialization to work.
4. Adds some package private accessors so we can refer to children by
   name in serialization tests.
@nik9000 nik9000 added >test Issues or PRs that are addressing/adding tests :Analytics/ES|QL AKA ESQL v9.4.0 labels Mar 3, 2026
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Mar 3, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

protected AbsentOverTime create(Source source, Expression field, Expression filter, Expression window) {
return new AbsentOverTime(source, field, filter, window);
}
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The tests were mostly written by my borg intern.

Image

I've reviewed them and approve. But have another look please. If these are broken it's like poking holes in our safety netting. You won't notice until you fall.

* while working on something, but released stuff should not have an entry here.
*/
matchesList().item("org.elasticsearch.xpack.esql.expression.function.aggregate.AbsentOverTimeErrorTests is missing")
.item("org.elasticsearch.xpack.esql.expression.function.aggregate.AbsentOverTimeSerializationTests is missing")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice pile of serialization tests implemented. Thanks! We have to look at the error tests for these functions at some point.

Copy link
Copy Markdown
Contributor

@mouhc1ne mouhc1ne left a comment

Choose a reason for hiding this comment

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

LGTM.

@nik9000 nik9000 merged commit 3881eb5 into elastic:main Mar 3, 2026
35 checks passed
GalLalouche pushed a commit to GalLalouche/elasticsearch that referenced this pull request Mar 3, 2026
This adds the remaining serialization tests. It makes a few production
code changes:
1. Registers `TO_DATE_RANGE` for serialization. It was serializable and
   not registered.
2. Normalizes the serialization of `SCORE` and explains how it used to
   work. It was not broken but held together strangely.
3. Replaces implementing `SurrogateExpression` with
   `OnlySurrogateExpression` in a few more cases so we don't expect
   serialization to work.
4. Adds some package private accessors so we can refer to children by
   name in serialization tests.
szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 3, 2026
…locations

* upstream/main: (51 commits)
  ESQL: Remaining serialization tests (elastic#143470)
  Eagerly release resources in `TransportAwaitClusterStateVersionAppliedAction` (elastic#143477)
  Stop and relocate sliced reindex on shutdown (elastic#143183)
  Documentation for query_vector base64 parameter (elastic#142675)
  ES|QL: Fix LIMIT after all columns are dropped (elastic#143463)
  Update docs-build.yml (elastic#142958)
  Fix KnnIndexTester to work with byte vectors (elastic#143493)
  Fix IndexInputUtils.withSlice to produce native-safe MemorySegments on Java 21 (elastic#143479)
  CPS fix: include only relevant projects in the search response metadata (elastic#143367)
  apm-data: explicit map of timestamp.us to long (elastic#143173)
  [Inference API] Add custom headers for Azure OpenAI Service (elastic#142969)
  ESQL: Add name IDs to golden tests and fix synthetic names (elastic#143450)
  Add getUnavailableShards to BaseBroadcastResponse (elastic#143406)
  Add description to reindex API without sensitive info (elastic#143112)
  SQL: fix CLI tests (elastic#143451)
  ES|QL: Add note of future removal of FORK implicit LIMIT (elastic#143457)
  [Test] Randomly disable doc values skippers in time-series indices (elastic#143389)
  Improve pattern text downgrade license test (elastic#143102)
  [Transform] Stop transforms at the end of tests (elastic#139783)
  Mute org.elasticsearch.compute.lucene.read.ValueSourceReaderTypeConversionTests testLoadAll elastic#143471
  ...
shmuelhanoch pushed a commit to shmuelhanoch/elasticsearch that referenced this pull request Mar 4, 2026
This adds the remaining serialization tests. It makes a few production
code changes:
1. Registers `TO_DATE_RANGE` for serialization. It was serializable and
   not registered.
2. Normalizes the serialization of `SCORE` and explains how it used to
   work. It was not broken but held together strangely.
3. Replaces implementing `SurrogateExpression` with
   `OnlySurrogateExpression` in a few more cases so we don't expect
   serialization to work.
4. Adds some package private accessors so we can refer to children by
   name in serialization tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test Issues or PRs that are addressing/adding tests v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants