Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/24835 )

Change subject: IMPALA-15346: Fix IllegalStateException in createInsertEvents
......................................................................

IMPALA-15346: Fix IllegalStateException in createInsertEvents

This fixes an IllegalStateException in createInsertEvents when inserting
empty results into an unpartitioned table.

The exception is thrown in CatalogOpExecutor.createInsertEvents() when
asserting the number of updated partitions to be 1. The map of updated
partitions is created in CatalogOpExecutor.getFileMetadata() which loads
file metadata like checksums. It unintentionally skips adding partitions
that have an empty new file list by putting the put() statement in the
for-loop that iterates the file list. This patch fixes it by moving the
put() statement outside that for-loop. Also simplifies the case of empty
new file list.

The Preconditions check is updated to log the actual number of updated
partitions.

Testing
 - Added custom-cluster test

Change-Id: I0eb366f55f4e95b229a57297e42d14760b31be21
Reviewed-on: http://gerrit.cloudera.org:8080/24835
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M tests/custom_cluster/test_events_custom_configs.py
2 files changed, 20 insertions(+), 3 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/24835
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0eb366f55f4e95b229a57297e42d14760b31be21
Gerrit-Change-Number: 24835
Gerrit-PatchSet: 4
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Sai Hemanth Gantasala <[email protected]>

Reply via email to