Enum Class ErrorPolicy.Mode

java.lang.Object
java.lang.Enum<ErrorPolicy.Mode>
org.elasticsearch.xpack.esql.datasources.spi.ErrorPolicy.Mode
All Implemented Interfaces:
Serializable, Comparable<ErrorPolicy.Mode>, Constable
Enclosing class:
ErrorPolicy

public static enum ErrorPolicy.Mode extends Enum<ErrorPolicy.Mode>
Determines what happens to a row (or field) that fails to parse.
  • Enum Constant Details

    • FAIL_FAST

      public static final ErrorPolicy.Mode FAIL_FAST
      Abort immediately — equivalent to Spark FAILFAST.
    • SKIP_ROW

      public static final ErrorPolicy.Mode SKIP_ROW
      Drop the entire row — equivalent to Spark DROPMALFORMED, DuckDB ignore_errors.
    • NULL_FIELD

      public static final ErrorPolicy.Mode NULL_FIELD
      Null-fill unparseable fields, keep the row — equivalent to Spark PERMISSIVE.
  • Method Details

    • values

      public static ErrorPolicy.Mode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ErrorPolicy.Mode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • parse

      public static ErrorPolicy.Mode parse(String value)
      Case-insensitive parse; accepts underscore form (skip_row). Returns null for null/empty input.