Skip to content

[ESQL] Add null-safety to TRange exception - #159125

Merged
prwhelan merged 5 commits into
elastic:mainfrom
prwhelan:trange-npe
Sep 14, 2026
Merged

prwhelan merged 5 commits into
elastic:mainfrom
prwhelan:trange-npe

Conversation

@prwhelan

Copy link
Copy Markdown
Member

TRange will throw an invalidation exception when start or offset are null.

TRange will throw an invalidation exception when start or offset are null.
@prwhelan prwhelan added >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) auto-backport Automatically create backport pull requests when merged :Analytics/ES|QL AKA ESQL branch:9.4 branch:9.5 labels Sep 11, 2026
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

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

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

⏳ Building and deploying preview... View progress

This comment will be updated with preview links when the build is complete.

@github-actions

Copy link
Copy Markdown
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?

@prwhelan
prwhelan marked this pull request as ready for review September 11, 2026 23:14
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

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

return zonedDateTime.minus(amount).toInstant();
}
throw new InvalidArgumentException("Unsupported offset type [{}]", offset.getClass().getSimpleName());
throw new InvalidArgumentException("Unsupported offset type [{}]", offset != null ? offset.getClass().getSimpleName() : "null");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we should handle null here. We should reject the query in postAnalysisPlanVerification when rangeStartValue is null.

@dnhatn dnhatn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks @prwhelan

@dnhatn dnhatn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks @prwhelan

@prwhelan
prwhelan enabled auto-merge (squash) September 14, 2026 15:53
@prwhelan
prwhelan merged commit 0119f83 into elastic:main Sep 14, 2026
44 checks passed
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

💚 Backport successful

Status Branch Result
✅ 9.4
✅ 9.5

elasticsearchmachine pushed a commit that referenced this pull request Sep 14, 2026
TRange will now reject when start or offset are null.
elasticsearchmachine pushed a commit that referenced this pull request Sep 16, 2026
TRange will now reject when start or offset are null.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >bug Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.8 v9.5.5 v9.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants