Class FieldTypeNotSupportedException

  • All Implemented Interfaces:
    Serializable

    public class FieldTypeNotSupportedException
    extends DRException
    Unchecked exception thrown to indicate a field in a record schema is of an invalid type for a given context.

    Many operators which accept record types place constraints on the schema, typically constraining them to be flat (that is, not nested) or have fields of homogeneous type. This exception will generally be seen as the cause of a TypeNotSupportedException raised by such an operator.

    See Also:
    Serialized Form
    • Constructor Detail

      • FieldTypeNotSupportedException

        public FieldTypeNotSupportedException​(String field,
                                              TokenType type)
        Constructs a FieldTypeNotSupportedException indicating the type and name of the field in error.
        Parameters:
        field - the name of the field in error
        type - the type of the field in error
      • FieldTypeNotSupportedException

        public FieldTypeNotSupportedException​(GraphPath field,
                                              TokenType type)
        Constructs a FieldTypeNotSupportedException indicating the type and path of the field in error. This form should be used to identify a field within a nested schema.
        Parameters:
        field - the path of the field in error
        type - the type of the field in error
    • Method Detail

      • getField

        public GraphPath getField()
        Gets the path of the field which caused the error.

        See Field for information about paths.

        Returns:
        the path of the field.
      • getFieldType

        public TokenType getFieldType()
        Gets the type of the field which caused the error.
        Returns:
        the type of the field