Display error if user tries to create subsources for single-output load generators#32015
Display error if user tries to create subsources for single-output load generators#32015martykulma merged 4 commits intomainfrom
Conversation
ba709c4 to
214f4a1
Compare
88fe46c to
b0361f9
Compare
b0361f9 to
8e4bbd4
Compare
aljoscha
left a comment
There was a problem hiding this comment.
This does what it says on the tin, and the code is good!
@petrosagg might want to look at this because he's currently in the business of moving all our sources to only allow the CREATE TABLE FROM SOURCE ... syntax. Which I'm thinking currently doesn't work with these load generator sources, maybe?
| @@ -0,0 +1,298 @@ | |||
| # Copyright Materialize, Inc. and contributors. All rights reserved. | |||
There was a problem hiding this comment.
This one is longer because it first adds test coverage that wasn't there before, right?
There was a problem hiding this comment.
Correct, just keeping parity with testdrive, but if we don't need to, I'm happy to drop this.
@def-, should I be adding this testing here, or is it overkill?
There was a problem hiding this comment.
It doesn't hurt much either way, but no need to add a separate file here if there is nothing interesting being exercised. All of these old-kafka-src-syntax tests was supposed to be long removed, but then the new CREATE TABLE ... FROM SOURCE syntax work was paused for a while.
|
Disallowing this syntax in the current version of the product is inline with the migration so no concerns from me |
| @@ -0,0 +1,298 @@ | |||
| # Copyright Materialize, Inc. and contributors. All rights reserved. | |||
There was a problem hiding this comment.
It doesn't hurt much either way, but no need to add a separate file here if there is nothing interesting being exercised. All of these old-kafka-src-syntax tests was supposed to be long removed, but then the new CREATE TABLE ... FROM SOURCE syntax work was paused for a while.
test/testdrive/load-generator.td
Outdated
| contains:FOR SCHEMAS | ||
|
|
||
| ! CREATE SOURCE g FROM LOAD GENERATOR DATUMS FOR SCHEMAS ("foo"); | ||
| contains:FOR SCHEMAS |
There was a problem hiding this comment.
could be more verbose with what the error message is
6c26256 to
b25324c
Compare
Return appropriate error if user tries to create a single-output load generator with subsources (e.g.
FOR ALL TABLES,FOR TABLES ...,FOR SCHEMAS ...)Motivation
Fixes https://github.com/MaterializeInc/database-issues/issues/9028
Checklist
$T ⇔ Proto$Tmapping (possibly in a backwards-incompatible way), then it is tagged with aT-protolabel.