|
20 | 20 | import org.apache.doris.analysis.TableScanParams; |
21 | 21 | import org.apache.doris.analysis.TableSnapshot; |
22 | 22 | import org.apache.doris.catalog.Column; |
23 | | -import org.apache.doris.catalog.Env; |
24 | 23 | import org.apache.doris.catalog.StructField; |
25 | 24 | import org.apache.doris.catalog.Type; |
26 | 25 | import org.apache.doris.common.UserException; |
27 | 26 | import org.apache.doris.datasource.iceberg.source.IcebergTableQueryInfo; |
28 | 27 | import org.apache.doris.nereids.exceptions.AnalysisException; |
29 | | -import org.apache.doris.qe.ConnectContext; |
30 | 28 |
|
| 29 | +import com.google.common.collect.ImmutableList; |
31 | 30 | import com.google.common.collect.ImmutableMap; |
32 | 31 | import org.apache.iceberg.GenericPartitionFieldSummary; |
33 | 32 | import org.apache.iceberg.HistoryEntry; |
@@ -255,12 +254,12 @@ public void testIcebergVariantUsesComputeV2Representation() { |
255 | 254 | @Test |
256 | 255 | public void testIcebergWriteRejectsRootAndNestedVariant() { |
257 | 256 | Type variant = IcebergUtils.icebergTypeToDorisType(Types.VariantType.get(), false, false); |
258 | | - for (Column column : List.of( |
| 257 | + for (Column column : ImmutableList.of( |
259 | 258 | new Column("payload", variant), |
260 | 259 | new Column("nested", new org.apache.doris.catalog.StructType( |
261 | | - new ArrayList<>(List.of(new StructField("payload", variant))))))) { |
| 260 | + new ArrayList<>(ImmutableList.of(new StructField("payload", variant))))))) { |
262 | 261 | try { |
263 | | - IcebergUtils.validateWriteSchema(List.of(column)); |
| 262 | + IcebergUtils.validateWriteSchema(ImmutableList.of(column)); |
264 | 263 | Assert.fail("Iceberg writes must be rejected until the writer supports Variant"); |
265 | 264 | } catch (AnalysisException e) { |
266 | 265 | Assert.assertTrue(e.getMessage().contains("VARIANT")); |
|
0 commit comments