-
Notifications
You must be signed in to change notification settings - Fork 487
Display error if user tries to create subsources for single-output load generators #32015
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
Conversation
ba709c4 to
214f4a1
Compare
88fe46c to
b0361f9
Compare
b0361f9 to
8e4bbd4
Compare
aljoscha
left a comment
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is longer because it first adds test coverage that wasn't there before, right?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.