{"record":{"id":"9619e9a658fb7117","repo":"pentaho/pentaho-kettle","slug":"this-functionality-for-specified-format-pattern-has-not-been","errorCode":null,"errorMessage":"This functionality for specified format pattern has not been implemented yet","messagePattern":"This functionality for specified format pattern has not been implemented yet","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/timestamp/SimpleTimestampFormat.java","lineNumber":302,"sourceCode":"    }\n    dateBuffer.delete( placeholderPosition, placeholderPosition + placeHolder.length() );\n    return placeholderPosition;\n  }\n\n  /**\n   * See <code>SimpleDateFormat</code> description. This is dummy method to deprecate using parent implementation for\n   * <code>Timestamp</code> until it is not fully implemented.\n   */\n  @Override\n  public AttributedCharacterIterator formatToCharacterIterator( Object obj ) {\n    if ( obj instanceof Timestamp ) {\n      throw new IllegalArgumentException(\n        \"This functionality for Timestamp object has not been implemented yet\" );\n    }\n    if ( compatibleToSuperPattern ) {\n      return super.formatToCharacterIterator( obj );\n    } else {\n      throw new IllegalArgumentException(\n        \"This functionality for specified format pattern has not been implemented yet\" );\n    }\n  }\n\n  /**\n   * Parses text from a string to produce a <code>Timestamp</code>.\n   * <p/>\n   * The method attempts to parse text starting at the index given by <code>pos</code>. If parsing succeeds, then the\n   * index of <code>pos</code> is updated to the index after the last character used (parsing does not necessarily use\n   * all characters up to the end of the string), and the parsed date is returned. The updated <code>pos</code> can be\n   * used to indicate the starting point for the next call to this method. If an error occurs, then the index of\n   * <code>pos</code> is not changed, the error index of <code>pos</code> is set to the index of the character where the\n   * error occurred, and null is returned.\n   * <p/>\n   * <p>This parsing operation uses the {@link SimpleDateFormat#calendar calendar} to produce a {@code Date}. All of the\n   * {@code calendar}'s date-time fields are {@linkplain java.util.Calendar#clear() cleared} before parsing, and the\n   * {@code calendar}'s default values of the date-time fields are used for any missing date-time information. For\n   * example, the year value of the parsed {@code Date} is 1970 with {@link java.util.GregorianCalendar} if no year","sourceCodeStart":284,"sourceCodeEnd":320,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/timestamp/SimpleTimestampFormat.java#L284-L320","documentation":"SimpleTimestampFormat.formatToCharacterIterator() also rejects non-Timestamp objects when the configured pattern is not compatible with the parent SimpleDateFormat pattern. Since the Timestamp-specific pattern cannot be delegated to the super implementation, any object falls through to this IllegalArgumentException.","triggerScenarios":"formatToCharacterIterator(obj) called with a non-Timestamp obj (e.g. Date or String) while compatibleToSuperPattern is false (a Timestamp-specific pattern was supplied to the constructor).","commonSituations":"Using timestamp patterns like 'yyyy-MM-dd'T'HH:mm:ss.SSSSSS' with attribute-iterator formatting; generic formatter frameworks passing arbitrary objects.","solutions":["Use a plain SimpleDateFormat when you need formatToCharacterIterator and your pattern does not need Timestamp nanos support","Use format()/parse() methods of SimpleTimestampFormat instead","Construct SimpleTimestampFormat only with patterns it explicitly supports"],"exampleFix":"// before\nnew SimpleTimestampFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSSSS\").formatToCharacterIterator(new Date());\n// after\nnew SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").formatToCharacterIterator(new Date());","handlingStrategy":"fallback","validationCode":"if (compatibleToSuperPattern) { /* super path OK */ } else { /* avoid formatToCharacterIterator */ }","typeGuard":"boolean canUseCharacterIterator(SimpleTimestampFormat f, Object o) { return !(o instanceof java.sql.Timestamp); }","tryCatchPattern":"try {\n  return fmt.formatToCharacterIterator(obj);\n} catch (IllegalArgumentException e) {\n  LOGGER.warn(\"Falling back to SimpleDateFormat: \" + e.getMessage());\n  return plainFormat.formatToCharacterIterator(toDate(obj));\n}","preventionTips":["Use Timestamp-specific patterns only with format()/parse()","Use plain SimpleDateFormat when you need AttributedCharacterIterator","Encapsulate pattern choice in a formatter factory"],"tags":["unsupported-operation","formatting","timestamp"],"backgroundTag":"unsupported-operation","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}