scripting-protolib/src/main/java/com/streamsets/pipeline/stage/processor/scripting/ScriptTypedNullObject.java
public static Object getFieldNull(Record record, String fieldPath) {
    Field f = record.get(fieldPath);
    if (f != null ) {
      return f.getValue() == null? getTypedNullFromField(f) : f.getValue();
    }
    return null;
  }
public static Object getFieldNull(Record record, String fieldPath) {
    Field f = record.get(fieldPath);
    if (f != null ) {
      return f.getValue() == null? getTypedNullFromField(f) : f.getValue();
    }
    return null;
  }
public static Object getFieldNull ( Record record , String fieldPath ) { Field f = record . get ( fieldPath ) ; if ( f != null ) { return f . getValue ( ) == null ? getTypedNullFromField ( f ) : f . getValue ( ) ; } return null ; }
Receive record and fieldPath from scripting processor.
It resolves type of the field, and if value is null, it returns
one of the NULL_XXX objects defined in this class.
If field value is not null, it returns the value stored in the field.
@param record Record
@param fieldPath field Path
@return One of the NULL_XXX objects if field has type but value is null.
Receive record and fieldPath from scripting processor . It resolves type of the field and if value is null it returns one of the NULL_XXX objects defined in this class . If field value is not null it returns the value stored in the field .