clintropolis commented on code in PR #19845:
URL: https://github.com/apache/druid/pull/19845#discussion_r3834635650
##########
processing/src/main/java/org/apache/druid/data/input/impl/ClusteredValueGroupsBaseTableProjectionSpec.java:
##########
@@ -229,6 +229,35 @@ public boolean
hasEqualCompactionState(BaseTableProjectionSpec other)
.equals(((ClusteredValueGroupsBaseTableProjectionSpec)
other).withoutQueryGranularity());
}
+ /**
+ * Appends the given columns after the declared ones, which keeps the
clustering columns the leading prefix of
+ * {@link #getColumns()}.
+ */
+ @Override
+ public ClusteredValueGroupsBaseTableProjectionSpec withAdditionalColumns(
+ @Nullable List<DimensionSchema> additionalColumns
+ )
+ {
+ if (CollectionUtils.isNullOrEmpty(additionalColumns)) {
+ return this;
+ }
+ final List<DimensionSchema> revised = new ArrayList<>(columns.size() +
additionalColumns.size());
+ revised.addAll(columns);
+ for (DimensionSchema additionalColumn : additionalColumns) {
+ if (ColumnHolder.TIME_COLUMN_NAME.equals(additionalColumn.getName())) {
+ throw InvalidInput.exception(
Review Comment:
oops, yes, fixed to validate
--
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]