Class FieldTypesNotComparableException

  • All Implemented Interfaces:
    Serializable

    public class FieldTypesNotComparableException
    extends DRException
    Unchecked exception thrown when an attempt is made to compare two fields of incompatible types in a record schema. The fields and types are indicated as is the causing TypesNotComparableException.

    Note that comparison of record types is done by comparing schemas positionally. That is, fields are compared by type in the order in which they appear in the schema. This exception is thrown during this comparison process and is generally seen as the cause of a TypesNotComparableException.

    See Also:
    Serialized Form
    • Constructor Detail

      • FieldTypesNotComparableException

        public FieldTypesNotComparableException​(GraphPath leftField,
                                                GraphPath rightField,
                                                TypesNotComparableException failure)
        Constructs a FieldTypesNotComparableException indicating the specified paths, caused by the given failure.
        Parameters:
        leftField - the path of the field on the left side of the comparison
        rightField - the path of the field on the right side of the comparison
        failure - the underlying type error
    • Method Detail

      • getLeftField

        public GraphPath getLeftField()
        Gets the path of the field on the left side of the comparison which raised this exception.

        See Field for information about paths.

        Returns:
        the path of the field on the left side of the comparison
      • getLeftType

        public TokenType getLeftType()
        Gets the type of the field on the left side of the comparison which raised this exception.
        Returns:
        the type of the field on the left side of the comparison
      • getRightField

        public GraphPath getRightField()
        Gets the path of the field on the right side of the comparison which raised this exception.

        See Field for information about paths.

        Returns:
        the path of the field on the right side of the comparison
      • getRightType

        public TokenType getRightType()
        Gets the type of the field on the right side of the comparison which raised this exception.
        Returns:
        the type of the field on the right side of the comparison