Skip to content

ES|QL: Folding of REPLACE with constants throws ClassCastException #129322

Closed
@luigidellaquila

Description

@luigidellaquila
Contributor
row txt = "a" |  WHERE MATCH(txt, REPLACE("XS", "X", "U"))
class java.lang.String cannot be cast to class org.apache.lucene.util.BytesRef (java.lang.String is in module java.base of loader 'bootstrap'; org.apache.lucene.util.BytesRef is in module org.apache.lucene.core@10.2.1 of loader 'app')

Activity

elasticsearchmachine

elasticsearchmachine commented on Jun 12, 2025

@elasticsearchmachine
Collaborator

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

luigidellaquila

luigidellaquila commented on Jun 12, 2025

@luigidellaquila
ContributorAuthor

The problem is not limited to REPLACE, it can be reproduced also with other functions, eg.

from idx | WHERE MATCH(text, date_format(\"yyyy\", \"2025\"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @luigidellaquila@elasticsearchmachine

    Issue actions

      ES|QL: Folding of REPLACE with constants throws ClassCastException · Issue #129322 · elastic/elasticsearch