Zoltan Borok-Nagy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/16882
Change subject: IMPALA-10398: Altering an Iceberg table might throw NullPointerException ...................................................................... IMPALA-10398: Altering an Iceberg table might throw NullPointerException IcebergSchemaConverter has a static thread local member which might not have a value in the current thread when nextId() is invoked. In that case the thread local integer's get() method returns a null and we get a NullPointerException when we want to convert it to a builtin int. This patch initializes the thread local variable with an anonymous subclass of ThreadLocal that overrides the 'initialValue()' method which returns 0 instead of null. Testing * tested manually by restarting the impala cluster and issuing ALTER TABLE .. ADD COLUMNS <columns with complex types> * looped test_alter_iceberg_tables for a while Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392 --- M fe/src/main/java/org/apache/impala/util/IcebergSchemaConverter.java 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/82/16882/1 -- To view, visit http://gerrit.cloudera.org:8080/16882 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392 Gerrit-Change-Number: 16882 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <borokna...@cloudera.com>