-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support for DELIMITED
key format
#6344
Merged
big-andy-coates
merged 3 commits into
confluentinc:master
from
big-andy-coates:delimited_keys
Oct 2, 2020
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
141 changes: 141 additions & 0 deletions
141
...rc/test/resources/historical_plans/delimited_-_BIGINT_-_key/6.1.0_1601555627743/plan.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
{ | ||
"plan" : [ { | ||
"@type" : "ksqlPlanV1", | ||
"statementText" : "CREATE STREAM INPUT (K BIGINT KEY, V INTEGER) WITH (FORMAT='DELIMITED', KAFKA_TOPIC='input_topic');", | ||
"ddlCommand" : { | ||
"@type" : "createStreamV1", | ||
"sourceName" : "INPUT", | ||
"schema" : "`K` BIGINT KEY, `V` INTEGER", | ||
"topicName" : "input_topic", | ||
"formats" : { | ||
"keyFormat" : { | ||
"format" : "DELIMITED" | ||
}, | ||
"valueFormat" : { | ||
"format" : "DELIMITED" | ||
} | ||
}, | ||
"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" : "DELIMITED" | ||
}, | ||
"valueFormat" : { | ||
"format" : "DELIMITED" | ||
} | ||
}, | ||
"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" : "DELIMITED" | ||
}, | ||
"valueFormat" : { | ||
"format" : "DELIMITED" | ||
} | ||
}, | ||
"sourceSchema" : "`K` BIGINT KEY, `V` INTEGER" | ||
}, | ||
"keyColumnNames" : [ "K" ], | ||
"selectExpressions" : [ "V AS V" ] | ||
}, | ||
"formats" : { | ||
"keyFormat" : { | ||
"format" : "DELIMITED" | ||
}, | ||
"valueFormat" : { | ||
"format" : "DELIMITED" | ||
} | ||
}, | ||
"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" | ||
} | ||
} |
96 changes: 96 additions & 0 deletions
96
...rc/test/resources/historical_plans/delimited_-_BIGINT_-_key/6.1.0_1601555627743/spec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"version" : "6.1.0", | ||
"timestamp" : 1601555627743, | ||
"path" : "query-validation-tests/delimited.json", | ||
"schemas" : { | ||
"CSAS_OUTPUT_0.KsqlTopic.Source" : { | ||
"schema" : "`K` BIGINT KEY, `V` INTEGER" | ||
}, | ||
"CSAS_OUTPUT_0.OUTPUT" : { | ||
"schema" : "`K` BIGINT KEY, `V` INTEGER" | ||
} | ||
}, | ||
"testCase" : { | ||
"name" : "BIGINT - key", | ||
"inputs" : [ { | ||
"topic" : "input_topic", | ||
"key" : "998877665544332211", | ||
"value" : "0" | ||
}, { | ||
"topic" : "input_topic", | ||
"key" : "\"10\"", | ||
"value" : "0" | ||
}, { | ||
"topic" : "input_topic", | ||
"key" : null, | ||
"value" : "0" | ||
} ], | ||
"outputs" : [ { | ||
"topic" : "OUTPUT", | ||
"key" : "998877665544332211", | ||
"value" : "0" | ||
}, { | ||
"topic" : "OUTPUT", | ||
"key" : "10", | ||
"value" : "0" | ||
}, { | ||
"topic" : "OUTPUT", | ||
"key" : null, | ||
"value" : "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='DELIMITED');", "CREATE STREAM OUTPUT AS SELECT * FROM INPUT;" ], | ||
"post" : { | ||
"sources" : [ { | ||
"name" : "INPUT", | ||
"type" : "STREAM", | ||
"schema" : "`K` BIGINT KEY, `V` INTEGER", | ||
"keyFormat" : { | ||
"format" : "DELIMITED" | ||
}, | ||
"valueFormat" : "DELIMITED", | ||
"keyFeatures" : [ ], | ||
"valueFeatures" : [ ] | ||
}, { | ||
"name" : "OUTPUT", | ||
"type" : "STREAM", | ||
"schema" : "`K` BIGINT KEY, `V` INTEGER", | ||
"keyFormat" : { | ||
"format" : "DELIMITED" | ||
}, | ||
"valueFormat" : "DELIMITED", | ||
"keyFeatures" : [ ], | ||
"valueFeatures" : [ ] | ||
} ], | ||
"topics" : { | ||
"topics" : [ { | ||
"name" : "input_topic", | ||
"keyFormat" : { | ||
"format" : "DELIMITED" | ||
}, | ||
"valueFormat" : { | ||
"format" : "DELIMITED" | ||
}, | ||
"partitions" : 4 | ||
}, { | ||
"name" : "OUTPUT", | ||
"keyFormat" : { | ||
"format" : "DELIMITED" | ||
}, | ||
"valueFormat" : { | ||
"format" : "DELIMITED" | ||
}, | ||
"partitions" : 4 | ||
} ] | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...src/test/resources/historical_plans/delimited_-_BIGINT_-_key/6.1.0_1601555627743/topology
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!