diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/plan.json new file mode 100644 index 000000000000..d150c5d0ab01 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/plan.json @@ -0,0 +1,145 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (ID BOOLEAN KEY, V0 INTEGER, V1 INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`ID` BOOLEAN KEY, `V0` INTEGER, `V1` INTEGER", + "topicName" : "input", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT\n INPUT.ID ID,\n AS_VALUE(INPUT.ID) ID_COPY,\n INPUT.V1 V1\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`ID` BOOLEAN KEY, `ID_COPY` BOOLEAN, `V1` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`ID` BOOLEAN KEY, `V0` INTEGER, `V1` INTEGER" + }, + "keyColumnNames" : [ "ID" ], + "selectExpressions" : [ "AS_VALUE(ID) AS ID_COPY", "V1 AS V1" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/spec.json new file mode 100644 index 000000000000..8ae04fd49689 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/spec.json @@ -0,0 +1,102 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595878201, + "path" : "query-validation-tests/as_value.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`ID` BOOLEAN KEY, `V0` INTEGER, `V1` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`ID` BOOLEAN KEY, `ID_COPY` BOOLEAN, `V1` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "BOOLEAN", + "inputs" : [ { + "topic" : "input", + "key" : true, + "value" : { + "V0" : 2, + "V1" : 3 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : true, + "value" : { + "ID_COPY" : true, + "V1" : 3 + } + } ], + "topics" : [ { + "name" : "input", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (ID BOOLEAN KEY, V0 INT, V1 INT) WITH (kafka_topic='input', format='JSON');", "CREATE STREAM OUTPUT AS SELECT ID, AS_VALUE(ID) AS ID_COPY, V1 FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`ID` BOOLEAN KEY, `V0` INTEGER, `V1` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`ID` BOOLEAN KEY, `ID_COPY` BOOLEAN, `V1` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/topology new file mode 100644 index 000000000000..a70a4e91e301 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_BOOLEAN/6.1.0_1602595878201/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/plan.json new file mode 100644 index 000000000000..9587430b9f59 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/plan.json @@ -0,0 +1,145 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (ID DECIMAL(4, 2) KEY, V0 INTEGER, V1 INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`ID` DECIMAL(4, 2) KEY, `V0` INTEGER, `V1` INTEGER", + "topicName" : "input", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT\n INPUT.ID ID,\n AS_VALUE(INPUT.ID) ID_COPY,\n INPUT.V1 V1\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`ID` DECIMAL(4, 2) KEY, `ID_COPY` DECIMAL(4, 2), `V1` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`ID` DECIMAL(4, 2) KEY, `V0` INTEGER, `V1` INTEGER" + }, + "keyColumnNames" : [ "ID" ], + "selectExpressions" : [ "AS_VALUE(ID) AS ID_COPY", "V1 AS V1" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/spec.json new file mode 100644 index 000000000000..90f50febfb33 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/spec.json @@ -0,0 +1,102 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595878257, + "path" : "query-validation-tests/as_value.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`ID` DECIMAL(4, 2) KEY, `V0` INTEGER, `V1` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`ID` DECIMAL(4, 2) KEY, `ID_COPY` DECIMAL(4, 2), `V1` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "DECIMAL", + "inputs" : [ { + "topic" : "input", + "key" : 12.30, + "value" : { + "V0" : 2, + "V1" : 3 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 12.30, + "value" : { + "ID_COPY" : 12.30, + "V1" : 3 + } + } ], + "topics" : [ { + "name" : "input", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (ID DECIMAL(4,2) KEY, V0 INT, V1 INT) WITH (kafka_topic='input', format='JSON');", "CREATE STREAM OUTPUT AS SELECT ID, AS_VALUE(ID) AS ID_COPY, V1 FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`ID` DECIMAL(4, 2) KEY, `V0` INTEGER, `V1` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`ID` DECIMAL(4, 2) KEY, `ID_COPY` DECIMAL(4, 2), `V1` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/topology new file mode 100644 index 000000000000..a70a4e91e301 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/as_value_-_DECIMAL/6.1.0_1602595878257/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/plan.json new file mode 100644 index 000000000000..99f030e93279 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/plan.json @@ -0,0 +1,143 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (K STRING KEY, FOO INTEGER) WITH (KAFKA_TOPIC='input_topic', KEY_FORMAT='KAFKA', VALUE_FORMAT='AVRO');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT WITH (FORMAT='JSON') AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + } + }, + "sourceSchema" : "`K` STRING KEY, `FOO` INTEGER" + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "FOO AS FOO" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/spec.json new file mode 100644 index 000000000000..981d531c673d --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/spec.json @@ -0,0 +1,110 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595895722, + "path" : "query-validation-tests/formats.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "override formats - create stream as select", + "inputs" : [ { + "topic" : "input_topic", + "key" : "hello", + "value" : { + "FOO" : 10 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : "hello", + "value" : { + "FOO" : 10 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "valueSchema" : { + "type" : "record", + "name" : "KsqlDataSourceSchema", + "namespace" : "io.confluent.ksql.avro_schemas", + "fields" : [ { + "name" : "FOO", + "type" : [ "null", "int" ], + "default" : null + } ], + "connect.name" : "io.confluent.ksql.avro_schemas.KsqlDataSourceSchema" + }, + "valueFormat" : "AVRO", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (K STRING KEY, foo INT) WITH (kafka_topic='input_topic', key_format='KAFKA', value_format='AVRO');", "CREATE STREAM OUTPUT WITH (format='JSON') AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : "AVRO", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_stream_as_select/6.1.0_1602595895722/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/plan.json new file mode 100644 index 000000000000..73c2af438a21 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/plan.json @@ -0,0 +1,144 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE INPUT (K STRING PRIMARY KEY, FOO INTEGER) WITH (KAFKA_TOPIC='input_topic', KEY_FORMAT='KAFKA', VALUE_FORMAT='AVRO');", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "INPUT", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE OUTPUT WITH (FORMAT='JSON') AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "OUTPUT", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "tableSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "tableSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + } + }, + "sourceSchema" : "`K` STRING KEY, `FOO` INTEGER", + "forceChangelog" : true + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "FOO AS FOO" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CTAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/spec.json new file mode 100644 index 000000000000..ea1f5203a1ca --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/spec.json @@ -0,0 +1,118 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595895741, + "path" : "query-validation-tests/formats.json", + "schemas" : { + "CTAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + } + }, + "CTAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "override formats - create table as select", + "inputs" : [ { + "topic" : "input_topic", + "key" : "hello", + "value" : { + "FOO" : 10 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : "hello", + "value" : { + "FOO" : 10 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "valueSchema" : { + "type" : "record", + "name" : "KsqlDataSourceSchema", + "namespace" : "io.confluent.ksql.avro_schemas", + "fields" : [ { + "name" : "FOO", + "type" : [ "null", "int" ], + "default" : null + } ], + "connect.name" : "io.confluent.ksql.avro_schemas.KsqlDataSourceSchema" + }, + "valueFormat" : "AVRO", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE TABLE INPUT (K STRING PRIMARY KEY, foo INT) WITH (kafka_topic='input_topic', key_format='KAFKA', value_format='AVRO');", "CREATE TABLE OUTPUT WITH (format='JSON') AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "TABLE", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : "AVRO", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "TABLE", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-KsqlTopic-Reduce-changelog", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "AVRO" + } + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/topology new file mode 100644 index 000000000000..a352fa6dc033 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_formats_-_create_table_as_select/6.1.0_1602595895741/topology @@ -0,0 +1,22 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000001 (topics: [input_topic]) + --> KTABLE-SOURCE-0000000002 + Processor: KTABLE-SOURCE-0000000002 (stores: []) + --> KTABLE-MAPVALUES-0000000003 + <-- KSTREAM-SOURCE-0000000001 + Processor: KTABLE-MAPVALUES-0000000003 (stores: [KsqlTopic-Reduce]) + --> KTABLE-TRANSFORMVALUES-0000000004 + <-- KTABLE-SOURCE-0000000002 + Processor: KTABLE-TRANSFORMVALUES-0000000004 (stores: []) + --> Project + <-- KTABLE-MAPVALUES-0000000003 + Processor: Project (stores: []) + --> KTABLE-TOSTREAM-0000000006 + <-- KTABLE-TRANSFORMVALUES-0000000004 + Processor: KTABLE-TOSTREAM-0000000006 (stores: []) + --> KSTREAM-SINK-0000000007 + <-- Project + Sink: KSTREAM-SINK-0000000007 (topic: OUTPUT) + <-- KTABLE-TOSTREAM-0000000006 + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/plan.json new file mode 100644 index 000000000000..53f43195a0d4 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/plan.json @@ -0,0 +1,143 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (K STRING KEY, FOO INTEGER) WITH (KAFKA_TOPIC='input_topic', KEY_FORMAT='KAFKA', VALUE_FORMAT='JSON');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT WITH (KEY_FORMAT='JSON') AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`K` STRING KEY, `FOO` INTEGER" + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "FOO AS FOO" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/spec.json new file mode 100644 index 000000000000..004e11047c69 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/spec.json @@ -0,0 +1,98 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595895648, + "path" : "query-validation-tests/formats.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "override key format - create stream as select", + "inputs" : [ { + "topic" : "input_topic", + "key" : "hello", + "value" : { + "FOO" : 10 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : "hello", + "value" : { + "FOO" : 10 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (K STRING KEY, foo INT) WITH (kafka_topic='input_topic', key_format='KAFKA', value_format='JSON');", "CREATE STREAM OUTPUT WITH (key_format='JSON') AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_stream_as_select/6.1.0_1602595895648/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/plan.json new file mode 100644 index 000000000000..8f238c008cf4 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/plan.json @@ -0,0 +1,144 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE INPUT (K STRING PRIMARY KEY, FOO INTEGER) WITH (KAFKA_TOPIC='input_topic', KEY_FORMAT='KAFKA', VALUE_FORMAT='JSON');", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "INPUT", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE OUTPUT WITH (KEY_FORMAT='JSON') AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "OUTPUT", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "tableSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "tableSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`K` STRING KEY, `FOO` INTEGER", + "forceChangelog" : true + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "FOO AS FOO" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CTAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/spec.json new file mode 100644 index 000000000000..93fb8bfe74b9 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/spec.json @@ -0,0 +1,106 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595895663, + "path" : "query-validation-tests/formats.json", + "schemas" : { + "CTAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "override key format - create table as select", + "inputs" : [ { + "topic" : "input_topic", + "key" : "hello", + "value" : { + "FOO" : 10 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : "hello", + "value" : { + "FOO" : 10 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE TABLE INPUT (K STRING PRIMARY KEY, foo INT) WITH (kafka_topic='input_topic', key_format='KAFKA', value_format='JSON');", "CREATE TABLE OUTPUT WITH (key_format='JSON') AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "TABLE", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "TABLE", + "schema" : "`K` STRING KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-KsqlTopic-Reduce-changelog", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/topology new file mode 100644 index 000000000000..a352fa6dc033 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/formats_-_override_key_format_-_create_table_as_select/6.1.0_1602595895663/topology @@ -0,0 +1,22 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000001 (topics: [input_topic]) + --> KTABLE-SOURCE-0000000002 + Processor: KTABLE-SOURCE-0000000002 (stores: []) + --> KTABLE-MAPVALUES-0000000003 + <-- KSTREAM-SOURCE-0000000001 + Processor: KTABLE-MAPVALUES-0000000003 (stores: [KsqlTopic-Reduce]) + --> KTABLE-TRANSFORMVALUES-0000000004 + <-- KTABLE-SOURCE-0000000002 + Processor: KTABLE-TRANSFORMVALUES-0000000004 (stores: []) + --> Project + <-- KTABLE-MAPVALUES-0000000003 + Processor: Project (stores: []) + --> KTABLE-TOSTREAM-0000000006 + <-- KTABLE-TRANSFORMVALUES-0000000004 + Processor: KTABLE-TOSTREAM-0000000006 (stores: []) + --> KSTREAM-SINK-0000000007 + <-- Project + Sink: KSTREAM-SINK-0000000007 (topic: OUTPUT) + <-- KTABLE-TOSTREAM-0000000006 + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/plan.json new file mode 100644 index 000000000000..d2531aa18907 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/plan.json @@ -0,0 +1,186 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM TEST (ID INTEGER KEY, VAL BOOLEAN) WITH (FORMAT='JSON', KAFKA_TOPIC='test_topic');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "TEST", + "schema" : "`ID` INTEGER KEY, `VAL` BOOLEAN", + "topicName" : "test_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE OUTPUT AS SELECT\n TEST.VAL VAL,\n COUNT(*) COUNT\nFROM TEST TEST\nGROUP BY TEST.VAL\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "OUTPUT", + "schema" : "`VAL` BOOLEAN KEY, `COUNT` BIGINT", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "TEST" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "tableSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "Aggregate/Project" + }, + "source" : { + "@type" : "streamAggregateV1", + "properties" : { + "queryContext" : "Aggregate/Aggregate" + }, + "source" : { + "@type" : "streamGroupByV1", + "properties" : { + "queryContext" : "Aggregate/GroupBy" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Aggregate/Prepare" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "test_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`ID` INTEGER KEY, `VAL` BOOLEAN" + }, + "keyColumnNames" : [ "ID" ], + "selectExpressions" : [ "VAL AS VAL", "ROWTIME AS ROWTIME" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "groupByExpressions" : [ "VAL" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "nonAggregateColumns" : [ "VAL", "ROWTIME" ], + "aggregationFunctions" : [ "COUNT(ROWTIME)" ] + }, + "keyColumnNames" : [ "VAL" ], + "selectExpressions" : [ "KSQL_AGG_VARIABLE_0 AS COUNT" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CTAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/spec.json new file mode 100644 index 000000000000..d4635148cdf4 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/spec.json @@ -0,0 +1,162 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595908761, + "path" : "query-validation-tests/group-by.json", + "schemas" : { + "CTAS_OUTPUT_0.Aggregate.GroupBy" : { + "schema" : "`VAL` BOOLEAN KEY, `VAL` BOOLEAN, `ROWTIME` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`ID` INTEGER KEY, `VAL` BOOLEAN", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.Aggregate.Aggregate.Materialize" : { + "schema" : "`VAL` BOOLEAN KEY, `VAL` BOOLEAN, `ROWTIME` BIGINT, `KSQL_AGG_VARIABLE_0` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.OUTPUT" : { + "schema" : "`VAL` BOOLEAN KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "non-KAFKA key format", + "inputs" : [ { + "topic" : "test_topic", + "key" : 0, + "value" : { + "VAL" : true + } + }, { + "topic" : "test_topic", + "key" : 1, + "value" : { + "VAL" : false + } + }, { + "topic" : "test_topic", + "key" : 2, + "value" : { + "VAL" : true + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : true, + "value" : { + "COUNT" : 1 + } + }, { + "topic" : "OUTPUT", + "key" : false, + "value" : { + "COUNT" : 1 + } + }, { + "topic" : "OUTPUT", + "key" : true, + "value" : { + "COUNT" : 2 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "test_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM TEST (ID INT KEY, VAL BOOLEAN) WITH (kafka_topic='test_topic', format='JSON');", "CREATE TABLE OUTPUT AS SELECT VAL, COUNT() AS COUNT FROM TEST GROUP BY VAL;" ], + "post" : { + "sources" : [ { + "name" : "OUTPUT", + "type" : "TABLE", + "schema" : "`VAL` BOOLEAN KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "TEST", + "type" : "STREAM", + "schema" : "`ID` INTEGER KEY, `VAL` BOOLEAN", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "test_topic", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-GroupBy-repartition", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-Aggregate-Materialize-changelog", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/topology new file mode 100644 index 000000000000..99948fd4b5c4 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/group-by_-_non-KAFKA_key_format/6.1.0_1602595908761/topology @@ -0,0 +1,40 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [test_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Aggregate-Prepare + <-- KSTREAM-SOURCE-0000000000 + Processor: Aggregate-Prepare (stores: []) + --> KSTREAM-FILTER-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-FILTER-0000000003 (stores: []) + --> Aggregate-GroupBy + <-- Aggregate-Prepare + Processor: Aggregate-GroupBy (stores: []) + --> Aggregate-GroupBy-repartition-filter + <-- KSTREAM-FILTER-0000000003 + Processor: Aggregate-GroupBy-repartition-filter (stores: []) + --> Aggregate-GroupBy-repartition-sink + <-- Aggregate-GroupBy + Sink: Aggregate-GroupBy-repartition-sink (topic: Aggregate-GroupBy-repartition) + <-- Aggregate-GroupBy-repartition-filter + + Sub-topology: 1 + Source: Aggregate-GroupBy-repartition-source (topics: [Aggregate-GroupBy-repartition]) + --> KSTREAM-AGGREGATE-0000000005 + Processor: KSTREAM-AGGREGATE-0000000005 (stores: [Aggregate-Aggregate-Materialize]) + --> Aggregate-Aggregate-ToOutputSchema + <-- Aggregate-GroupBy-repartition-source + Processor: Aggregate-Aggregate-ToOutputSchema (stores: []) + --> Aggregate-Project + <-- KSTREAM-AGGREGATE-0000000005 + Processor: Aggregate-Project (stores: []) + --> KTABLE-TOSTREAM-0000000011 + <-- Aggregate-Aggregate-ToOutputSchema + Processor: KTABLE-TOSTREAM-0000000011 (stores: []) + --> KSTREAM-SINK-0000000012 + <-- Aggregate-Project + Sink: KSTREAM-SINK-0000000012 (topic: OUTPUT) + <-- KTABLE-TOSTREAM-0000000011 + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/plan.json new file mode 100644 index 000000000000..537df63b4f0a --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/plan.json @@ -0,0 +1,188 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (A DECIMAL(4, 2)) WITH (FORMAT='JSON', KAFKA_TOPIC='INPUT');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`A` DECIMAL(4, 2)", + "topicName" : "INPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE OUTPUT AS SELECT\n INPUT.A A,\n COUNT(*) COUNT\nFROM INPUT INPUT\nWINDOW HOPPING ( SIZE 30 SECONDS , ADVANCE BY 15 SECONDS ) \nGROUP BY INPUT.A\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "OUTPUT", + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "windowInfo" : { + "type" : "HOPPING", + "size" : 30.000000000 + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "tableSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "Aggregate/Project" + }, + "source" : { + "@type" : "streamWindowedAggregateV1", + "properties" : { + "queryContext" : "Aggregate/Aggregate" + }, + "source" : { + "@type" : "streamGroupByV1", + "properties" : { + "queryContext" : "Aggregate/GroupBy" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Aggregate/Prepare" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "INPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`A` DECIMAL(4, 2)" + }, + "selectExpressions" : [ "A AS A", "ROWTIME AS ROWTIME" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "groupByExpressions" : [ "A" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "nonAggregateColumns" : [ "A", "ROWTIME" ], + "aggregationFunctions" : [ "COUNT(ROWTIME)" ], + "windowExpression" : " HOPPING ( SIZE 30 SECONDS , ADVANCE BY 15 SECONDS ) " + }, + "keyColumnNames" : [ "A" ], + "selectExpressions" : [ "KSQL_AGG_VARIABLE_0 AS COUNT" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CTAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/spec.json new file mode 100644 index 000000000000..f2cb7cfe55b7 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/spec.json @@ -0,0 +1,195 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595910524, + "path" : "query-validation-tests/hopping-windows.json", + "schemas" : { + "CTAS_OUTPUT_0.Aggregate.GroupBy" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `A` DECIMAL(4, 2), `ROWTIME` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`A` DECIMAL(4, 2)", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.Aggregate.Aggregate.Materialize" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `A` DECIMAL(4, 2), `ROWTIME` BIGINT, `KSQL_AGG_VARIABLE_0` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.OUTPUT" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "HOPPING", + "size" : 30.000000000 + } + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "non-KAFKA key format", + "inputs" : [ { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 12.30 + }, + "timestamp" : 10 + }, { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 12.30 + }, + "timestamp" : 11 + }, { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 1.00 + }, + "timestamp" : 12 + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 12.30, + "value" : { + "COUNT" : 1 + }, + "timestamp" : 10, + "window" : { + "start" : 0, + "end" : 30000, + "type" : "TIME" + } + }, { + "topic" : "OUTPUT", + "key" : 12.30, + "value" : { + "COUNT" : 2 + }, + "timestamp" : 11, + "window" : { + "start" : 0, + "end" : 30000, + "type" : "TIME" + } + }, { + "topic" : "OUTPUT", + "key" : 1.00, + "value" : { + "COUNT" : 1 + }, + "timestamp" : 12, + "window" : { + "start" : 0, + "end" : 30000, + "type" : "TIME" + } + } ], + "topics" : [ { + "name" : "INPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (A DECIMAL(4,2)) WITH (kafka_topic='INPUT', format='JSON');", "CREATE TABLE OUTPUT AS SELECT A, COUNT() AS COUNT FROM INPUT WINDOW HOPPING (SIZE 30 SECONDS, ADVANCE BY 15 SECONDS) group by A;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`A` DECIMAL(4, 2)", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "TABLE", + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON", + "windowType" : "HOPPING", + "windowSize" : 30000 + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "INPUT", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-GroupBy-repartition", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-Aggregate-Materialize-changelog", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "HOPPING", + "size" : 30.000000000 + } + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "HOPPING", + "size" : 30.000000000 + } + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/topology new file mode 100644 index 000000000000..e8e67ad1d5a5 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/hopping-windows_-_non-KAFKA_key_format/6.1.0_1602595910524/topology @@ -0,0 +1,43 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [INPUT]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Aggregate-Prepare + <-- KSTREAM-SOURCE-0000000000 + Processor: Aggregate-Prepare (stores: []) + --> KSTREAM-FILTER-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-FILTER-0000000003 (stores: []) + --> Aggregate-GroupBy + <-- Aggregate-Prepare + Processor: Aggregate-GroupBy (stores: []) + --> Aggregate-GroupBy-repartition-filter + <-- KSTREAM-FILTER-0000000003 + Processor: Aggregate-GroupBy-repartition-filter (stores: []) + --> Aggregate-GroupBy-repartition-sink + <-- Aggregate-GroupBy + Sink: Aggregate-GroupBy-repartition-sink (topic: Aggregate-GroupBy-repartition) + <-- Aggregate-GroupBy-repartition-filter + + Sub-topology: 1 + Source: Aggregate-GroupBy-repartition-source (topics: [Aggregate-GroupBy-repartition]) + --> KSTREAM-AGGREGATE-0000000005 + Processor: KSTREAM-AGGREGATE-0000000005 (stores: [Aggregate-Aggregate-Materialize]) + --> Aggregate-Aggregate-ToOutputSchema + <-- Aggregate-GroupBy-repartition-source + Processor: Aggregate-Aggregate-ToOutputSchema (stores: []) + --> Aggregate-Aggregate-WindowSelect + <-- KSTREAM-AGGREGATE-0000000005 + Processor: Aggregate-Aggregate-WindowSelect (stores: []) + --> Aggregate-Project + <-- Aggregate-Aggregate-ToOutputSchema + Processor: Aggregate-Project (stores: []) + --> KTABLE-TOSTREAM-0000000012 + <-- Aggregate-Aggregate-WindowSelect + Processor: KTABLE-TOSTREAM-0000000012 (stores: []) + --> KSTREAM-SINK-0000000013 + <-- Aggregate-Project + Sink: KSTREAM-SINK-0000000013 (topic: OUTPUT) + <-- KTABLE-TOSTREAM-0000000012 + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/plan.json new file mode 100644 index 000000000000..23414e90f621 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/plan.json @@ -0,0 +1,215 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM L (A INTEGER KEY, B INTEGER, C INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='LEFT');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "L", + "schema" : "`A` INTEGER KEY, `B` INTEGER, `C` INTEGER", + "topicName" : "LEFT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE R (A INTEGER PRIMARY KEY, B INTEGER, C INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='RIGHT');", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "R", + "schema" : "`A` INTEGER KEY, `B` INTEGER, `C` INTEGER", + "topicName" : "RIGHT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM L L\nINNER JOIN R R ON ((L.A = R.A))\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`L_A` INTEGER KEY, `L_B` INTEGER, `L_C` INTEGER, `R_A` INTEGER, `R_B` INTEGER, `R_C` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "L", "R" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamTableJoinV1", + "properties" : { + "queryContext" : "Join" + }, + "joinType" : "INNER", + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "leftSource" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "PrependAliasLeft" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KafkaTopic_Left/Source" + }, + "topicName" : "LEFT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`A` INTEGER KEY, `B` INTEGER, `C` INTEGER" + }, + "keyColumnNames" : [ "L_A" ], + "selectExpressions" : [ "B AS L_B", "C AS L_C", "ROWTIME AS L_ROWTIME", "A AS L_A" ] + }, + "rightSource" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "PrependAliasRight" + }, + "source" : { + "@type" : "tableSourceV1", + "properties" : { + "queryContext" : "KafkaTopic_Right/Source" + }, + "topicName" : "RIGHT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`A` INTEGER KEY, `B` INTEGER, `C` INTEGER", + "forceChangelog" : true + }, + "keyColumnNames" : [ "R_A" ], + "selectExpressions" : [ "B AS R_B", "C AS R_C", "ROWTIME AS R_ROWTIME", "A AS R_A" ] + }, + "keyColName" : "L_A" + }, + "keyColumnNames" : [ "L_A" ], + "selectExpressions" : [ "L_B AS L_B", "L_C AS L_C", "R_A AS R_A", "R_B AS R_B", "R_C AS R_C" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/spec.json new file mode 100644 index 000000000000..3f626b8513f5 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/spec.json @@ -0,0 +1,179 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595923801, + "path" : "query-validation-tests/joins.json", + "schemas" : { + "CSAS_OUTPUT_0.KafkaTopic_Right.Source" : { + "schema" : "`A` INTEGER KEY, `B` INTEGER, `C` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.Join.Left" : { + "schema" : "`L_A` INTEGER KEY, `L_B` INTEGER, `L_C` INTEGER, `L_ROWTIME` BIGINT, `L_A` INTEGER", + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`L_A` INTEGER KEY, `L_B` INTEGER, `L_C` INTEGER, `R_A` INTEGER, `R_B` INTEGER, `R_C` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.KafkaTopic_Left.Source" : { + "schema" : "`A` INTEGER KEY, `B` INTEGER, `C` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.Join" : { + "schema" : "`L_A` INTEGER KEY, `L_B` INTEGER, `L_C` INTEGER, `L_ROWTIME` BIGINT, `L_A` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + } + } + }, + "testCase" : { + "name" : "non-KAFKA key format", + "inputs" : [ { + "topic" : "RIGHT", + "key" : 1, + "value" : { + "B" : -1, + "C" : -2 + }, + "timestamp" : 10 + }, { + "topic" : "LEFT", + "key" : 1, + "value" : { + "B" : 1, + "C" : 2 + }, + "timestamp" : 11 + }, { + "topic" : "LEFT", + "key" : 2, + "value" : { + "B" : 2, + "C" : 3 + }, + "timestamp" : 12 + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 1, + "value" : { + "R_A" : 1, + "L_B" : 1, + "R_B" : -1, + "L_C" : 2, + "R_C" : -2 + }, + "timestamp" : 11 + } ], + "topics" : [ { + "name" : "LEFT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "RIGHT", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM L (A INT KEY, B INT, C INT) WITH (kafka_topic='LEFT', format='JSON');", "CREATE TABLE R (A INT PRIMARY KEY, B INT, C INT) WITH (kafka_topic='RIGHT', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM L INNER JOIN R ON L.A = R.A;" ], + "post" : { + "sources" : [ { + "name" : "L", + "type" : "STREAM", + "schema" : "`A` INTEGER KEY, `B` INTEGER, `C` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`L_A` INTEGER KEY, `L_B` INTEGER, `L_C` INTEGER, `R_A` INTEGER, `R_B` INTEGER, `R_C` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "R", + "type" : "TABLE", + "schema" : "`A` INTEGER KEY, `B` INTEGER, `C` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "_confluent-ksql-some.ksql.service.idquery_CSAS_OUTPUT_0-KafkaTopic_Right-Reduce-changelog", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "RIGHT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "LEFT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/topology new file mode 100644 index 000000000000..534bc6f40f0a --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/joins_-_non-KAFKA_key_format/6.1.0_1602595923801/topology @@ -0,0 +1,33 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000006 (topics: [LEFT]) + --> KSTREAM-TRANSFORMVALUES-0000000007 + Source: KSTREAM-SOURCE-0000000001 (topics: [RIGHT]) + --> KTABLE-SOURCE-0000000002 + Processor: KSTREAM-TRANSFORMVALUES-0000000007 (stores: []) + --> PrependAliasLeft + <-- KSTREAM-SOURCE-0000000006 + Processor: KTABLE-SOURCE-0000000002 (stores: []) + --> KTABLE-MAPVALUES-0000000003 + <-- KSTREAM-SOURCE-0000000001 + Processor: PrependAliasLeft (stores: []) + --> Join + <-- KSTREAM-TRANSFORMVALUES-0000000007 + Processor: Join (stores: [KafkaTopic_Right-Reduce]) + --> Project + <-- PrependAliasLeft + Processor: KTABLE-MAPVALUES-0000000003 (stores: [KafkaTopic_Right-Reduce]) + --> KTABLE-TRANSFORMVALUES-0000000004 + <-- KTABLE-SOURCE-0000000002 + Processor: KTABLE-TRANSFORMVALUES-0000000004 (stores: []) + --> PrependAliasRight + <-- KTABLE-MAPVALUES-0000000003 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000011 + <-- Join + Sink: KSTREAM-SINK-0000000011 (topic: OUTPUT) + <-- Project + Processor: PrependAliasRight (stores: []) + --> none + <-- KTABLE-TRANSFORMVALUES-0000000004 + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/plan.json new file mode 100644 index 000000000000..d6a7e7f2fdf2 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/plan.json @@ -0,0 +1,145 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (K BIGINT KEY, V INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input_topic');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`K` BIGINT KEY, `V` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`K` BIGINT KEY, `V` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`K` BIGINT KEY, `V` INTEGER" + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "V AS V" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/spec.json new file mode 100644 index 000000000000..503e7137b9a4 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/spec.json @@ -0,0 +1,112 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595926745, + "path" : "query-validation-tests/json.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` BIGINT KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` BIGINT KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "BIGINT - key", + "inputs" : [ { + "topic" : "input_topic", + "key" : 998877665544332211, + "value" : { + "V" : 0 + } + }, { + "topic" : "input_topic", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 998877665544332211, + "value" : { + "V" : 0 + } + }, { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (K BIGINT KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`K` BIGINT KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`K` BIGINT KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BIGINT_-_key/6.1.0_1602595926745/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/plan.json new file mode 100644 index 000000000000..87763f7c45a2 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/plan.json @@ -0,0 +1,145 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (K BOOLEAN KEY, V INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input_topic');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`K` BOOLEAN KEY, `V` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`K` BOOLEAN KEY, `V` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`K` BOOLEAN KEY, `V` INTEGER" + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "V AS V" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/spec.json new file mode 100644 index 000000000000..3de26830d967 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/spec.json @@ -0,0 +1,124 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595926653, + "path" : "query-validation-tests/json.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` BOOLEAN KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` BOOLEAN KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "BOOLEAN - key", + "inputs" : [ { + "topic" : "input_topic", + "key" : true, + "value" : { + "V" : 0 + } + }, { + "topic" : "input_topic", + "key" : false, + "value" : { + "V" : 0 + } + }, { + "topic" : "input_topic", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : true, + "value" : { + "V" : 0 + } + }, { + "topic" : "OUTPUT", + "key" : false, + "value" : { + "V" : 0 + } + }, { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (K BOOLEAN KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`K` BOOLEAN KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`K` BOOLEAN KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_BOOLEAN_-_key/6.1.0_1602595926653/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/plan.json new file mode 100644 index 000000000000..abecee63f3e1 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/plan.json @@ -0,0 +1,145 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (K DECIMAL(6, 4) KEY, V INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input_topic');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`K` DECIMAL(6, 4) KEY, `V` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`K` DECIMAL(6, 4) KEY, `V` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`K` DECIMAL(6, 4) KEY, `V` INTEGER" + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "V AS V" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/spec.json new file mode 100644 index 000000000000..1261e78aa013 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/spec.json @@ -0,0 +1,112 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595926859, + "path" : "query-validation-tests/json.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` DECIMAL(6, 4) KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` DECIMAL(6, 4) KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "DECIMAL - key", + "inputs" : [ { + "topic" : "input_topic", + "key" : 12.3650, + "value" : { + "V" : 0 + } + }, { + "topic" : "input_topic", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 12.3650, + "value" : { + "V" : 0 + } + }, { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (K DECIMAL(6,4) KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`K` DECIMAL(6, 4) KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`K` DECIMAL(6, 4) KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DECIMAL_-_key/6.1.0_1602595926859/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/plan.json new file mode 100644 index 000000000000..1d8a0c7224a8 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/plan.json @@ -0,0 +1,145 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (K DOUBLE KEY, V INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input_topic');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`K` DOUBLE KEY, `V` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`K` DOUBLE KEY, `V` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`K` DOUBLE KEY, `V` INTEGER" + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "V AS V" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/spec.json new file mode 100644 index 000000000000..79cbf9cff631 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/spec.json @@ -0,0 +1,112 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595926778, + "path" : "query-validation-tests/json.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` DOUBLE KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` DOUBLE KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "DOUBLE - key", + "inputs" : [ { + "topic" : "input_topic", + "key" : 654.321, + "value" : { + "V" : 0 + } + }, { + "topic" : "input_topic", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 654.321, + "value" : { + "V" : 0 + } + }, { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (K DOUBLE KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`K` DOUBLE KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`K` DOUBLE KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_DOUBLE_-_key/6.1.0_1602595926778/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/plan.json new file mode 100644 index 000000000000..859c6a75a2f4 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/plan.json @@ -0,0 +1,145 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (K INTEGER KEY, V INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input_topic');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`K` INTEGER KEY, `V` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`K` INTEGER KEY, `V` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`K` INTEGER KEY, `V` INTEGER" + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "V AS V" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/spec.json new file mode 100644 index 000000000000..1bd7257f7909 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/spec.json @@ -0,0 +1,112 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595926696, + "path" : "query-validation-tests/json.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` INTEGER KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` INTEGER KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "INT - key", + "inputs" : [ { + "topic" : "input_topic", + "key" : 33, + "value" : { + "V" : 0 + } + }, { + "topic" : "input_topic", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 33, + "value" : { + "V" : 0 + } + }, { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (K INT KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`K` INTEGER KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`K` INTEGER KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_INT_-_key/6.1.0_1602595926696/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/plan.json new file mode 100644 index 000000000000..6769953294a5 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/plan.json @@ -0,0 +1,145 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (K STRING KEY, V INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input_topic');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`K` STRING KEY, `V` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`K` STRING KEY, `V` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`K` STRING KEY, `V` INTEGER" + }, + "keyColumnNames" : [ "K" ], + "selectExpressions" : [ "V AS V" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/spec.json new file mode 100644 index 000000000000..14b8371fab98 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/spec.json @@ -0,0 +1,112 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595926814, + "path" : "query-validation-tests/json.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`K` STRING KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`K` STRING KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "STRING - key", + "inputs" : [ { + "topic" : "input_topic", + "key" : "Hey", + "value" : { + "V" : 0 + } + }, { + "topic" : "input_topic", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : "Hey", + "value" : { + "V" : 0 + } + }, { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (K STRING KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`K` STRING KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`K` STRING KEY, `V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_STRING_-_key/6.1.0_1602595926814/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/plan.json new file mode 100644 index 000000000000..672947d42af4 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/plan.json @@ -0,0 +1,140 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (V INTEGER) WITH (FORMAT='JSON', KAFKA_TOPIC='input_topic');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`V` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`V` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`V` INTEGER" + }, + "selectExpressions" : [ "V AS V" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/spec.json new file mode 100644 index 000000000000..393830df6575 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/spec.json @@ -0,0 +1,96 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595927297, + "path" : "query-validation-tests/json.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "keyless JSON", + "inputs" : [ { + "topic" : "input_topic", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "V" : 0 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`V` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/topology new file mode 100644 index 000000000000..12f8f6574002 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/json_-_keyless_JSON/6.1.0_1602595927297/topology @@ -0,0 +1,13 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Project + <-- KSTREAM-SOURCE-0000000000 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Sink: KSTREAM-SINK-0000000003 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/plan.json new file mode 100644 index 000000000000..c52ad73f2883 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/plan.json @@ -0,0 +1,215 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE T (ID INTEGER PRIMARY KEY, VAL STRING) WITH (KAFKA_TOPIC='t', KEY_FORMAT='KAFKA', VALUE_FORMAT='JSON');", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "T", + "schema" : "`ID` INTEGER KEY, `VAL` STRING", + "topicName" : "t", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM S (ID INTEGER) WITH (KAFKA_TOPIC='s', KEY_FORMAT='NONE', VALUE_FORMAT='JSON');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "S", + "schema" : "`ID` INTEGER", + "topicName" : "s", + "formats" : { + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT\n S.ID S_ID,\n T.VAL VAL\nFROM S S\nINNER JOIN T T ON ((S.ID = T.ID))\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`S_ID` INTEGER KEY, `VAL` STRING", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "S", "T" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamTableJoinV1", + "properties" : { + "queryContext" : "Join" + }, + "joinType" : "INNER", + "internalFormats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "leftSource" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "PrependAliasLeft" + }, + "source" : { + "@type" : "streamSelectKeyV2", + "properties" : { + "queryContext" : "LeftSourceKeyed" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KafkaTopic_Left/Source" + }, + "topicName" : "s", + "formats" : { + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`ID` INTEGER" + }, + "keyExpression" : "ID" + }, + "keyColumnNames" : [ "S_ID" ], + "selectExpressions" : [ "ID AS S_ID", "ROWTIME AS S_ROWTIME" ] + }, + "rightSource" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "PrependAliasRight" + }, + "source" : { + "@type" : "tableSourceV1", + "properties" : { + "queryContext" : "KafkaTopic_Right/Source" + }, + "topicName" : "t", + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`ID` INTEGER KEY, `VAL` STRING", + "forceChangelog" : true + }, + "keyColumnNames" : [ "T_ID" ], + "selectExpressions" : [ "VAL AS T_VAL", "ROWTIME AS T_ROWTIME", "ID AS T_ID" ] + }, + "keyColName" : "S_ID" + }, + "keyColumnNames" : [ "S_ID" ], + "selectExpressions" : [ "T_VAL AS VAL" ] + }, + "formats" : { + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/spec.json new file mode 100644 index 000000000000..b1045a34af78 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/spec.json @@ -0,0 +1,162 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595938186, + "path" : "query-validation-tests/none.json", + "schemas" : { + "CSAS_OUTPUT_0.KafkaTopic_Right.Source" : { + "schema" : "`ID` INTEGER KEY, `VAL` STRING", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.Join.Left" : { + "schema" : "`S_ID` INTEGER KEY, `S_ID` INTEGER, `S_ROWTIME` BIGINT", + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`S_ID` INTEGER KEY, `VAL` STRING", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.KafkaTopic_Left.Source" : { + "schema" : "`ID` INTEGER", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.Join" : { + "schema" : "`S_ID` INTEGER KEY, `S_ID` INTEGER, `S_ROWTIME` BIGINT", + "keyFormat" : { + "format" : "KAFKA" + } + } + }, + "testCase" : { + "name" : "inherited in CSAS - JOIN with repartition", + "inputs" : [ { + "topic" : "t", + "key" : 10, + "value" : { + "VAL" : "hello" + } + }, { + "topic" : "s", + "key" : null, + "value" : { + "id" : 10 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 10, + "value" : { + "VAL" : "hello" + } + } ], + "topics" : [ { + "name" : "s", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "t", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE TABLE T (ID INT PRIMARY KEY, VAL STRING) WITH (kafka_topic='t', key_format='KAFKA', value_format='JSON');", "CREATE STREAM S (ID INT) WITH (kafka_topic='s', key_format='NONE', value_format='JSON');", "CREATE STREAM OUTPUT AS SELECT S.ID, VAL FROM S JOIN T ON S.ID = T.ID;" ], + "post" : { + "sources" : [ { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`S_ID` INTEGER KEY, `VAL` STRING", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "S", + "type" : "STREAM", + "schema" : "`ID` INTEGER", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "T", + "type" : "TABLE", + "schema" : "`ID` INTEGER KEY, `VAL` STRING", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "_confluent-ksql-some.ksql.service.idquery_CSAS_OUTPUT_0-KafkaTopic_Right-Reduce-changelog", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "t", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CSAS_OUTPUT_0-Join-repartition", + "keyFormat" : { + "format" : "KAFKA" + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "s", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/topology new file mode 100644 index 000000000000..9d929854e066 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_JOIN_with_repartition/6.1.0_1602595938186/topology @@ -0,0 +1,45 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000001 (topics: [t]) + --> KTABLE-SOURCE-0000000002 + Source: Join-repartition-source (topics: [Join-repartition]) + --> Join + Processor: KTABLE-SOURCE-0000000002 (stores: []) + --> KTABLE-MAPVALUES-0000000003 + <-- KSTREAM-SOURCE-0000000001 + Processor: Join (stores: [KafkaTopic_Right-Reduce]) + --> Project + <-- Join-repartition-source + Processor: KTABLE-MAPVALUES-0000000003 (stores: [KafkaTopic_Right-Reduce]) + --> KTABLE-TRANSFORMVALUES-0000000004 + <-- KTABLE-SOURCE-0000000002 + Processor: KTABLE-TRANSFORMVALUES-0000000004 (stores: []) + --> PrependAliasRight + <-- KTABLE-MAPVALUES-0000000003 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000015 + <-- Join + Sink: KSTREAM-SINK-0000000015 (topic: OUTPUT) + <-- Project + Processor: PrependAliasRight (stores: []) + --> none + <-- KTABLE-TRANSFORMVALUES-0000000004 + + Sub-topology: 1 + Source: KSTREAM-SOURCE-0000000006 (topics: [s]) + --> KSTREAM-TRANSFORMVALUES-0000000007 + Processor: KSTREAM-TRANSFORMVALUES-0000000007 (stores: []) + --> LeftSourceKeyed-SelectKey + <-- KSTREAM-SOURCE-0000000006 + Processor: LeftSourceKeyed-SelectKey (stores: []) + --> PrependAliasLeft + <-- KSTREAM-TRANSFORMVALUES-0000000007 + Processor: PrependAliasLeft (stores: []) + --> Join-repartition-filter + <-- LeftSourceKeyed-SelectKey + Processor: Join-repartition-filter (stores: []) + --> Join-repartition-sink + <-- PrependAliasLeft + Sink: Join-repartition-sink (topic: Join-repartition) + <-- Join-repartition-filter + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/plan.json new file mode 100644 index 000000000000..6c86ec48da6f --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/plan.json @@ -0,0 +1,150 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (FOO INTEGER, BAR INTEGER) WITH (KAFKA_TOPIC='input_topic', KEY_FORMAT='NONE', VALUE_FORMAT='JSON');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`FOO` INTEGER, `BAR` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nPARTITION BY INPUT.BAR\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`BAR` INTEGER KEY, `FOO` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSelectKeyV2", + "properties" : { + "queryContext" : "PartitionBy" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`FOO` INTEGER, `BAR` INTEGER" + }, + "keyExpression" : "BAR" + }, + "keyColumnNames" : [ "BAR" ], + "selectExpressions" : [ "FOO AS FOO" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/spec.json new file mode 100644 index 000000000000..7b5eb5013be0 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/spec.json @@ -0,0 +1,121 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595938173, + "path" : "query-validation-tests/none.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`FOO` INTEGER, `BAR` INTEGER", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`BAR` INTEGER KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "inherited in CSAS - PARTITION BY", + "inputs" : [ { + "topic" : "input_topic", + "key" : null, + "value" : { + "foo" : 10 + } + }, { + "topic" : "input_topic", + "key" : "data that should be ignored", + "value" : { + "foo" : 11 + } + }, { + "topic" : "input_topic", + "key" : null, + "value" : null + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "FOO" : 10 + } + }, { + "topic" : "OUTPUT", + "key" : null, + "value" : { + "FOO" : 11 + } + }, { + "topic" : "OUTPUT", + "key" : null, + "value" : null + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (foo INT, bar INT) WITH (kafka_topic='input_topic', key_format='NONE', value_format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT PARTITION BY BAR;" ], + "properties" : { + "ksql.persistence.default.format.key" : "JSON" + }, + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`FOO` INTEGER, `BAR` INTEGER", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`BAR` INTEGER KEY, `FOO` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/topology new file mode 100644 index 000000000000..8f95a1199e97 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CSAS_-_PARTITION_BY/6.1.0_1602595938173/topology @@ -0,0 +1,16 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> PartitionBy-SelectKey + <-- KSTREAM-SOURCE-0000000000 + Processor: PartitionBy-SelectKey (stores: []) + --> Project + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000004 + <-- PartitionBy-SelectKey + Sink: KSTREAM-SINK-0000000004 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/plan.json new file mode 100644 index 000000000000..004936679957 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/plan.json @@ -0,0 +1,183 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (FOO INTEGER) WITH (KAFKA_TOPIC='input_topic', KEY_FORMAT='NONE', VALUE_FORMAT='JSON');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`FOO` INTEGER", + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE OUTPUT AS SELECT\n INPUT.FOO FOO,\n COUNT(*) COUNT\nFROM INPUT INPUT\nGROUP BY INPUT.FOO\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "OUTPUT", + "schema" : "`FOO` INTEGER KEY, `COUNT` BIGINT", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "tableSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "Aggregate/Project" + }, + "source" : { + "@type" : "streamAggregateV1", + "properties" : { + "queryContext" : "Aggregate/Aggregate" + }, + "source" : { + "@type" : "streamGroupByV1", + "properties" : { + "queryContext" : "Aggregate/GroupBy" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Aggregate/Prepare" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input_topic", + "formats" : { + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`FOO` INTEGER" + }, + "selectExpressions" : [ "FOO AS FOO", "ROWTIME AS ROWTIME" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "groupByExpressions" : [ "FOO" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "nonAggregateColumns" : [ "FOO", "ROWTIME" ], + "aggregationFunctions" : [ "COUNT(ROWTIME)" ] + }, + "keyColumnNames" : [ "FOO" ], + "selectExpressions" : [ "KSQL_AGG_VARIABLE_0 AS COUNT" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CTAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/spec.json new file mode 100644 index 000000000000..931c6f092806 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/spec.json @@ -0,0 +1,143 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595938254, + "path" : "query-validation-tests/none.json", + "schemas" : { + "CTAS_OUTPUT_0.Aggregate.GroupBy" : { + "schema" : "`FOO` INTEGER KEY, `FOO` INTEGER, `ROWTIME` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`FOO` INTEGER", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.Aggregate.Aggregate.Materialize" : { + "schema" : "`FOO` INTEGER KEY, `FOO` INTEGER, `ROWTIME` BIGINT, `KSQL_AGG_VARIABLE_0` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.OUTPUT" : { + "schema" : "`FOO` INTEGER KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "inherited in CTAS - GROUP BY", + "inputs" : [ { + "topic" : "input_topic", + "key" : null, + "value" : { + "foo" : 22 + } + }, { + "topic" : "input_topic", + "key" : null, + "value" : null + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 22, + "value" : { + "COUNT" : 1 + } + } ], + "topics" : [ { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "input_topic", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (foo INT) WITH (kafka_topic='input_topic', key_format='NONE', value_format='JSON');", "CREATE TABLE OUTPUT AS SELECT FOO, COUNT() AS COUNT FROM INPUT GROUP BY FOO;" ], + "properties" : { + "ksql.persistence.default.format.key" : "JSON" + }, + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`FOO` INTEGER", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "TABLE", + "schema" : "`FOO` INTEGER KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input_topic", + "keyFormat" : { + "format" : "NONE" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-GroupBy-repartition", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-Aggregate-Materialize-changelog", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/topology new file mode 100644 index 000000000000..5144c38f80a3 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/none_-_inherited_in_CTAS_-_GROUP_BY/6.1.0_1602595938254/topology @@ -0,0 +1,40 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input_topic]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Aggregate-Prepare + <-- KSTREAM-SOURCE-0000000000 + Processor: Aggregate-Prepare (stores: []) + --> KSTREAM-FILTER-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-FILTER-0000000003 (stores: []) + --> Aggregate-GroupBy + <-- Aggregate-Prepare + Processor: Aggregate-GroupBy (stores: []) + --> Aggregate-GroupBy-repartition-filter + <-- KSTREAM-FILTER-0000000003 + Processor: Aggregate-GroupBy-repartition-filter (stores: []) + --> Aggregate-GroupBy-repartition-sink + <-- Aggregate-GroupBy + Sink: Aggregate-GroupBy-repartition-sink (topic: Aggregate-GroupBy-repartition) + <-- Aggregate-GroupBy-repartition-filter + + Sub-topology: 1 + Source: Aggregate-GroupBy-repartition-source (topics: [Aggregate-GroupBy-repartition]) + --> KSTREAM-AGGREGATE-0000000005 + Processor: KSTREAM-AGGREGATE-0000000005 (stores: [Aggregate-Aggregate-Materialize]) + --> Aggregate-Aggregate-ToOutputSchema + <-- Aggregate-GroupBy-repartition-source + Processor: Aggregate-Aggregate-ToOutputSchema (stores: []) + --> Aggregate-Project + <-- KSTREAM-AGGREGATE-0000000005 + Processor: Aggregate-Project (stores: []) + --> KTABLE-TOSTREAM-0000000011 + <-- Aggregate-Aggregate-ToOutputSchema + Processor: KTABLE-TOSTREAM-0000000011 (stores: []) + --> KSTREAM-SINK-0000000012 + <-- Aggregate-Project + Sink: KSTREAM-SINK-0000000012 (topic: OUTPUT) + <-- KTABLE-TOSTREAM-0000000011 + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/plan.json new file mode 100644 index 000000000000..62663c1c0006 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/plan.json @@ -0,0 +1,152 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (ID INTEGER KEY, VAL DOUBLE) WITH (FORMAT='JSON', KAFKA_TOPIC='input');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`ID` INTEGER KEY, `VAL` DOUBLE", + "topicName" : "input", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM OUTPUT AS SELECT *\nFROM INPUT INPUT\nPARTITION BY INPUT.VAL\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "OUTPUT", + "schema" : "`VAL` DOUBLE KEY, `ID` INTEGER", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "streamSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Project" + }, + "source" : { + "@type" : "streamSelectKeyV2", + "properties" : { + "queryContext" : "PartitionBy" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "input", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "sourceSchema" : "`ID` INTEGER KEY, `VAL` DOUBLE" + }, + "keyExpression" : "VAL" + }, + "keyColumnNames" : [ "VAL" ], + "selectExpressions" : [ "ID AS ID" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CSAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/spec.json new file mode 100644 index 000000000000..e4060fa54cfd --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/spec.json @@ -0,0 +1,100 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595940317, + "path" : "query-validation-tests/partition-by.json", + "schemas" : { + "CSAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`ID` INTEGER KEY, `VAL` DOUBLE", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CSAS_OUTPUT_0.OUTPUT" : { + "schema" : "`VAL` DOUBLE KEY, `ID` INTEGER", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "non-KAFKA key format", + "inputs" : [ { + "topic" : "input", + "key" : 10, + "value" : { + "VAL" : 10.02 + } + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 10.02, + "value" : { + "ID" : 10 + } + } ], + "topics" : [ { + "name" : "input", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (ID INT KEY, VAL DOUBLE) with (kafka_topic='input', format='JSON');", "CREATE STREAM OUTPUT AS select * from INPUT partition by VAL;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`ID` INTEGER KEY, `VAL` DOUBLE", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "STREAM", + "schema" : "`VAL` DOUBLE KEY, `ID` INTEGER", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "input", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/topology new file mode 100644 index 000000000000..a8325d21f26b --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/partition-by_-_non-KAFKA_key_format/6.1.0_1602595940317/topology @@ -0,0 +1,16 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [input]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> PartitionBy-SelectKey + <-- KSTREAM-SOURCE-0000000000 + Processor: PartitionBy-SelectKey (stores: []) + --> Project + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Processor: Project (stores: []) + --> KSTREAM-SINK-0000000004 + <-- PartitionBy-SelectKey + Sink: KSTREAM-SINK-0000000004 (topic: OUTPUT) + <-- Project + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/plan.json new file mode 100644 index 000000000000..5c0f4ecd589f --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/plan.json @@ -0,0 +1,187 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (A DECIMAL(4, 2)) WITH (FORMAT='JSON', KAFKA_TOPIC='INPUT');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`A` DECIMAL(4, 2)", + "topicName" : "INPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE OUTPUT AS SELECT\n INPUT.A A,\n COUNT(*) COUNT\nFROM INPUT INPUT\nWINDOW SESSION ( 30 SECONDS ) \nGROUP BY INPUT.A\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "OUTPUT", + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "windowInfo" : { + "type" : "SESSION" + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "tableSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "Aggregate/Project" + }, + "source" : { + "@type" : "streamWindowedAggregateV1", + "properties" : { + "queryContext" : "Aggregate/Aggregate" + }, + "source" : { + "@type" : "streamGroupByV1", + "properties" : { + "queryContext" : "Aggregate/GroupBy" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Aggregate/Prepare" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "INPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`A` DECIMAL(4, 2)" + }, + "selectExpressions" : [ "A AS A", "ROWTIME AS ROWTIME" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "groupByExpressions" : [ "A" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "nonAggregateColumns" : [ "A", "ROWTIME" ], + "aggregationFunctions" : [ "COUNT(ROWTIME)" ], + "windowExpression" : " SESSION ( 30 SECONDS ) " + }, + "keyColumnNames" : [ "A" ], + "selectExpressions" : [ "KSQL_AGG_VARIABLE_0 AS COUNT" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CTAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/spec.json new file mode 100644 index 000000000000..c4291947a7aa --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/spec.json @@ -0,0 +1,201 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595942565, + "path" : "query-validation-tests/session-windows.json", + "schemas" : { + "CTAS_OUTPUT_0.Aggregate.GroupBy" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `A` DECIMAL(4, 2), `ROWTIME` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`A` DECIMAL(4, 2)", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.Aggregate.Aggregate.Materialize" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `A` DECIMAL(4, 2), `ROWTIME` BIGINT, `KSQL_AGG_VARIABLE_0` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.OUTPUT" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "SESSION" + } + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "non-KAFKA key format", + "inputs" : [ { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 12.30 + }, + "timestamp" : 10 + }, { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 12.30 + }, + "timestamp" : 11 + }, { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 1.00 + }, + "timestamp" : 12 + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 12.30, + "value" : { + "COUNT" : 1 + }, + "timestamp" : 10, + "window" : { + "start" : 10, + "end" : 10, + "type" : "SESSION" + } + }, { + "topic" : "OUTPUT", + "key" : 12.30, + "value" : null, + "timestamp" : 10, + "window" : { + "start" : 10, + "end" : 10, + "type" : "SESSION" + } + }, { + "topic" : "OUTPUT", + "key" : 12.30, + "value" : { + "COUNT" : 2 + }, + "timestamp" : 11, + "window" : { + "start" : 10, + "end" : 11, + "type" : "SESSION" + } + }, { + "topic" : "OUTPUT", + "key" : 1.00, + "value" : { + "COUNT" : 1 + }, + "timestamp" : 12, + "window" : { + "start" : 12, + "end" : 12, + "type" : "SESSION" + } + } ], + "topics" : [ { + "name" : "INPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (A DECIMAL(4,2)) WITH (kafka_topic='INPUT', format='JSON');", "CREATE TABLE OUTPUT AS SELECT A, COUNT() AS COUNT FROM INPUT WINDOW SESSION (30 SECONDS) group by A;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`A` DECIMAL(4, 2)", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "TABLE", + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON", + "windowType" : "SESSION" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "INPUT", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-GroupBy-repartition", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-Aggregate-Materialize-changelog", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "SESSION" + } + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "SESSION" + } + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/topology new file mode 100644 index 000000000000..e8e67ad1d5a5 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/session-windows_-_non-KAFKA_key_format/6.1.0_1602595942565/topology @@ -0,0 +1,43 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [INPUT]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Aggregate-Prepare + <-- KSTREAM-SOURCE-0000000000 + Processor: Aggregate-Prepare (stores: []) + --> KSTREAM-FILTER-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-FILTER-0000000003 (stores: []) + --> Aggregate-GroupBy + <-- Aggregate-Prepare + Processor: Aggregate-GroupBy (stores: []) + --> Aggregate-GroupBy-repartition-filter + <-- KSTREAM-FILTER-0000000003 + Processor: Aggregate-GroupBy-repartition-filter (stores: []) + --> Aggregate-GroupBy-repartition-sink + <-- Aggregate-GroupBy + Sink: Aggregate-GroupBy-repartition-sink (topic: Aggregate-GroupBy-repartition) + <-- Aggregate-GroupBy-repartition-filter + + Sub-topology: 1 + Source: Aggregate-GroupBy-repartition-source (topics: [Aggregate-GroupBy-repartition]) + --> KSTREAM-AGGREGATE-0000000005 + Processor: KSTREAM-AGGREGATE-0000000005 (stores: [Aggregate-Aggregate-Materialize]) + --> Aggregate-Aggregate-ToOutputSchema + <-- Aggregate-GroupBy-repartition-source + Processor: Aggregate-Aggregate-ToOutputSchema (stores: []) + --> Aggregate-Aggregate-WindowSelect + <-- KSTREAM-AGGREGATE-0000000005 + Processor: Aggregate-Aggregate-WindowSelect (stores: []) + --> Aggregate-Project + <-- Aggregate-Aggregate-ToOutputSchema + Processor: Aggregate-Project (stores: []) + --> KTABLE-TOSTREAM-0000000012 + <-- Aggregate-Aggregate-WindowSelect + Processor: KTABLE-TOSTREAM-0000000012 (stores: []) + --> KSTREAM-SINK-0000000013 + <-- Aggregate-Project + Sink: KSTREAM-SINK-0000000013 (topic: OUTPUT) + <-- KTABLE-TOSTREAM-0000000012 + diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/plan.json b/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/plan.json new file mode 100644 index 000000000000..214754ca6334 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/plan.json @@ -0,0 +1,188 @@ +{ + "plan" : [ { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE STREAM INPUT (A DECIMAL(4, 2)) WITH (FORMAT='JSON', KAFKA_TOPIC='INPUT');", + "ddlCommand" : { + "@type" : "createStreamV1", + "sourceName" : "INPUT", + "schema" : "`A` DECIMAL(4, 2)", + "topicName" : "INPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "orReplace" : false + } + }, { + "@type" : "ksqlPlanV1", + "statementText" : "CREATE TABLE OUTPUT AS SELECT\n INPUT.A A,\n COUNT(*) COUNT\nFROM INPUT INPUT\nWINDOW TUMBLING ( SIZE 30 SECONDS ) \nGROUP BY INPUT.A\nEMIT CHANGES", + "ddlCommand" : { + "@type" : "createTableV1", + "sourceName" : "OUTPUT", + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "topicName" : "OUTPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "windowInfo" : { + "type" : "TUMBLING", + "size" : 30.000000000 + }, + "orReplace" : false + }, + "queryPlan" : { + "sources" : [ "INPUT" ], + "sink" : "OUTPUT", + "physicalPlan" : { + "@type" : "tableSinkV1", + "properties" : { + "queryContext" : "OUTPUT" + }, + "source" : { + "@type" : "tableSelectV1", + "properties" : { + "queryContext" : "Aggregate/Project" + }, + "source" : { + "@type" : "streamWindowedAggregateV1", + "properties" : { + "queryContext" : "Aggregate/Aggregate" + }, + "source" : { + "@type" : "streamGroupByV1", + "properties" : { + "queryContext" : "Aggregate/GroupBy" + }, + "source" : { + "@type" : "streamSelectV1", + "properties" : { + "queryContext" : "Aggregate/Prepare" + }, + "source" : { + "@type" : "streamSourceV1", + "properties" : { + "queryContext" : "KsqlTopic/Source" + }, + "topicName" : "INPUT", + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "sourceSchema" : "`A` DECIMAL(4, 2)" + }, + "selectExpressions" : [ "A AS A", "ROWTIME AS ROWTIME" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "groupByExpressions" : [ "A" ] + }, + "internalFormats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "nonAggregateColumns" : [ "A", "ROWTIME" ], + "aggregationFunctions" : [ "COUNT(ROWTIME)" ], + "windowExpression" : " TUMBLING ( SIZE 30 SECONDS ) " + }, + "keyColumnNames" : [ "A" ], + "selectExpressions" : [ "KSQL_AGG_VARIABLE_0 AS COUNT" ] + }, + "formats" : { + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "keyFeatures" : [ "UNWRAP_SINGLES" ] + }, + "topicName" : "OUTPUT" + }, + "queryId" : "CTAS_OUTPUT_0" + } + } ], + "configs" : { + "ksql.extension.dir" : "ext", + "ksql.streams.cache.max.bytes.buffering" : "0", + "ksql.security.extension.class" : null, + "metric.reporters" : "", + "ksql.transient.prefix" : "transient_", + "ksql.query.status.running.threshold.seconds" : "300", + "ksql.streams.default.deserialization.exception.handler" : "io.confluent.ksql.errors.LogMetricAndContinueExceptionHandler", + "ksql.output.topic.name.prefix" : "", + "ksql.query.pull.enable.standby.reads" : "false", + "ksql.persistence.default.format.key" : "KAFKA", + "ksql.query.error.max.queue.size" : "10", + "ksql.internal.topic.min.insync.replicas" : "1", + "ksql.streams.shutdown.timeout.ms" : "300000", + "ksql.internal.topic.replicas" : "1", + "ksql.insert.into.values.enabled" : "true", + "ksql.key.format.enabled" : "false", + "ksql.query.pull.max.allowed.offset.lag" : "9223372036854775807", + "ksql.query.pull.max.qps" : "2147483647", + "ksql.access.validator.enable" : "auto", + "ksql.streams.bootstrap.servers" : "localhost:0", + "ksql.query.pull.metrics.enabled" : "false", + "ksql.create.or.replace.enabled" : "true", + "ksql.metrics.extension" : null, + "ksql.hidden.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.cast.strings.preserve.nulls" : "true", + "ksql.authorization.cache.max.entries" : "10000", + "ksql.pull.queries.enable" : "true", + "ksql.suppress.enabled" : "false", + "ksql.sink.window.change.log.additional.retention" : "1000000", + "ksql.readonly.topics" : "_confluent.*,__confluent.*,_schemas,__consumer_offsets,__transaction_state,connect-configs,connect-offsets,connect-status,connect-statuses", + "ksql.query.persistent.active.limit" : "2147483647", + "ksql.persistence.wrap.single.values" : null, + "ksql.authorization.cache.expiry.time.secs" : "30", + "ksql.query.retry.backoff.initial.ms" : "15000", + "ksql.schema.registry.url" : "", + "ksql.properties.overrides.denylist" : "", + "ksql.streams.auto.offset.reset" : "earliest", + "ksql.connect.url" : "http://localhost:8083", + "ksql.service.id" : "some.ksql.service.id", + "ksql.streams.default.production.exception.handler" : "io.confluent.ksql.errors.ProductionExceptionHandlerUtil$LogAndFailProductionExceptionHandler", + "ksql.streams.commit.interval.ms" : "2000", + "ksql.streams.auto.commit.interval.ms" : "0", + "ksql.streams.topology.optimization" : "all", + "ksql.query.retry.backoff.max.ms" : "900000", + "ksql.streams.num.stream.threads" : "4", + "ksql.timestamp.throw.on.invalid" : "false", + "ksql.metrics.tags.custom" : "", + "ksql.persistence.default.format.value" : null, + "ksql.udfs.enabled" : "true", + "ksql.udf.enable.security.manager" : "true", + "ksql.connect.worker.config" : "", + "ksql.udf.collect.metrics" : "false", + "ksql.persistent.prefix" : "query_", + "ksql.metastore.backup.location" : "", + "ksql.error.classifier.regex" : "", + "ksql.suppress.buffer.size.bytes" : "-1" + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/spec.json b/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/spec.json new file mode 100644 index 000000000000..2e4ab2b1c1a7 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/spec.json @@ -0,0 +1,195 @@ +{ + "version" : "6.1.0", + "timestamp" : 1602595950603, + "path" : "query-validation-tests/tumbling-windows.json", + "schemas" : { + "CTAS_OUTPUT_0.Aggregate.GroupBy" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `A` DECIMAL(4, 2), `ROWTIME` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.KsqlTopic.Source" : { + "schema" : "`A` DECIMAL(4, 2)", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.Aggregate.Aggregate.Materialize" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `A` DECIMAL(4, 2), `ROWTIME` BIGINT, `KSQL_AGG_VARIABLE_0` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, + "CTAS_OUTPUT_0.OUTPUT" : { + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "TUMBLING", + "size" : 30.000000000 + } + }, + "valueFormat" : { + "format" : "JSON" + } + } + }, + "testCase" : { + "name" : "non-KAFKA key format", + "inputs" : [ { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 12.30 + }, + "timestamp" : 10 + }, { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 12.30 + }, + "timestamp" : 11 + }, { + "topic" : "INPUT", + "key" : null, + "value" : { + "A" : 1.00 + }, + "timestamp" : 12 + } ], + "outputs" : [ { + "topic" : "OUTPUT", + "key" : 12.30, + "value" : { + "COUNT" : 1 + }, + "timestamp" : 10, + "window" : { + "start" : 0, + "end" : 30000, + "type" : "TIME" + } + }, { + "topic" : "OUTPUT", + "key" : 12.30, + "value" : { + "COUNT" : 2 + }, + "timestamp" : 11, + "window" : { + "start" : 0, + "end" : 30000, + "type" : "TIME" + } + }, { + "topic" : "OUTPUT", + "key" : 1.00, + "value" : { + "COUNT" : 1 + }, + "timestamp" : 12, + "window" : { + "start" : 0, + "end" : 30000, + "type" : "TIME" + } + } ], + "topics" : [ { + "name" : "INPUT", + "replicas" : 1, + "numPartitions" : 4 + }, { + "name" : "OUTPUT", + "replicas" : 1, + "numPartitions" : 4 + } ], + "statements" : [ "CREATE STREAM INPUT (A DECIMAL(4,2)) WITH (kafka_topic='INPUT', format='JSON');", "CREATE TABLE OUTPUT AS SELECT A, COUNT() AS COUNT FROM INPUT WINDOW TUMBLING (SIZE 30 SECONDS) group by A;" ], + "post" : { + "sources" : [ { + "name" : "INPUT", + "type" : "STREAM", + "schema" : "`A` DECIMAL(4, 2)", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : "JSON", + "keyFeatures" : [ ], + "valueFeatures" : [ ] + }, { + "name" : "OUTPUT", + "type" : "TABLE", + "schema" : "`A` DECIMAL(4, 2) KEY, `COUNT` BIGINT", + "keyFormat" : { + "format" : "JSON", + "windowType" : "TUMBLING", + "windowSize" : 30000 + }, + "valueFormat" : "JSON", + "keyFeatures" : [ "UNWRAP_SINGLES" ], + "valueFeatures" : [ ] + } ], + "topics" : { + "topics" : [ { + "name" : "INPUT", + "keyFormat" : { + "format" : "JSON" + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-GroupBy-repartition", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ] + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "_confluent-ksql-some.ksql.service.idquery_CTAS_OUTPUT_0-Aggregate-Aggregate-Materialize-changelog", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "TUMBLING", + "size" : 30.000000000 + } + }, + "valueFormat" : { + "format" : "JSON" + } + }, { + "name" : "OUTPUT", + "keyFormat" : { + "format" : "JSON", + "features" : [ "UNWRAP_SINGLES" ], + "windowInfo" : { + "type" : "TUMBLING", + "size" : 30.000000000 + } + }, + "valueFormat" : { + "format" : "JSON" + }, + "partitions" : 4 + } ] + } + } + } +} \ No newline at end of file diff --git a/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/topology b/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/topology new file mode 100644 index 000000000000..e8e67ad1d5a5 --- /dev/null +++ b/ksqldb-functional-tests/src/test/resources/historical_plans/tumbling-windows_-_non-KAFKA_key_format/6.1.0_1602595950603/topology @@ -0,0 +1,43 @@ +Topologies: + Sub-topology: 0 + Source: KSTREAM-SOURCE-0000000000 (topics: [INPUT]) + --> KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-TRANSFORMVALUES-0000000001 (stores: []) + --> Aggregate-Prepare + <-- KSTREAM-SOURCE-0000000000 + Processor: Aggregate-Prepare (stores: []) + --> KSTREAM-FILTER-0000000003 + <-- KSTREAM-TRANSFORMVALUES-0000000001 + Processor: KSTREAM-FILTER-0000000003 (stores: []) + --> Aggregate-GroupBy + <-- Aggregate-Prepare + Processor: Aggregate-GroupBy (stores: []) + --> Aggregate-GroupBy-repartition-filter + <-- KSTREAM-FILTER-0000000003 + Processor: Aggregate-GroupBy-repartition-filter (stores: []) + --> Aggregate-GroupBy-repartition-sink + <-- Aggregate-GroupBy + Sink: Aggregate-GroupBy-repartition-sink (topic: Aggregate-GroupBy-repartition) + <-- Aggregate-GroupBy-repartition-filter + + Sub-topology: 1 + Source: Aggregate-GroupBy-repartition-source (topics: [Aggregate-GroupBy-repartition]) + --> KSTREAM-AGGREGATE-0000000005 + Processor: KSTREAM-AGGREGATE-0000000005 (stores: [Aggregate-Aggregate-Materialize]) + --> Aggregate-Aggregate-ToOutputSchema + <-- Aggregate-GroupBy-repartition-source + Processor: Aggregate-Aggregate-ToOutputSchema (stores: []) + --> Aggregate-Aggregate-WindowSelect + <-- KSTREAM-AGGREGATE-0000000005 + Processor: Aggregate-Aggregate-WindowSelect (stores: []) + --> Aggregate-Project + <-- Aggregate-Aggregate-ToOutputSchema + Processor: Aggregate-Project (stores: []) + --> KTABLE-TOSTREAM-0000000012 + <-- Aggregate-Aggregate-WindowSelect + Processor: KTABLE-TOSTREAM-0000000012 (stores: []) + --> KSTREAM-SINK-0000000013 + <-- Aggregate-Project + Sink: KSTREAM-SINK-0000000013 (topic: OUTPUT) + <-- KTABLE-TOSTREAM-0000000012 + diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/as_value.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/as_value.json index e2e844107fed..d80c162e874d 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/as_value.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/as_value.json @@ -121,9 +121,6 @@ "CREATE STREAM INPUT (ID BOOLEAN KEY, V0 INT, V1 INT) WITH (kafka_topic='input', format='JSON');", "CREATE STREAM OUTPUT AS SELECT ID, AS_VALUE(ID) AS ID_COPY, V1 FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input", "key": true, "value": {"V0": 2, "V1": 3}} ], @@ -141,9 +138,6 @@ "CREATE STREAM INPUT (ID DECIMAL(4,2) KEY, V0 INT, V1 INT) WITH (kafka_topic='input', format='JSON');", "CREATE STREAM OUTPUT AS SELECT ID, AS_VALUE(ID) AS ID_COPY, V1 FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input", "key": 12.30, "value": {"V0": 2, "V1": 3}} ], diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/formats.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/formats.json index bd2496796a40..b1ad42f081c6 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/formats.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/formats.json @@ -300,9 +300,6 @@ "CREATE STREAM INPUT (K STRING KEY, foo INT) WITH (kafka_topic='input_topic', key_format='KAFKA', value_format='JSON');", "CREATE STREAM OUTPUT WITH (key_format='JSON') AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": "hello", "value": {"FOO": 10}} ], @@ -322,9 +319,6 @@ "CREATE TABLE INPUT (K STRING PRIMARY KEY, foo INT) WITH (kafka_topic='input_topic', key_format='KAFKA', value_format='JSON');", "CREATE TABLE OUTPUT WITH (key_format='JSON') AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": "hello", "value": {"FOO": 10}} ], @@ -344,9 +338,6 @@ "CREATE STREAM INPUT (K STRING KEY, foo INT) WITH (kafka_topic='input_topic', key_format='KAFKA', value_format='AVRO');", "CREATE STREAM OUTPUT WITH (format='JSON') AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": "hello", "value": {"FOO": 10}} ], @@ -366,9 +357,6 @@ "CREATE TABLE INPUT (K STRING PRIMARY KEY, foo INT) WITH (kafka_topic='input_topic', key_format='KAFKA', value_format='AVRO');", "CREATE TABLE OUTPUT WITH (format='JSON') AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": "hello", "value": {"FOO": 10}} ], @@ -388,9 +376,6 @@ "CREATE STREAM INPUT (K BOOLEAN KEY, foo INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT WITH (key_format='KAFKA') AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "expectedException": { "type": "io.confluent.ksql.util.KsqlStatementException", "message": "The 'KAFKA' format does not support type 'BOOLEAN'" diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/group-by.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/group-by.json index 2aee9d59f773..b4d036246b76 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/group-by.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/group-by.json @@ -2262,9 +2262,6 @@ "CREATE STREAM TEST (ID INT KEY, VAL BOOLEAN) WITH (kafka_topic='test_topic', format='JSON');", "CREATE TABLE OUTPUT AS SELECT VAL, COUNT() AS COUNT FROM TEST GROUP BY VAL;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "test_topic", "key": 0, "value": {"VAL": true}}, {"topic": "test_topic", "key": 1, "value": {"VAL": false}}, diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/hopping-windows.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/hopping-windows.json index 337d6cc9ac5e..2c0d4a2fa8bc 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/hopping-windows.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/hopping-windows.json @@ -203,9 +203,6 @@ "CREATE STREAM INPUT (A DECIMAL(4,2)) WITH (kafka_topic='INPUT', format='JSON');", "CREATE TABLE OUTPUT AS SELECT A, COUNT() AS COUNT FROM INPUT WINDOW HOPPING (SIZE 30 SECONDS, ADVANCE BY 15 SECONDS) group by A;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "INPUT", "value": {"A": 12.30}, "timestamp": 10}, {"topic": "INPUT", "value": {"A": 12.30}, "timestamp": 11}, diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/joins.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/joins.json index fb061107a58e..5bf640eeea18 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/joins.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/joins.json @@ -1975,9 +1975,6 @@ "CREATE TABLE R (A INT PRIMARY KEY, B INT, C INT) WITH (kafka_topic='RIGHT', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM L INNER JOIN R ON L.A = R.A;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "RIGHT", "key": 1, "value": {"B": -1, "C": -2}, "timestamp": 10}, {"topic": "LEFT", "key": 1, "value": {"B": 1, "C": 2}, "timestamp": 11}, diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/json.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/json.json index 80772b1bcf9c..c526928bd6f7 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/json.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/json.json @@ -6,9 +6,6 @@ "CREATE STREAM INPUT (K BOOLEAN KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": true, "value": {"V": 0}}, {"topic": "input_topic", "key": false, "value": {"V": 0}}, @@ -60,9 +57,6 @@ "CREATE STREAM INPUT (K INT KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": 33, "value": {"V": 0}}, {"topic": "input_topic", "key": null, "value": {"V": 0}} @@ -108,9 +102,6 @@ "CREATE STREAM INPUT (K BIGINT KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": 998877665544332211, "value": {"V": 0}}, {"topic": "input_topic", "key": null, "value": {"V": 0}} @@ -156,9 +147,6 @@ "CREATE STREAM INPUT (K DOUBLE KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": 654.321, "value": {"V": 0}}, {"topic": "input_topic", "key": null, "value": {"V": 0}} @@ -204,9 +192,6 @@ "CREATE STREAM INPUT (K STRING KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": "Hey", "value": {"V": 0}}, {"topic": "input_topic", "key": null, "value": {"V": 0}} @@ -252,9 +237,6 @@ "CREATE STREAM INPUT (K DECIMAL(6,4) KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "key": 12.3650, "value": {"V": 0}}, {"topic": "input_topic", "key": null, "value": {"V": 0}} @@ -299,9 +281,6 @@ "statements": [ "CREATE STREAM INPUT (K ARRAY KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');" ], - "properties": { - "ksql.key.format.enabled": true - }, "expectedException": { "type": "io.confluent.ksql.util.KsqlStatementException", "message": "Unsupported key schema: [`K` ARRAY KEY]" @@ -342,9 +321,6 @@ "statements": [ "CREATE STREAM INPUT (K MAP KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');" ], - "properties": { - "ksql.key.format.enabled": true - }, "expectedException": { "type": "io.confluent.ksql.util.KsqlStatementException", "message": "Unsupported key schema: [`K` MAP KEY]" @@ -385,9 +361,6 @@ "statements": [ "CREATE STREAM INPUT (K STRUCT KEY, V INT) WITH (kafka_topic='input_topic', format='JSON');" ], - "properties": { - "ksql.key.format.enabled": true - }, "expectedException": { "type": "io.confluent.ksql.util.KsqlStatementException", "message": "Unsupported key schema: [`K` STRUCT<`F` DOUBLE> KEY]" @@ -711,9 +684,6 @@ "CREATE STREAM INPUT (V INT) WITH (kafka_topic='input_topic', format='JSON');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "input_topic", "value": {"V": 0}} ], diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/none.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/none.json index 2987cb075117..da8695255b7e 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/none.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/none.json @@ -109,7 +109,6 @@ "CREATE STREAM OUTPUT AS SELECT * FROM INPUT PARTITION BY BAR;" ], "properties": { - "ksql.key.format.enabled": true, "ksql.persistence.default.format.key": "JSON" }, "inputs": [ @@ -135,10 +134,6 @@ "CREATE STREAM S (ID INT) WITH (kafka_topic='s', key_format='NONE', value_format='JSON');", "CREATE STREAM OUTPUT AS SELECT S.ID, VAL FROM S JOIN T ON S.ID = T.ID;" ], - "properties": { - "ksql.key.format.enabled": true, - "ksql.persistence.default.format.key": "KAFKA" - }, "inputs": [ {"topic": "t", "key": 10, "value": {"VAL": "hello"}}, {"topic": "s", "key": null, "value": {"id": 10}} @@ -159,7 +154,6 @@ "CREATE TABLE OUTPUT AS SELECT FOO, COUNT() AS COUNT FROM INPUT GROUP BY FOO;" ], "properties": { - "ksql.key.format.enabled": true, "ksql.persistence.default.format.key": "JSON" }, "inputs": [ diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/partition-by.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/partition-by.json index 37589445fea3..40c86beb87b0 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/partition-by.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/partition-by.json @@ -803,9 +803,6 @@ "CREATE STREAM INPUT (ID INT KEY, VAL DOUBLE) with (kafka_topic='input', format='JSON');", "CREATE STREAM OUTPUT AS select * from INPUT partition by VAL;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [{"topic": "input", "key": 10, "value": {"VAL": 10.02}}], "outputs": [{"topic": "OUTPUT", "key": 10.02, "value": {"ID": 10}}] } diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/session-windows.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/session-windows.json index 45b97092613f..fa792c3fdf0b 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/session-windows.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/session-windows.json @@ -144,9 +144,6 @@ "CREATE STREAM INPUT (A DECIMAL(4,2)) WITH (kafka_topic='INPUT', format='JSON');", "CREATE TABLE OUTPUT AS SELECT A, COUNT() AS COUNT FROM INPUT WINDOW SESSION (30 SECONDS) group by A;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "INPUT", "value": {"A": 12.30}, "timestamp": 10}, {"topic": "INPUT", "value": {"A": 12.30}, "timestamp": 11}, diff --git a/ksqldb-functional-tests/src/test/resources/query-validation-tests/tumbling-windows.json b/ksqldb-functional-tests/src/test/resources/query-validation-tests/tumbling-windows.json index fe98c97a7777..a473c67b8ac1 100644 --- a/ksqldb-functional-tests/src/test/resources/query-validation-tests/tumbling-windows.json +++ b/ksqldb-functional-tests/src/test/resources/query-validation-tests/tumbling-windows.json @@ -163,9 +163,6 @@ "CREATE STREAM INPUT (A DECIMAL(4,2)) WITH (kafka_topic='INPUT', format='JSON');", "CREATE TABLE OUTPUT AS SELECT A, COUNT() AS COUNT FROM INPUT WINDOW TUMBLING (SIZE 30 SECONDS) group by A;" ], - "properties": { - "ksql.key.format.enabled": true - }, "inputs": [ {"topic": "INPUT", "value": {"A": 12.30}, "timestamp": 10}, {"topic": "INPUT", "value": {"A": 12.30}, "timestamp": 11}, diff --git a/ksqldb-serde/src/main/java/io/confluent/ksql/serde/KeyFormatUtils.java b/ksqldb-serde/src/main/java/io/confluent/ksql/serde/KeyFormatUtils.java index 486213cb06e6..43de9e059152 100644 --- a/ksqldb-serde/src/main/java/io/confluent/ksql/serde/KeyFormatUtils.java +++ b/ksqldb-serde/src/main/java/io/confluent/ksql/serde/KeyFormatUtils.java @@ -21,10 +21,16 @@ public final class KeyFormatUtils { - private static final List SUPPORTED_KEY_FORMATS = - ImmutableList.of(FormatFactory.NONE, FormatFactory.KAFKA, FormatFactory.DELIMITED); - private static final List KEY_FORMATS_UNDER_DEVELOPMENT = - ImmutableList.of(FormatFactory.JSON, FormatFactory.AVRO); + private static final List SUPPORTED_KEY_FORMATS = ImmutableList.of( + FormatFactory.NONE, + FormatFactory.KAFKA, + FormatFactory.DELIMITED, + FormatFactory.JSON + ); + + private static final List KEY_FORMATS_UNDER_DEVELOPMENT = ImmutableList.of( + FormatFactory.AVRO + ); /** * Until the primitive key work is complete, not all formats are supported as key formats.