Class InvalidMappedTsField

java.lang.Object
org.elasticsearch.xpack.esql.core.type.EsField
org.elasticsearch.xpack.esql.core.type.InvalidMappedTsField
All Implemented Interfaces:
Writeable

public class InvalidMappedTsField extends EsField
Represents a field that has the same ES data type across all indices but conflicting time-series roles (e.g., DIMENSION in one index and METRIC in another).

Exists only during analysis and verification - it is not sent to data nodes. The analyzer converts this to an UnsupportedEsField-backed UnsupportedAttribute via mappingAsAttributes.

Unlike InvalidMappedField, which carries a typesToIndices map and can participate in union-type casts (e.g., field::double), a role conflict cannot be resolved by any cast, so this class is intentionally not a subclass of InvalidMappedField.

Crucially, this class is also not an UnsupportedEsField. The field-hierarchy walk in IndexResolver.mergedMappings propagates unsupported status to child fields when it encounters an UnsupportedEsField parent. By using a distinct type here, subfields with non-conflicting, supported types remain accessible.

  • Constructor Details

    • InvalidMappedTsField

      public InvalidMappedTsField(String name, String errorMessage)
    • InvalidMappedTsField

      public InvalidMappedTsField(String name, String errorMessage, Map<String,EsField> properties)
  • Method Details

    • writeContent

      public void writeContent(StreamOutput out)
      Description copied from class: EsField
      This needs to be overridden by subclasses for specific serialization
      Overrides:
      writeContent in class EsField
    • errorMessage

      public String errorMessage()
      Returns the human-readable error message describing the time-series role conflict.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class EsField
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class EsField