cecemei commented on code in PR #18403:
URL: https://github.com/apache/druid/pull/18403#discussion_r2323568579
##########
processing/src/main/java/org/apache/druid/segment/AggregateProjectionMetadata.java:
##########
@@ -213,16 +214,19 @@ public Schema(
int foundTimePosition = -1;
this.orderingWithTimeSubstitution =
Lists.newArrayListWithCapacity(ordering.size());
- Granularity granularity = null;
+ Granularity granularity = Granularities.ALL;
for (int i = 0; i < ordering.size(); i++) {
OrderBy orderBy = ordering.get(i);
if (orderBy.getColumnName().equals(timeColumnName)) {
orderingWithTimeSubstitution.add(new
OrderBy(ColumnHolder.TIME_COLUMN_NAME, orderBy.getOrder()));
+ if (foundTimePosition != -1) {
+ throw DruidException.defensive("projection[%s] has multiple time
columns in ordering: %s", name, ordering);
+ }
Review Comment:
yes this should not happen, I think I was thinking about the case when
there're multiple virtual columns using __time, this is not the best way to
handle it, anyway, reverted change in this file.
--
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]