didip opened a new issue #12204:
URL: https://github.com/apache/druid/issues/12204
### Affected Version
Druid 0.22.0
### Description
This particular SQL never finished.
```sql
SELECT
datasource,
COUNT(*) FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AS num_segments,
COUNT(*) FILTER (WHERE is_published = 1 AND is_overshadowed = 0 AND
is_available = 0) AS num_segments_to_load,
COUNT(*) FILTER (WHERE is_available = 1 AND NOT ((is_published = 1 AND
is_overshadowed = 0) OR is_realtime = 1)) AS num_segments_to_drop,
SUM("size") FILTER (WHERE is_published = 1 AND is_overshadowed = 0) AS
total_data_size,
MIN("num_rows") FILTER (WHERE is_published = 1 AND is_overshadowed = 0) AS
min_segment_rows,
AVG("num_rows") FILTER (WHERE is_published = 1 AND is_overshadowed = 0) AS
avg_segment_rows,
MAX("num_rows") FILTER (WHERE is_published = 1 AND is_overshadowed = 0) AS
max_segment_rows,
COUNT(*) FILTER (WHERE ((is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AND "start" LIKE '%:00.000Z' AND "end" LIKE '%:00.000Z') AS
minute_aligned_segments,
COUNT(*) FILTER (WHERE ((is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AND "start" LIKE '%:00:00.000Z' AND "end" LIKE '%:00:00.000Z')
AS hour_aligned_segments,
COUNT(*) FILTER (WHERE ((is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AND "start" LIKE '%T00:00:00.000Z' AND "end" LIKE
'%T00:00:00.000Z') AS day_aligned_segments,
COUNT(*) FILTER (WHERE ((is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AND "start" LIKE '%-01T00:00:00.000Z' AND "end" LIKE
'%-01T00:00:00.000Z') AS month_aligned_segments,
COUNT(*) FILTER (WHERE ((is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AND "start" LIKE '%-01-01T00:00:00.000Z' AND "end" LIKE
'%-01-01T00:00:00.000Z') AS year_aligned_segments,
COUNT(*) FILTER (WHERE ((is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AND "start" = '-146136543-09-08T08:23:32.096Z' AND "end" =
'146140482-04-24T15:36:27.903Z') AS all_granularity_segments,
SUM("num_rows") FILTER (WHERE (is_published = 1 AND is_overshadowed = 0) OR
is_realtime = 1) AS total_rows,
CASE WHEN SUM("num_rows") FILTER (WHERE is_published = 1 AND is_overshadowed
= 0) <> 0 THEN (SUM("size") FILTER (WHERE is_published = 1 AND is_overshadowed
= 0) / SUM("num_rows") FILTER (WHERE is_published = 1 AND is_overshadowed = 0))
ELSE 0 END AS avg_row_size,
SUM("size" * "num_replicas") FILTER (WHERE is_published = 1 AND
is_overshadowed = 0) AS replicated_size
FROM sys.segments
GROUP BY 1
ORDER BY 1
```
--
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]