Impala Public Jenkins has submitted this change and it was merged. ( 
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
Reviewed-on: http://gerrit.cloudera.org:8080/16882
Reviewed-by: Gabor Kaszab <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M fe/src/main/java/org/apache/impala/util/IcebergSchemaConverter.java
1 file changed, 6 insertions(+), 1 deletion(-)

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

--
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: merged
Gerrit-Change-Id: I4e8b7c655558898bd13c5288b466d5bf3d258392
Gerrit-Change-Number: 16882
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: Gabor Kaszab <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>

Reply via email to