{
  "version" : "6.0.0",
  "timestamp" : 1589910891284,
  "path" : "query-validation-tests/slice.json",
  "schemas" : {
    "CSAS_OUTPUT_0.KsqlTopic.Source" : {
      "schema" : "`K` STRING KEY, `L` ARRAY<ARRAY<STRING>>",
      "serdeOptions" : [ ]
    },
    "CSAS_OUTPUT_0.OUTPUT" : {
      "schema" : "`K` STRING KEY, `SUB` ARRAY<ARRAY<STRING>>",
      "serdeOptions" : [ ]
    }
  },
  "testCase" : {
    "name" : "sublist for list of lists",
    "inputs" : [ {
      "topic" : "test_topic",
      "key" : "",
      "value" : {
        "l" : [ [ "a" ], [ "b" ], [ "c" ], [ "d" ] ]
      }
    } ],
    "outputs" : [ {
      "topic" : "OUTPUT",
      "key" : "",
      "value" : {
        "SUB" : [ [ "b" ], [ "c" ] ]
      }
    } ],
    "topics" : [ {
      "name" : "OUTPUT",
      "replicas" : 1,
      "numPartitions" : 4
    }, {
      "name" : "test_topic",
      "replicas" : 1,
      "numPartitions" : 4
    } ],
    "statements" : [ "CREATE STREAM TEST (K STRING KEY, l ARRAY<ARRAY<VARCHAR>>) WITH (kafka_topic='test_topic', value_format='JSON');", "CREATE STREAM OUTPUT AS SELECT K, SLICE(l, 2, 3) as sub FROM TEST;" ],
    "post" : {
      "sources" : [ {
        "name" : "OUTPUT",
        "type" : "STREAM",
        "schema" : "`K` STRING KEY, `SUB` ARRAY<ARRAY<STRING>>",
        "keyFormat" : {
          "format" : "KAFKA"
        },
        "serdeOptions" : [ ]
      }, {
        "name" : "TEST",
        "type" : "STREAM",
        "schema" : "`K` STRING KEY, `L` ARRAY<ARRAY<STRING>>",
        "keyFormat" : {
          "format" : "KAFKA"
        },
        "serdeOptions" : [ ]
      } ],
      "topics" : {
        "topics" : [ {
          "name" : "test_topic",
          "keyFormat" : {
            "formatInfo" : {
              "format" : "KAFKA"
            }
          },
          "valueFormat" : {
            "format" : "JSON"
          },
          "partitions" : 4
        }, {
          "name" : "OUTPUT",
          "keyFormat" : {
            "formatInfo" : {
              "format" : "KAFKA"
            }
          },
          "valueFormat" : {
            "format" : "JSON"
          },
          "partitions" : 4
        } ]
      }
    }
  }
}