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


##########
multi-stage-query/src/main/java/org/apache/druid/msq/indexing/destination/SegmentGenerationUtils.java:
##########
@@ -112,6 +99,34 @@ public static DataSchema makeDataSchemaForIngestion(
     } else {
       transformSpec = null;
     }
+
+    // base-table mode, the destination supplies the base-table shape
+    if (destination.getBaseTable() != null) {
+      final Granularity queryGranularity =
+          
query.context().getGranularity(DruidSqlInsert.SQL_INSERT_QUERY_GRANULARITY, 
jsonMapper);
+      final BaseTableProjectionSpec baseTable =
+          destination.getBaseTable().withQueryGranularity(queryGranularity);
+      return DataSchema.builder()
+                       .withDataSource(destination.getDataSource())
+                       .withTimestamp(new 
TimestampSpec(ColumnHolder.TIME_COLUMN_NAME, "millis", null))
+                       .withTransform(transformSpec)
+                       .withBaseTable(baseTable)

Review Comment:
   i was planning on wiring this up in a follow-up that enables projections 
support for clustered segments, but i guess it doesn't hurt to wire it up now



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