clintropolis commented on code in PR #19711:
URL: https://github.com/apache/druid/pull/19711#discussion_r3648078646


##########
server/src/main/java/org/apache/druid/catalog/model/table/DatasourceDefn.java:
##########
@@ -85,12 +95,37 @@ public DatasourceDefn()
             new ClusterKeysDefn(),
             new HiddenColumnsDefn(),
             new ModelProperties.BooleanPropertyDefn(SEALED_PROPERTY),
-            new ProjectionsDefn()
+            new ProjectionsDefn(),
+            new BaseTableDefn()
         ),
         null
     );
   }
 
+  @Override
+  public void validate(ResolvedTable table)
+  {
+    super.validate(table);
+    final DatasourceBaseTableMetadata baseTable = 
table.decodeProperty(BASE_TABLE_PROPERTY);
+    if (baseTable != null) {
+      // A base table layout derives the physical segment schema from the 
declared columns, so a column the query
+      // produces but the table does not declare cannot be stored; require 
'sealed' so ingestion rejects such columns
+      // instead of silently dropping them. Requiring the flag (rather than 
implying strictness) reserves the

Review Comment:
   fixed i think, it was trying to say that clustered specs must currently 
always be sealed because on the segment generation side that wires things up 
currently only uses the definition from the spec and ignores anything extra; 
forcing it to be sealed makes it consistent with that missing logic and also 
makes it so that someday in the future we could support non-sealed by fixing 
that gap to append extra columns to the end of the non-clustering columns 
(instead of doing something like making it implicitly sealed).



-- 
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]

Reply via email to