diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java index 33c42af7eb9056..5fcbe1def75f81 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java @@ -29,6 +29,7 @@ import org.apache.doris.common.UserException; import org.apache.doris.common.security.authentication.ExecutionAuthenticator; import org.apache.doris.common.util.LocationPath; +import org.apache.doris.common.util.Util; import org.apache.doris.datasource.ExternalTable; import org.apache.doris.datasource.ExternalUtil; import org.apache.doris.datasource.FileQueryScanNode; @@ -656,13 +657,15 @@ private Optional checkNotSupportedException(Exception e) EXAMPLE: CREATE TABLE iceberg_tb(col1 INT,col2 STRING) USING ICEBERG PARTITIONED BY (bucket(10,col2)); INSERT INTO iceberg_tb VALUES( ... ); - ALTER TABLE iceberg_tb DROP PARTITION FIELD bucket(10,col2); - ALTER TABLE iceberg_tb DROP COLUMNS col2 STRING; + ALTER TABLE iceberg_tb DROP PARTITION FIELD bucket(10,col2); + ALTER TABLE iceberg_tb DROP COLUMNS col2; Link: https://github.com/apache/iceberg/pull/10755 - */ - LOG.warn("Iceberg TableScanUtil.splitFiles throw NullPointerException. Cause : ", e); + */ + LOG.warn("Unable to plan for iceberg table {}", this.desc.getTable().getName(), e); return Optional.of( - new NotSupportedException("Unable to read Iceberg table with dropped old partition column.")); + new NotSupportedException("Unable to plan for this table. " + + "Maybe read Iceberg table with dropped old partition column. Cause: " + + Util.getRootCauseMessage(e))); } return Optional.empty(); } diff --git a/regression-test/suites/external_table_p0/iceberg/test_iceberg_partition_evolution.groovy b/regression-test/suites/external_table_p0/iceberg/test_iceberg_partition_evolution.groovy index 985f9e035cb192..55a87d385369a7 100644 --- a/regression-test/suites/external_table_p0/iceberg/test_iceberg_partition_evolution.groovy +++ b/regression-test/suites/external_table_p0/iceberg/test_iceberg_partition_evolution.groovy @@ -88,7 +88,7 @@ suite("test_iceberg_partition_evolution", "p0,external,doris,external_docker,ext try { sql """ select * from iceberg_evolution_partition """ }catch (Exception e) { - assertTrue(e.getMessage().contains("Unable to read Iceberg table with dropped old partition column."), e.getMessage()) + assertTrue(e.getMessage().contains("Unable to plan for this table"), e.getMessage()) } }