Skip to content

Conversation

@JonasKunz
Copy link
Contributor

Removes the feature flag for the exponential_histogram field mapper and ES|QL type.

@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v9.3.0 labels Dec 3, 2025
…tureflag

# Conflicts:
#	server/src/main/resources/transport/upper_bounds/9.3.csv
#	x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/plugin/EsqlCorePlugin.java
#	x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type/DataType.java
#	x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/MultiClusterSpecIT.java
#	x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/EsqlSpecIT.java
#	x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/EsqlSpecTestCase.java
#	x-pack/plugin/esql/qa/testFixtures/src/main/resources/exponential_histogram.csv-spec
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/TestCaseSupplier.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/AbstractLogicalPlanOptimizerTests.java
#	x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java
@JonasKunz JonasKunz force-pushed the exp-histo-remove-featureflag branch from 3e9b408 to 24782af Compare December 5, 2025 06:23
@JonasKunz JonasKunz added :StorageEngine/Mapping The storage related side of mappings :Analytics/ES|QL AKA ESQL >non-issue labels Dec 5, 2025
@JonasKunz JonasKunz marked this pull request as ready for review December 5, 2025 10:50
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:StorageEngine labels Dec 5, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

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

@JonasKunz JonasKunz requested review from kkrik-es and nik9000 December 5, 2025 10:51
Copy link
Contributor

@kkrik-es kkrik-es left a comment

Choose a reason for hiding this comment

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

Please wait for Nik too. You also need to update (separately):

https://www.elastic.co/docs/reference/query-languages/esql/limitations#_supported_types

@Before
public void setup() {
assumeTrue("Only when exponential_histogram feature flag is enabled", TDigestFieldMapper.TDIGEST_FIELD_MAPPER.isEnabled());
assumeTrue("Only when tdigest_field_mapper feature flag is enabled", TDigestFieldMapper.TDIGEST_FIELD_MAPPER.isEnabled());
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this was a type but it might be confusing now with this change, so I updated it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah looks like a copy-paste error, thanks for fixing!

Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Would you kindly, in a follow up, have a look at improving assertNumberOfCheckedSignatures some? I'd left it too prone to magic when I first wrote it. Sending the count and a limited list to the method would make it much less magic. In all of the cases we override this and assert the count we're looking for a count much less than, say, 50. Then we'd have the whole list to work with and it'd be easy to mark each unsupported signature as expected in some way.

* Is the type supported in indices?
*/
private static boolean supportedInIndex(DataType t) {
private static boolean supportedInIndex(DataType t, TransportVersion minimumVersion) {
Copy link
Member

Choose a reason for hiding this comment

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

👍

…tureflag

# Conflicts:
#	docs/reference/query-languages/esql/_snippets/functions/types/absent_over_time.md
#	docs/reference/query-languages/esql/_snippets/functions/types/present_over_time.md
#	server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java
#	server/src/main/resources/transport/upper_bounds/9.3.csv
Copy link
Contributor

@alex-spies alex-spies left a comment

Choose a reason for hiding this comment

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

The changes to DataType and AllSupportedFieldsTestCase look good to me!

// Enrich policies don't work with types that have mandatory fields in the mapping.
// https://github.com/elastic/elasticsearch/issues/127350
case AGGREGATE_METRIC_DOUBLE, SCALED_FLOAT,
case AGGREGATE_METRIC_DOUBLE, SCALED_FLOAT, EXPONENTIAL_HISTOGRAM,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a separate issue for ENRICH support for exponential_histogram that we could/should link here, or does #127350 extend to exponential_histogram?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no technical limitation on supporting exponential_histogram in ENRICH IINM, we just haven't implemented it yet.

I've created an issue to track this alongside with other language limitations this type currently has:
#139255

…tureflag

# Conflicts:
#	x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/type/DataType.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL external-contributor Pull request authored by a developer outside the Elasticsearch team >non-issue :StorageEngine/Mapping The storage related side of mappings Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:StorageEngine v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants