{
  "tests": [
    {
      "name": "string to date",
      "statements": [
        "CREATE STREAM TEST (ID bigint, NAME varchar, date varchar, format varchar) WITH (kafka_topic='test_topic', value_format='DELIMITED', key='ID');",
        "CREATE STREAM TS AS select id, stringtodate(date, format) as ts from test;"
      ],
      "inputs": [
        {"topic": "test_topic", "key": 0, "value": "0,zero,2018-05-11Lit,yyyy-MM-dd'Lit'"},
        {"topic": "test_topic", "key": 1, "value": "1,zero,11/05/2019,dd/MM/yyyy"},
        {"topic": "test_topic", "key": 2, "value": "2,zero,01-Jan-2022,dd-MMM-yyyy"},
        {"topic": "test_topic", "key": 3, "value": "3,yyy,01-01-1970,dd-MM-yyyy"}
      ],
      "outputs": [
        {"topic": "TS", "key": 0, "value": "0,17662"},
        {"topic": "TS", "key": 1, "value": "1,18027"},
        {"topic": "TS", "key": 2, "value": "2,18993"},
        {"topic": "TS", "key": 3, "value": "3,0"}
      ]
    }
  ]
}