-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: indicate header columns in source descriptions (#8475)
* feat: indicate header columns in source descriptions * address review comments
- Loading branch information
Zara Lim
authored
Dec 10, 2021
1 parent
0c7da2e
commit 065de82
Showing
9 changed files
with
548 additions
and
12 deletions.
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
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
137 changes: 137 additions & 0 deletions
137
.../ksql/cli/console/ConsoleTest.testPrintSourceDescriptionWithExtractedHeader.approved.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,137 @@ | ||
[ { | ||
"@type" : "sourceDescription", | ||
"statementText" : "some sql", | ||
"sourceDescription" : { | ||
"name" : "TestSource", | ||
"windowType" : null, | ||
"readQueries" : [ { | ||
"queryString" : "read query", | ||
"sinks" : [ "sink1" ], | ||
"sinkKafkaTopics" : [ "sink1 topic" ], | ||
"id" : "readId", | ||
"statusCount" : { | ||
"RUNNING" : 1, | ||
"ERROR" : 2 | ||
}, | ||
"queryType" : "PERSISTENT", | ||
"state" : "ERROR" | ||
} ], | ||
"writeQueries" : [ { | ||
"queryString" : "write query", | ||
"sinks" : [ "sink2" ], | ||
"sinkKafkaTopics" : [ "sink2 topic" ], | ||
"id" : "writeId", | ||
"statusCount" : { | ||
"RUNNING" : 1, | ||
"ERROR" : 2 | ||
}, | ||
"queryType" : "PERSISTENT", | ||
"state" : "ERROR" | ||
} ], | ||
"fields" : [ { | ||
"name" : "ROWKEY", | ||
"schema" : { | ||
"type" : "STRING", | ||
"fields" : null, | ||
"memberSchema" : null | ||
}, | ||
"type" : "KEY" | ||
}, { | ||
"name" : "f_0", | ||
"schema" : { | ||
"type" : "BOOLEAN", | ||
"fields" : null, | ||
"memberSchema" : null | ||
} | ||
}, { | ||
"name" : "f_1", | ||
"schema" : { | ||
"type" : "INTEGER", | ||
"fields" : null, | ||
"memberSchema" : null | ||
} | ||
}, { | ||
"name" : "f_2", | ||
"schema" : { | ||
"type" : "BIGINT", | ||
"fields" : null, | ||
"memberSchema" : null | ||
} | ||
}, { | ||
"name" : "f_3", | ||
"schema" : { | ||
"type" : "DOUBLE", | ||
"fields" : null, | ||
"memberSchema" : null | ||
} | ||
}, { | ||
"name" : "f_4", | ||
"schema" : { | ||
"type" : "STRING", | ||
"fields" : null, | ||
"memberSchema" : null | ||
} | ||
}, { | ||
"name" : "f_5", | ||
"schema" : { | ||
"type" : "ARRAY", | ||
"fields" : null, | ||
"memberSchema" : { | ||
"type" : "STRING", | ||
"fields" : null, | ||
"memberSchema" : null | ||
} | ||
} | ||
}, { | ||
"name" : "f_6", | ||
"schema" : { | ||
"type" : "MAP", | ||
"fields" : null, | ||
"memberSchema" : { | ||
"type" : "BIGINT", | ||
"fields" : null, | ||
"memberSchema" : null | ||
} | ||
} | ||
}, { | ||
"name" : "f_7", | ||
"schema" : { | ||
"type" : "STRUCT", | ||
"fields" : [ { | ||
"name" : "a", | ||
"schema" : { | ||
"type" : "DOUBLE", | ||
"fields" : null, | ||
"memberSchema" : null | ||
} | ||
} ], | ||
"memberSchema" : null | ||
} | ||
}, { | ||
"name" : "HEAD", | ||
"schema" : { | ||
"type" : "BYTES", | ||
"fields" : null, | ||
"memberSchema" : null | ||
}, | ||
"headerKey" : "abc", | ||
"type" : "HEADER" | ||
} ], | ||
"type" : "TABLE", | ||
"timestamp" : "2000-01-01", | ||
"statistics" : "The statistics field is deprecated and will be removed in a future version of ksql. Please update your client to the latest version and use statisticsMap instead.\nstats", | ||
"errorStats" : "The errorStats field is deprecated and will be removed in a future version of ksql. Please update your client to the latest version and use errorStatsMap instead.\nerrors\n", | ||
"extended" : true, | ||
"keyFormat" : "kafka", | ||
"valueFormat" : "avro", | ||
"topic" : "kafka-topic", | ||
"partitions" : 1, | ||
"replication" : 1, | ||
"statement" : "sql statement", | ||
"queryOffsetSummaries" : [ ], | ||
"sourceConstraints" : [ ], | ||
"clusterStatistics" : [ ], | ||
"clusterErrorStats" : [ ] | ||
}, | ||
"warnings" : [ ] | ||
} ] |
43 changes: 43 additions & 0 deletions
43
...ql/cli/console/ConsoleTest.testPrintSourceDescriptionWithExtractedHeader.approved.tabular
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,43 @@ | ||
|
||
Name : TestSource | ||
Type : TABLE | ||
Timestamp field : 2000-01-01 | ||
Key format : kafka | ||
Value format : avro | ||
Kafka topic : kafka-topic (partitions: 1, replication: 1) | ||
Statement : sql statement | ||
|
||
Field | Type | ||
------------------------------------------- | ||
ROWKEY | VARCHAR(STRING) (primary key) | ||
f_0 | BOOLEAN | ||
f_1 | INTEGER | ||
f_2 | BIGINT | ||
f_3 | DOUBLE | ||
f_4 | VARCHAR(STRING) | ||
f_5 | ARRAY<VARCHAR(STRING)> | ||
f_6 | MAP<STRING, BIGINT> | ||
f_7 | STRUCT<a DOUBLE> | ||
HEAD | BYTES (header('abc')) | ||
------------------------------------------- | ||
|
||
Queries that read from this TABLE | ||
----------------------------------- | ||
readId (ERROR) : read query | ||
|
||
For query topology and execution plan please run: EXPLAIN <QueryId> | ||
|
||
Queries that write from this TABLE | ||
----------------------------------- | ||
writeId (ERROR) : write query | ||
|
||
For query topology and execution plan please run: EXPLAIN <QueryId> | ||
|
||
Local runtime statistics | ||
------------------------ | ||
The statistics field is deprecated and will be removed in a future version of ksql. Please update your client to the latest version and use statisticsMap instead. | ||
stats | ||
The errorStats field is deprecated and will be removed in a future version of ksql. Please update your client to the latest version and use errorStatsMap instead. | ||
errors | ||
|
||
(Statistics of the local KSQL server interaction with the Kafka topic kafka-topic) |
Oops, something went wrong.