[ 
https://issues.apache.org/jira/browse/DRILL-3770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14968097#comment-14968097
 ] 

Deneche A. Hakim commented on DRILL-3770:
-----------------------------------------

Fixing DRILL-3952 should resolve this issue as the window function operator 
will no longer require all batches for a particular partition to be held in 
memory.

Please note that for some specific window functions (e.g. percent_rank) there 
is no other alternative than to wait for all batches for a partition, thus the 
fix won't work for them. For such queries, we'll most likely need a spilling 
mechanism

> Query with window function having just ORDER BY clause runs out of memory on 
> large datasets
> -------------------------------------------------------------------------------------------
>
>                 Key: DRILL-3770
>                 URL: https://issues.apache.org/jira/browse/DRILL-3770
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.2.0
>         Environment: 10 Performance Nodes
> DRILL_MAX_DIRECT_MEMORY=100g
> DRILL_INIT_HEAP="8g"
> DRILL_MAX_HEAP="8g"
> planner.memory.query_max_memory_per_node bumped up to 20 GB
> TPC-DS SF 1000 dataset (Parquet)
>            Reporter: Abhishek Girish
>            Priority: Critical
>              Labels: window_function
>             Fix For: Future
>
>         Attachments: drillbit.log.txt, profile.json
>
>
> The following query runs out of memory:
> {code:sql}
> SELECT SUM(ss.ss_net_paid_inc_tax) OVER (ORDER BY ss.ss_store_sk) FROM 
> store_sales ss LIMIT 20;
> java.lang.RuntimeException: java.sql.SQLException: RESOURCE ERROR: One or 
> more nodes ran out of memory while executing the query.
> Fragment 0:0
> [Error Id: 9c441211-65ec-4206-9e6b-d6ae9c2903be on ucs-node6.perf.lab:31010]
>       at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73)
>       at 
> sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:87)
>       at sqlline.TableOutputFormat.print(TableOutputFormat.java:118)
>       at sqlline.SqlLine.print(SqlLine.java:1583)
>       at sqlline.Commands.execute(Commands.java:852)
>       at sqlline.Commands.sql(Commands.java:751)
>       at sqlline.SqlLine.dispatch(SqlLine.java:738)
>       at sqlline.SqlLine.begin(SqlLine.java:612)
>       at sqlline.SqlLine.start(SqlLine.java:366)
>       at sqlline.SqlLine.main(SqlLine.java:259)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to