Skip to content

ES|QL Absent and AbsentOverTime functions#134475

Merged
leontyevdv merged 53 commits intoelastic:mainfrom
leontyevdv:feature/esql-absent-and-absent-over-time-functions
Sep 12, 2025
Merged

ES|QL Absent and AbsentOverTime functions#134475
leontyevdv merged 53 commits intoelastic:mainfrom
leontyevdv:feature/esql-absent-and-absent-over-time-functions

Conversation

@leontyevdv
Copy link
Contributor

Add two new ES|QL functions:

  • ABSENT checks for the absence of a field in the output result. Absence means that the input expression yields null values only or nothing.
  • ABSENT_OVER_TIME is similar to ABSENT, but is used to check the presence of values over a time series in the given field.

Closes #131069

leontyevdv and others added 30 commits September 2, 2025 15:45
Add a new ES|QL function that checks for the presence of a field in the
output result. Presence means that the input expression yields any
non-null value.

Part of elastic#131069
Add unit tests and documentation for the PRESENT function.

Part of elastic#131069
Clean-up of the PRESENT function.

Part of elastic#131069
# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
- Change intermediate state for using boolean
- Add unit tests for PresentAggregatorFunctionTests and
PresentGroupingAggregatorFunctionTests

Part of elastic#131069
- Add union_types csv tests

Part of elastic#131069
- Comment out TestLogging on CsvTests
- Add missing DataTypes to the function

Part of elastic#131069
- Optimize AggregatorFunctions

Part of elastic#131069
Add PRESENT_OVER_TIME ES|QL function.

Part of elastic#131069
Add PRESENT_OVER_TIME ES|QL function.

Part of elastic#131069
Optimize AggregatorFunction

Part of elastic#131069
Optimize PresentGroupingAggregatorFunction

Part of elastic#131069
Add PresentErrorTests

Part of elastic#131069
@leontyevdv leontyevdv added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) :StorageEngine/TSDB You know, for Metrics :Analytics/ES|QL AKA ESQL Team:StorageEngine v9.2.0 :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL labels Sep 10, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

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

@leontyevdv leontyevdv changed the title Feature/esql absent and absent over time functions Sep 10, 2025
@github-actions
Copy link
Contributor

ℹ️ Important: Docs version tagging

👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version.

We use applies_to tags to mark version-specific features and changes.

Expand for a quick overview

When to use applies_to tags:

✅ At the page level to indicate which products/deployments the content applies to (mandatory)
✅ When features change state (e.g. preview, ga) in a specific version
✅ When availability differs across deployments and environments

What NOT to do:

❌ Don't remove or replace information that applies to an older version
❌ Don't add new information that applies to a specific version without an applies_to tag
❌ Don't forget that applies_to tags can be used at the page, section, and inline level

🤔 Need help?

@elasticsearchmachine
Copy link
Collaborator

Hi @leontyevdv, I've created a changelog YAML for you.

Copy link
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.

Looks great. Thanks Dima!

elasticsearchmachine and others added 9 commits September 10, 2025 17:04
…ctions

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
- Improve docs
- Add tests

Part of elastic#131069
…ctions

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
@leontyevdv leontyevdv merged commit d73f051 into elastic:main Sep 12, 2025
32 of 34 checks passed
jordan-powers added a commit that referenced this pull request Sep 15, 2025
In #134475 we added another ES|QL function, but forgot to increment the
expected function count in the "60_usage/Basic ESQL usage output
(telemetry) non-snapshot version" test, causing release tests to fail. This
PR fixes that.
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Sep 17, 2025
* ES|QL: Add ABSENT ES|QL function

- Add an ABSENT function
- Add an ABSENT_OVER_TIME function

Closes elastic#131069
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Sep 17, 2025
In elastic#134475 we added another ES|QL function, but forgot to increment the
expected function count in the "60_usage/Basic ESQL usage output
(telemetry) non-snapshot version" test, causing release tests to fail. This
PR fixes that.
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
* ES|QL: Add ABSENT ES|QL function

- Add an ABSENT function
- Add an ABSENT_OVER_TIME function

Closes elastic#131069
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
In elastic#134475 we added another ES|QL function, but forgot to increment the
expected function count in the "60_usage/Basic ESQL usage output
(telemetry) non-snapshot version" test, causing release tests to fail. This
PR fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >enhancement :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL :StorageEngine/TSDB You know, for Metrics Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:StorageEngine v9.2.0

3 participants