<commit_before>package io.druid.data.input.impl;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Function;
import com.google.common.base.Preconditions;
import com.metamx.common.parsers.ParserUtils;
import org.joda.time.DateTime;

import java.util.Map;

/**
 */
public class TimestampSpec
{
  private static final String defaultFormat = "auto";

  private final String timestampColumn;
  private final String timestampFormat;
  private final Function<String, DateTime> timestampConverter;

  @JsonCreator
  public TimestampSpec(
      @JsonProperty("column") String timestampColumn,
      @JsonProperty("format") String format
  )
  {
    Preconditions.checkNotNull(timestampColumn, "Must have a timestamp column!");
    this.timestampColumn = timestampColumn.toLowerCase();
    this.timestampFormat = format == null ? defaultFormat : format;
    this.timestampConverter = ParserUtils.createTimestampParser(timestampFormat);
  }
<commit_msg>fix some backwards compat issues<commit_after>package io.druid.data.input.impl;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Function;
import com.google.common.base.Preconditions;
import com.metamx.common.parsers.ParserUtils;
import org.joda.time.DateTime;

import java.util.Map;

/**
 */
public class TimestampSpec
{
  private static final String defaultFormat = "auto";

  private final String timestampColumn;
  private final String timestampFormat;
  private final Function<String, DateTime> timestampConverter;

  @JsonCreator
  public TimestampSpec(
      @JsonProperty("column") String timestampColumn,
      @JsonProperty("format") String format
  )
  {
    this.timestampColumn = (timestampColumn == null) ? null : timestampColumn.toLowerCase();
    this.timestampFormat = format == null ? defaultFormat : format;
    this.timestampConverter = ParserUtils.createTimestampParser(timestampFormat);
  }

{'fraction_non_alphanumeric': 0.09645669291338582, 'fraction_numerical': 0.0, 'mean_word_length': 5.198170731707317, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6717559', 'n_tokens_mistral': 556, 'n_tokens_neox': 545, 'n_words': 125}