gianm commented on a change in pull request #9662: fix issue with group by
limit pushdown for extractionFn, expressions, joins, etc
URL: https://github.com/apache/druid/pull/9662#discussion_r407028305
##########
File path:
processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/GroupByQueryEngineV2.java
##########
@@ -331,6 +333,42 @@ public static boolean isAllSingleValueDims(
});
}
+ public static void convertRowTypesToOutputTypes(
+ final List<DimensionSpec> dimensionSpecs,
+ final ResultRow resultRow,
+ final int resultRowDimensionStart
+ )
+ {
+ for (int i = 0; i < dimensionSpecs.size(); i++) {
+ DimensionSpec dimSpec = dimensionSpecs.get(i);
+ final int resultRowIndex = resultRowDimensionStart + i;
+ final ValueType outputType = dimSpec.getOutputType();
+
+ resultRow.set(
+ resultRowIndex,
+
DimensionHandlerUtils.convertObjectToType(resultRow.get(resultRowIndex),
outputType)
+ );
+ }
+ }
+
+ /**
+ * check if a column will operate correctly with {@link
LimitedBufferHashGrouper} for query limit pushdown
+ */
+ public static boolean canPushDownLimit(ColumnSelectorFactory
columnSelectorFactory, String columnName)
+ {
+ ColumnCapabilities capabilities =
columnSelectorFactory.getColumnCapabilities(columnName);
+ if (capabilities != null) {
+ // strings can be pushed down if dictionaries are sorted and unique per
id
Review comment:
This comment isn't adding much, it's just repeating the couple of lines
below it in English. I'd either delete it, or replace it with a comment that
adds information by explaining why this fact is the case.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]