jtuglu-netflix commented on code in PR #18082:
URL: https://github.com/apache/druid/pull/18082#discussion_r2138916758
##########
server/src/main/java/org/apache/druid/metadata/SQLMetadataConnector.java:
##########
@@ -313,17 +313,27 @@ tableName, getPayloadType(), getQuoteString(),
getCollation()
public void createDataSourceTable(final String tableName)
{
+ final List<String> columns = new ArrayList<>();
Review Comment:
I've kept the primary key as `supervisor_id` for now as we currently have a
N:1 relationship between supervisor id and datasource. As both of these columns
are non-null, it shouldn't be hard to make a composite primary key of
(supervisor_id, datasource) in the future should that relationship change.
Since we currently rely on supervisor id being unique globally, I'd prefer
to have the DB schema reflect that for now until that doesn't hold true (it'll
also serve as a last line of defense for inserting duplicate supervisor IDs
across differing datasource names).
The alter table statement is performed in an atomic transaction so the
intermediary column operations should not be visible (despite this being
executed during the overlord start up).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]