yashmayya commented on issue #15121: URL: https://github.com/apache/pinot/issues/15121#issuecomment-2699940673
@Jackie-Jiang this doesn't seem to be reproducible on quickstarts so seems like it could have something to do with the specific data queried? This query: ``` WITH "windowed_data" AS ( SELECT "playerID", "numberOfGames", SUM("numberOfGames") OVER ( PARTITION BY "playerID" ORDER BY "yearID" ) AS "running_total", "teamID" FROM "baseballStats" WHERE "league" IN ('AL', 'NL') LIMIT 500 ) SELECT "teamID", SUM( CASE WHEN "numberOfGames" <= 10 AND "running_total" = 6 THEN 1 ELSE 0 END ) AS "count_type_a" FROM "windowed_data" GROUP BY 1 LIMIT 10 ``` with the following plan: ``` Execution Plan LogicalSort(offset=[0], fetch=[10]) PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false]) LogicalSort(fetch=[10]) PinotLogicalAggregate(group=[{0}], agg#0=[COUNT($1)]) PinotLogicalExchange(distribution=[hash[0]]) PinotLogicalAggregate(group=[{0}], agg#0=[COUNT() FILTER $1]) LogicalProject(teamID=[$2], $f2=[AND(<=($0, 10), =($1, 6))]) LogicalSort(offset=[0], fetch=[500]) PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false]) LogicalSort(fetch=[500]) LogicalProject(numberOfGames=[$0], running_total=[$4], teamID=[$2]) LogicalWindow(window#0=[window(partition {1} order by [3] aggs [SUM($0)])]) PinotLogicalSortExchange(distribution=[hash[1]], collation=[[3]], isSortOnSender=[false], isSortOnReceiver=[true]) LogicalProject(numberOfGames=[$14], playerID=[$16], teamID=[$25], yearID=[$27]) LogicalFilter(condition=[OR(=($13, _UTF-8'AL'), =($13, _UTF-8'NL'))]) LogicalTableScan(table=[[default, baseballStats]]) ``` runs fine locally. -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org