github-advanced-security[bot] commented on code in PR #15665:
URL: https://github.com/apache/druid/pull/15665#discussion_r1448266334
##########
processing/src/main/java/org/apache/druid/query/groupby/GroupingEngine.java:
##########
@@ -430,14 +450,65 @@
@Nullable GroupByQueryMetrics groupByQueryMetrics
)
{
- return GroupByQueryEngineV2.process(
- query,
- storageAdapter,
- bufferPool,
- configSupplier.get().withOverrides(query),
- processingConfig,
- groupByQueryMetrics
- );
+ final GroupByQueryConfig querySpecificConfig =
configSupplier.get().withOverrides(query);
+
+ if (storageAdapter == null) {
+ throw new ISE(
+ "Null storage adapter found. Probably trying to issue a query
against a segment being memory unmapped."
+ );
+ }
+
+ final List<Interval> intervals =
query.getQuerySegmentSpec().getIntervals();
+ if (intervals.size() != 1) {
+ throw new IAE("Should only have one interval, got[%s]", intervals);
+ }
+
+ try (final ResourceHolder<ByteBuffer> bufferHolder = bufferPool.take()) {
+ final String fudgeTimestampString = NullHandling.emptyToNullIfNeeded(
+ query.context().getString(GroupingEngine.CTX_KEY_FUDGE_TIMESTAMP)
+ );
+
+ final DateTime fudgeTimestamp = fudgeTimestampString == null
+ ? null
+ :
DateTimes.utc(Long.parseLong(fudgeTimestampString));
Review Comment:
## Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more
details](https://github.com/apache/druid/security/code-scanning/6439)
--
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]