-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Throw exception when schema name doesn't match table name during table creation #11591
Throw exception when schema name doesn't match table name during table creation #11591
Conversation
cc @mcvsubbu @siddharthteotia @yupeng9 @jadami10
Now we want to start the process of enforcing it. Do you have concern about this? |
7dabd7b
to
7526664
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11591 +/- ##
============================================
- Coverage 63.13% 63.11% -0.03%
+ Complexity 1118 1117 -1
============================================
Files 2342 2342
Lines 125883 125882 -1
Branches 19357 19357
============================================
- Hits 79477 79448 -29
- Misses 40749 40768 +19
- Partials 5657 5666 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
fb27f0e
to
eba4baf
Compare
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 looks like this will cause a problem for us, since some of the users are sending a specific string to indicate that the schema does not exist.
We will dig a little bit more and get back to you.
So, am I correct that this PR only prevents new tables from getting created without a proper schema name. Existing tables, if they are different schema name, will continue to work as they do now? I suppose at some point, that will be removed as well, right? (I see code everywhere that corrects the situation for a schema not being present in the same name as the tableName). |
cc: @GSharayu , @sajjad-moradi |
Yes, this PR only prevents new tables with different schema name to be created. For the existing tables, we will do a one time migration later to move/copy the schema if they do not match the table name
You mean the schema name field? Once we make all the schema match the table name, we can remove that field |
8a32b21
to
0764dba
Compare
...ation-tests/src/test/java/org/apache/pinot/integration/tests/UpsertTableIntegrationTest.java
Outdated
Show resolved
Hide resolved
0764dba
to
8076acf
Compare
Hi @xiangfu0 @Jackie-Jiang , As @mcvsubbu mentioned, We are working with partner team to resolve the table creation flow since this will error out for new tables. As I understand from the discussion, this will be followed by a script to apply the changes to the existing tables. We will also need to work with the team for the same. We can get back to you on this PR pretty soon with any updates |
Yes, plan to add a periodic task to fix the schema name for existing tables: #11574 This will prevent new table creation. |
8076acf
to
003ab22
Compare
yes, this is a good move. |
4bdd9c2
to
67533ff
Compare
I have a more general question on this PR. Should this PR not include places in pinot-spi where we can throw exception if a client tries to create a table config that does not have a schema with the same name? Right now, the |
Most of the users are using REST endpoint to POST a json table config to create table. |
In that case, can we please include the change in spi as well? thanks. We ask our partners to use spi, since that has a better guarantee of keeping backward compat (that is the purpose of spi, right?) |
67533ff
to
c5e7add
Compare
Removed the |
c5e7add
to
e772576
Compare
Since we are already at the month end. Let's merge this? |
d9243e3
to
2cc9e26
Compare
2cc9e26
to
bd530c5
Compare
Hi @xiangfu0 and @Jackie-Jiang , feel free to merge the PR. The changes for new tables have been completed by our partner teams. Thanks a lot! |
Thanks! |
Hola 👋 ! sorry to comment on a merged PR, but I don't see in the release docs for 1.1.0-rc a reference to this change, which is a breaking change for our infrastructure. Is it going to be included in final version of 1.1.0 and where can I find documentation about this? EDIT: We looked again at the release notes and it's referenced in the bugfixes section. |
@estebanz01 thanks for pointing this out. I've updated the release docs to put this into the backward incompatible section. |
Throw exception when schema doesn't match table name