[
https://issues.apache.org/jira/browse/IMPALA-10398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoltán Borók-Nagy resolved IMPALA-10398.
----------------------------------------
Fix Version/s: Impala 4.0
Resolution: Fixed
> Altering an Iceberg table might throw NullPointerException
> ----------------------------------------------------------
>
> Key: IMPALA-10398
> URL: https://issues.apache.org/jira/browse/IMPALA-10398
> Project: IMPALA
> Issue Type: Bug
> Reporter: Zoltán Borók-Nagy
> Assignee: Zoltán Borók-Nagy
> Priority: Major
> Fix For: Impala 4.0
>
>
> IcebergSchemaConverter has a static thread local member which can be
> uninitialized 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.
> {noformat}
> I1215 17:25:28.418272 22202 jni-util.cc:288] java.lang.NullPointerException
> at
> org.apache.impala.util.IcebergSchemaConverter.nextId(IcebergSchemaConverter.java:179)
> at
> org.apache.impala.util.IcebergSchemaConverter.fromImpalaType(IcebergSchemaConverter.java:162)
> at
> org.apache.impala.util.IcebergSchemaConverter.fromImpalaColumnType(IcebergSchemaConverter.java:121)
> at
> org.apache.impala.service.IcebergCatalogOpExecutor.addColumn(IcebergCatalogOpExecutor.java:103)
> at
> org.apache.impala.service.CatalogOpExecutor.alterIcebergTable(CatalogOpExecutor.java:972)
> at
> org.apache.impala.service.CatalogOpExecutor.alterTable(CatalogOpExecutor.java:701)
> at
> org.apache.impala.service.CatalogOpExecutor.execDdlRequest(CatalogOpExecutor.java:370)
> at
> org.apache.impala.service.JniCatalog.execDdl(JniCatalog.java:171){noformat}
>
> Because of this issue test_alter_iceberg_tables is flaky, especially on
> systems with a high number of CPUs.
>
> The error can be reproduced by restarting the Impala cluster and adding
> complex types to an Iceberg table, e.g.:
> {noformat}
> ALTER TABLE ice_table
> ADD COLUMNS(map_test MAP <STRING, array <STRING>>, struct_test STRUCT <f1:
> BIGINT, f2: BIGINT>);{noformat}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)