You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "vogievetsky (via GitHub)" <gi...@apache.org> on 2025/04/21 19:14:54 UTC

[PR] Web console: fix segment view issuing query that does not work sometimes. (druid)

vogievetsky opened a new pull request, #17940:
URL: https://github.com/apache/druid/pull/17940

   Bug: In segments view of a cluster with at least 200 intervals, group by Interval and then change the displayed page size to 200 rows you get an error.
   
   The view generates a query with an `IN` of 200 inervals that then gets rewritten by Druid to a JOIN (?) which does not work. Fix: set the context parameter `inFunctionThreshold` to something bigger than 200 in that case to prevent that behavior. 


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Web console: fix segment view issuing query that does not work sometimes. (druid)

Posted by "vogievetsky (via GitHub)" <gi...@apache.org>.
vogievetsky commented on code in PR #17940:
URL: https://github.com/apache/druid/pull/17940#discussion_r2052911325


##########
web-console/src/views/segments-view/segments-view.tsx:
##########
@@ -345,6 +346,9 @@ export class SegmentsView extends React.PureComponent<SegmentsViewProps, Segment
               orderByClause,
               `LIMIT ${pageSize * 1000}`,
             ]);
+
+            // This is needed because there might be an IN filter with a lot of intervals, the number of which exceeds the default inFunctionThreshold
+            sqlQueryContext.inFunctionThreshold = 1000;

Review Comment:
   The IN will have up to `pageSize` things in it so I'll set it to `pageSize + 1`. Somewhere else pageSize is limited to 200 but this way is more robust
   



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Web console: fix segment view issuing query that does not work sometimes. (druid)

Posted by "gianm (via GitHub)" <gi...@apache.org>.
gianm commented on code in PR #17940:
URL: https://github.com/apache/druid/pull/17940#discussion_r2052891867


##########
web-console/src/views/segments-view/segments-view.tsx:
##########
@@ -345,6 +346,9 @@ export class SegmentsView extends React.PureComponent<SegmentsViewProps, Segment
               orderByClause,
               `LIMIT ${pageSize * 1000}`,
             ]);
+
+            // This is needed because there might be an IN filter with a lot of intervals, the number of which exceeds the default inFunctionThreshold
+            sqlQueryContext.inFunctionThreshold = 1000;

Review Comment:
   Will the console never do an `IN` of more than 1000 values when writing `sys` queries? This should be larger than the largest possible `IN` the console will generate.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] Web console: fix segment view issuing query that does not work sometimes. (druid)

Posted by "vogievetsky (via GitHub)" <gi...@apache.org>.
vogievetsky merged PR #17940:
URL: https://github.com/apache/druid/pull/17940


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org