mirror of
https://github.com/apache/impala.git
synced 2026-01-07 00:02:28 -05:00
When OptimizeStmt created the table sink it didn't set 'inputIsClustered' to true. Therefore HdfsTableSink expected random input and kept the output writers open for every partition, which resulted in high memory consumption and potentially an OOM error when the number of partitions are high. Since we actually sort the rows before the sink we can set 'inputIsClustered' to true, which means HdfsTableSink can write files one by one, because whenever it gets a row that belongs to a new partition it knows that it can close the current output writer, and open a new one. Testing: * added e2e test Change-Id: I8d451c50c4b6dff9433ab105493051bee106bc63 Reviewed-on: http://gerrit.cloudera.org:8080/22192 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>