FrankChen021 commented on code in PR #20183:
URL: https://github.com/apache/druid/pull/20183#discussion_r4302743515
##########
processing/src/main/java/org/apache/druid/segment/FilteredSegment.java:
##########
@@ -44,6 +45,8 @@ public <T> T as(@Nonnull Class<T> clazz)
{
if (CursorFactory.class.equals(clazz)) {
return (T) new FilteredCursorFactory(delegate.as(CursorFactory.class),
filter);
+ } else if (CloseableShapeshifter.class.equals(clazz)) {
+ return (T) new CursorFactoryRowsAndColumns(as(CursorFactory.class));
Review Comment:
[P2] Prevent silent truncation of large filtered windows
**Finding:** This new path routes FilteredDataSource window queries through
CursorFactoryRowsAndColumns.materialize(). That loop ignores the boolean
returned by FrameWriter.addSelection(); once its fixed 200 MB allocator is
exhausted, it still advances the cursor and serializes only the rows already
written, allowing an oversized filtered window query to succeed with incomplete
results.
**Suggestion:** Check addSelection() before advancing and fail with
ResourceLimitExceededException, or use a bounded multi-frame materialization
path, with a regression test for an oversized filtered window result.
--
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]