@ Override public Result executePolicy ( Object record ) { if ( ! ( record instanceof GenericRecord ) ) { return RowLevelPolicy . Result . FAILED ; } GenericRecord header = ( GenericRecord ) ( ( GenericRecord ) record ) . get ( "header" ) ; if ( header == null ) { return RowLevelPolicy . Result . FAILED ; } if ( header . get ( "time" ) != null || header . get ( "timestamp" ) != null ) { return RowLevelPolicy . Result . PASSED ; } return RowLevelPolicy . Result . FAILED ; }
Return PASS if the record has either header . time or header . timestamp field .