Noemi Pap-Takacs has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/20405


Change subject: IMPALA-12406: OPTIMIZE statement as an alias for INSERT 
OVERWRITE
......................................................................

IMPALA-12406: OPTIMIZE statement as an alias for INSERT OVERWRITE

If an Iceberg table is frequently updated/written to in small batches,
a lot of small files are created. This decreases read performance.
Similarly, frequent row-level deletes contribute to this problem
by creating delete files which have to be merged on read.

Currently INSERT OVERWRITE is used as a workaround to rewrite and
compact Iceberg tables.

OPTIMIZE statement offers a new syntax and an Iceberg specific
solution to this problem.
This patch introduces the new syntax as an alias for INSERT OVERWRITE.

Testing:
 - FE negative test for non-Iceberg tables and tables with
   parttition evolution
 - E2E: normal table, table with delete files, schema evolution

Change-Id: Ief42537499ffe64fafdefe25c8d175539234c4e7
---
M fe/src/main/cup/sql-parser.cup
M fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java
A fe/src/main/java/org/apache/impala/analysis/OptimizeStmt.java
M fe/src/main/java/org/apache/impala/planner/PlannerContext.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/main/jflex/sql-scanner.flex
M testdata/workloads/functional-query/queries/QueryTest/iceberg-negative.test
A testdata/workloads/functional-query/queries/QueryTest/iceberg-optimize.test
M tests/query_test/test_iceberg.py
9 files changed, 240 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/05/20405/2
--
To view, visit http://gerrit.cloudera.org:8080/20405
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief42537499ffe64fafdefe25c8d175539234c4e7
Gerrit-Change-Number: 20405
Gerrit-PatchSet: 2
Gerrit-Owner: Noemi Pap-Takacs <npaptak...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com>
Gerrit-Reviewer: Noemi Pap-Takacs <npaptak...@cloudera.com>
Gerrit-Reviewer: Tamas Mate <tma...@apache.org>
Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>

Reply via email to