Zoltán Borók-Nagy created IMPALA-14970:
------------------------------------------

             Summary: Time-travel queries can throw 
UnsupportedOperationException
                 Key: IMPALA-14970
                 URL: https://issues.apache.org/jira/browse/IMPALA-14970
             Project: IMPALA
          Issue Type: Bug
          Components: Backend, Frontend
            Reporter: Zoltán Borók-Nagy
            Assignee: Zoltán Borók-Nagy


Time-travel queries can throw UnsupportedOperationException, e.g.:

{noformat}
Caused by: java.lang.UnsupportedOperationException
        at 
com.google.common.collect.ImmutableCollection.add(ImmutableCollection.java:266)
        at 
java.base/java.util.Collections$SynchronizedCollection.add(Collections.java:2104)
        at org.apache.impala.util.ListMap.getOrAddIndex(ListMap.java:65)
        at 
org.apache.impala.catalog.FileBlock.createFbFileBlock(FileBlock.java:72)
        at 
org.apache.impala.catalog.FileDescriptor.create(FileDescriptor.java:152)
        at 
org.apache.impala.catalog.FeIcebergTable$Utils.getHdfsFileDescriptor(FeIcebergTable.java:1004)
        at 
org.apache.impala.planner.IcebergScanPlanner.getFileDescriptor(IcebergScanPlanner.java:935)
{noformat}

Reproduction needs an HDFS/Ozone cluster with at least R+1 data nodes where 
R=Replication factor.

{code:java}
drop table ice_t if exists;
create table ice_t (i int, p int) partitioned by spec(p)
stored as iceberg; 

insert into ice_t values (1,1);
insert into ice_t values (2,1);
insert into ice_t values (3,1);

optimize table ice_t;

show files in ice_t;

refresh ice_t;

describe history ice_t;

select * from ice_t for system_version as of <earlier snapshot>;
{code}

The problem is that in IcebergScanPlanner.getFileDescriptor() we use 
getIceTable().getHostIndex() during time-travel which is an immutable object.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to